2

Background info:

  • Maven version: 3.2.5
  • Java version: 1.8
  • Cucumber reporting version: 3.8.0

I have a multi-module maven java project. I have cucumber tests and the maven-cucumber-reporting plugin running and working for each module.

Question: I would like to generate one large report with all cucumber.json files from the child modules included after all child modules have built.

Can I:

  1. Run a maven plugin in the parent pom after all child modules have built and tested (with cucumber.json files created) to aggregate these reports into one large report
  2. Use a child module run at the end to do the aggregation of all child cucumber.json files and generate one big report.

Thanks in advance for any help!

vkrams
  • 7,267
  • 17
  • 79
  • 129
wrslatz
  • 403
  • 2
  • 8
  • 25
  • 1
    Does anyone know if there are any plans for the cucumber reporting project to add multi-project/multimodule support? – wrslatz Jun 16 '17 at 17:06

1 Answers1

1
  1. Yes you can generate reports in the main pom. But you have to put all your sub module json reports into common directory so that report plugin takes all json file in the directory and generate consolidated report. Current maven cucumber report plugin accepts only one file or directory as input. Make sure all sub modules reports are in the same folder as mentioned in the report plugin.
  2. Otherwise we can generate the report in the last module using report API. But you should put last module is depend on all previous modules.
  3. If you put child module to generate report then make sure all other modules are generated the json reports before executing the child module.
Murthi
  • 5,299
  • 1
  • 10
  • 15
  • 3
    Would you mind posting a quick example of the syntax if you have a good example available? I think I know how to place the cucumber.json files in a common folder under the parent project, but how do I configure maven to run the maven-cucumber-reporting plugin after all underlying modules have successfully built? – wrslatz Jun 14 '17 at 18:57