serenity-bdd / serenity-maven-plugin

19 stars 21 forks source link

No consolidated html report for multi module maven project #73

Closed yulinqi closed 4 years ago

yulinqi commented 4 years ago

My project has three modules, like module A, B, C, and every module has its own cucumber/serenity test.

If I run "mvn verify" for each module, then test execution and seniority reporting are good, and I can find aggregated report from the module target folder.

If I run "mvn verify" from top project level, then test execution and raw report files can still be found for each module ( depends on the location in seniority config file). However the aggregated report "index.html" is only available for the last module.

From maven console logs, I can see index.html is indeed generated for each module, but in the end, only the last one is saved to the file system. other index.html files ( maybe other files) are lost or overwritten in the process.

In the serenity config files for all modules, I have the following entry, so all raw reports are to be saved to parent project folder.

The folder strucure after execution: 1) under Project level root: /target/site/reports/.. ---> This is good, I see html and Json files from module A and B

2) Module A root: ---> There is no folder like ./target/site. The index.html file for module A is not here.

3) Module B root: ---> This is no folder like ./target/site. The index.html file for module B is not here.

4) Module C root: ./target/site/serenity/. ---> I can see index.html file here, but content is only for module C. Raw report files for module C are moved to here as well ( instead of under /target/site/reports/). I assume this is the work of "aggregate" function.

In short, I feel the "aggregate" goal is only preserved for module C. Please advise if there is any workaround to keep aggregated report for each module.

wakaleo commented 4 years ago

Multi module aggregation is not currently supported.

yulinqi commented 4 years ago

Hi, John

In this case, I don't expect a consolidated report for all modules, but hope you can still generate and preserve report for each individual module. From maven log, I can tell they are produced, but just NOT saved to file system at the end of "aggregate" goal per module.

thanks!

wakaleo commented 4 years ago

It’s not a high priority at the moment, but please feel free to look at the maven plugin code. Working with relative directories in modules is non trivial.

wakaleo commented 4 years ago

This should be fixed in 2.1.1 - the consolidated reports will be produced in the module containing the Serenity tests.

bijuvateswarath commented 3 years ago

This should be fixed in 2.1.1 - the consolidated reports will be produced in the module containing the Serenity tests.

Just wondering is this possible in latest version to consolidate sub modules reports into one ? Could you point to correct configuration ? if it is not available, would like to know , if I can contribute to this feature.

bijuvateswarath commented 3 years ago

My project has three modules, like module A, B, C, and every module has its own cucumber/serenity test.

If I run "mvn verify" for each module, then test execution and seniority reporting are good, and I can find aggregated report from the module target folder.

If I run "mvn verify" from top project level, then test execution and raw report files can still be found for each module ( depends on the location in seniority config file). However the aggregated report "index.html" is only available for the last module.

From maven console logs, I can see index.html is indeed generated for each module, but in the end, only the last one is saved to the file system. other index.html files ( maybe other files) are lost or overwritten in the process.

In the serenity config files for all modules, I have the following entry, so all raw reports are to be saved to parent project folder.

The folder strucure after execution:

  1. under Project level root: /target/site/reports/.. ---> This is good, I see html and Json files from module A and B
  2. Module A root: ---> There is no folder like ./target/site. The index.html file for module A is not here.
  3. Module B root: ---> This is no folder like ./target/site. The index.html file for module B is not here.
  4. Module C root: ./target/site/serenity/. ---> I can see index.html file here, but content is only for module C. Raw report files for module C are moved to here as well ( instead of under /target/site/reports/). I assume this is the work of "aggregate" function.

In short, I feel the "aggregate" goal is only preserved for module C. Please advise if there is any workaround to keep aggregated report for each module.

Just curious , is this working for you now ? What is the correct configuration ?

Deepak3991 commented 2 years ago

@wakaleo Hey John, is this issue resolved now?