简体   繁体   English

引用父pom的目​​标文件夹以获取多模块Maven项目中的Cucumber报告

[英]Referencing parent pom's target folder for Cucumber reports in multi module maven projects

I have a multi module maven project for wich I generate Cucumber reports in each module. 我有一个多模块Maven项目,可以在每个模块中生成Cucumber报告。 Now I need to change the target location for the generated reports to the target folder in the root pom's directory. 现在,我需要将生成的报告的目标位置更改为root pom目录中的目标文件夹。 Is it posssible to do something like this? 可以做这样的事情吗?

@CucumberOptions(plugin = { "pretty", "html:path-to-parent-pom/target/testresult"})

For other reports generated with maven-project-info-reports-plugin there is a configuration option that solves this issue. 对于使用maven-project-info-reports-plugin生成的其他报告,有一个配置选项可以解决此问题。

<aggregate>true</aggregate> 

Is there something like this for Cucumber reports? 黄瓜报告是否有类似的内容?

You could use Json Report option in Cucumber and Json report will read by Maven. 您可以在Cucumber中使用Json Report选项,Maven将读取Json报告。 I think that's what I did. 我认为那是我所做的。 To allow Json option here is 要允许Json选项,这里是

 @CucumberOptions(plugin = { "pretty",
        "json:target/testresult.json" } 

and I used this plugin for configuration http://damienfremont.com/2015/07/30/how-to-cucumber-test-reporting-plugin-with-maven-and-java/ 我使用此插件进行配置http://damienfremont.com/2015/07/30/how-to-cucumber-test-reporting-plugin-with-maven-and-java/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM