Maven cucumber reporting with multi-module maven project

不羁的心 提交于 2019-12-11 03:55:53

问题


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!


回答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.


来源:https://stackoverflow.com/questions/44550153/maven-cucumber-reporting-with-multi-module-maven-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!