serenity-bdd / serenity-maven-plugin

19 stars 21 forks source link

An aggregated report isn't generated in custom folder for multimodule projects #86

Open nekhvoya opened 2 years ago

nekhvoya commented 2 years ago

We have a multimodule project, each module has their own tests. The structure is the following: └───parent └───serenity-reports ├───pom.xml └───child1 └───src ├───main │ ├───java │ ├───resources ├───test │ ├───java │ ├───resources │ └─── serenity.conf ├───pom.xml └───child2 └───src ├───main │ ├───java │ ├───resources ├───test │ ├───java │ ├───resources │ └─── serenity.conf ├───pom.xml

In the parent pom.xml there are the following configuration of the serenity-maven-plugin

<plugin>
   <groupId>net.serenity-bdd.maven.plugins</groupId>
   <artifactId>serenity-maven-plugin</artifactId>
   <version>${serenity.version}</version>
   <dependencies>
      <dependency>
         <groupId>net.serenity-bdd</groupId>
         <artifactId>serenity-core</artifactId>
         <version>${serenity.version}</version>
      </dependency>
   </dependencies>
   <executions>
      <execution>
         <id>serenity-reports</id>
         <phase>post-integration-test</phase>
         <goals>
            <goal>aggregate</goal>
         </goals>
      </execution>
   </executions>
</plugin>

And the following properties in the serenity.conf files of each module:

serenity{
    outputDirectory  = ../../serenity-reports
}

When we were using version of serenity and serenity-maven-plugin 2.2.0, one aggregated report was generated in the serenity-reports dir located under the root directory (where all tests (from all the modules) could be found). However, when we upgraded serenity to version 3.1.10, the results are generated but without the index.html file and as a results the test report cannot be opened and viewed.

wakaleo commented 2 years ago

Aggregate reports are not supported for multi-module projects.

nekhvoya commented 2 years ago

Please note the the described behaviour was working in version of serenity 2.2.0

wakaleo commented 2 years ago

It's probably a regression then. The simplest work-around is to run it from the module directory, not from the root directory.