黄瓜 + 并行测试.HTML 结果?黄瓜、结果、测试、HTML

2023-09-09 21:15:27 作者:下①站,幸福

我目前尝试为我们的 Cucumber + Watir-WebDriver 验收测试实现 parallel_tests.就目前而言,一切都很好.

I currently try to implement parallel_tests for our Cucumber + Watir-WebDriver acceptance tests. As far it goes great.

但是,我们已经习惯了来自 Cucumber 的精美 HTML 报告,其中嵌入了失败场景的屏幕截图.Cucumber 将报告创建为具有所有功能的单个 HTML 文件.但是使用parallel_tests,这个HTML文件被最后调用的Cucumber进程覆盖,因此不完整.

However, we got used to nice HTML reports from Cucumber with embedded screenshots of failed scenarios. Cucumber creates reports as a single HTML file with all the features. But with parallel_tests, this HTML file is overwritten with the last called Cucumber process and thus incomplete.

是否可以生成多个 HTML 报告或为每个功能文件生成 HTML 报告?

Is it possible to generate several HTML reports or generate HTML reports per features file?

推荐答案

Put

default: --format html --out report<%= ENV['TEST_ENV_NUMBER'] %>.html

./config/cucumber.yml 中.运行测试后,您会在项目根目录中找到 report.htmlreport2.html (...) 文件.

in ./config/cucumber.yml. Whey you run the tests, you will find report.html, report2.html (...) files in project root.