简体   繁体   English

合并来自不同黄瓜HTML报表的结果

[英]Merging results from different Cucumber HTML Reports

When running our test suite we perform a re-run which gives us 2 HTML reports at the end. 当运行我们的测试套件时,我们执行一次重新运行,最后给我们2个HTML报告。 What I am looking to do is have one final report so that I can then share it with stakeholders etc. 我要做的是拥有一份最终报告,以便与利益相关者等分享。

Can I merge the 2 reports so that in the first run a test had failed but in the second run it had passed, the report shows the test has passed? 我可以合并两个报告,以便在第一次运行中测试失败,但在第二次运行中通过测试,则报告显示测试已通过?

I basically want to merge the reports to show a final outcome of the test run. 我基本上想合并报告以显示测试运行的最终结果。 Thanks 谢谢

By only showing the report that passed you'd be throwing away a valuable piece of information: that there is an issue with the test suite making it flaky during execution. 通过仅显示通过的报告,您将丢掉一些有价值的信息:测试套件存在问题,使其在执行期间不稳定。 It can be something to do with the architecture or design of a particular test, or maybe the wait/sleep periods for some elements. 这可能与特定测试的体系结构或设计有关,或者与某些元素的等待/休眠时间有关。 Or, in some cases, the application we're testing has some sort of issue that a lot of times goes unchecked. 或者,在某些情况下,我们正在测试的应用程序会遇到很多问题,很多时候都无法检查。

You should treat a failing report with as much respect as a passing one. 您应该将失败的报告与通过的报告一样重视。 I'd share with the stakeholders both reports and a short analysis of why the tests are failing in the first one(s), or why do they usually fail, and a proposal/strategy to fix the failure. 我将与利益相关者分享报告和简短分析,以解释为什么测试在第一个测试中失败,或者为什么它们通常会失败,以及解决失败的建议/策略。

Regarding the merging of the reports, it can be done. 关于报告的合并,可以完成。 You can, via a script that takes both reports, maybe extract the body of each, and, element by element only do a copy the passing one if the other is failing, or if both are failing, copy a failing one. 您可以通过同时接收两个报告的脚本,提取每个报告的正文,并且仅在另一个失败的情况下逐个元素地复制通过的报告,或者如果两个失败,则复制一个失败的报告。 But it looks like that would be an effort to hide a possible problem, and not to fix it from the ground up. 但是,这似乎是在隐瞒可能的问题,而不是彻底解决问题。

Edit: 编辑:

There is at least one lib that can help you achieve this, ReportBuilder , or the Java equivalent: ReportBuilderJava . ReportBuilder或Java等效项至少有一个可以帮助您实现此目的的库: ReportBuilderJava

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

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