6

问题是关于 Maven 中的黄瓜格式选项:

在每个 Junit 中,我都有类似的东西:

@Cucumber.Options(format = { "pretty", "html:target/cucumber-html-report/foo" })

我在 pom 文件中添加了以下选项:

  <properties>
    <cucumber.options> --format html:target/cucumber-html-report/allFoos</cucumber.options>     
  </properties>

生成的报告只有最后一次执行。

有没有办法做一个“追加”?

4

1 回答 1

0

Your issue is that when cucumber runs a junit runner file it opens or creates the specified html report file you reference in the runner file. Since cucumber has no idea what each and every test runner plans on writing to when it runs, it overwrites the file if it is used by multiple test runners. There is no append that you could add to have all of your test runs write to a single file. Your best option (and best practice) is to have each junit test runner write to an individual file, with a name that is descriptive of what the test suite is testing.

于 2014-02-04T22:15:55.703 回答