空手道 - 两种测试的结果AREN' t在将版本从0.9.3升级到1.2.0之后再合并了
在将空手道项目从v0.9.3升级到v1.2.0之后,我们面临与测试结果有关的问题。执行两批后,我们正在测试API。因此,我们在第一次批次运行后在我们的API上执行了第一项测试(Runner 1),然后在第二批批次上执行了第二个系列测试(新功能文件上的Runner 2)。
在我们使用的版本上,测试结果合并,但在更新的版本上,我们无法实现同一报告中的所有结果:第一次运行的结果已删除,因此我们只剩下第二次运行。
以前工作的代码:
Results results1 = Runner.parallel(
Arrays.asList("@tag1,@tag2", "@ignore"),
Collections.singletonList("classpath:features"),
5,
"target/sources-rapports");
int totalFailCount = results1.getFailCount();
Results results2 = Runner.parallel(Arrays.asList("@tag3,@tag4", "@ignore"),Collections.singletonList("classpath:features"),5,"target/sources-rapports");
totalFailCount += results2.getFailCount();
generateReport(results2.getReportDir());
该报告将包含Resulte 1和Resulte2的所有测试功能2。鉴于现在,每个执行似乎都在生成新数据之前删除了先前的空手道JSON文件。
带有以下语法的新非工作代码:
Runner.path("classpath:features")
.tags(Arrays.asList("@tag1,@tag2", "@ignore"))
.outputCucumberJson(true)
.parallel(5);
我正在寻找帮助解决此问题的帮助。如果需要,请随时询问更多信息。
We are facing an issue related to the tests results after upgrading our Karate project from V0.9.3 to V1.2.0. We are testing an API after the execution of two batchs. Therefore we have a first series of tests (Runner 1) executed on our API after our first batch run, then a second series of tests (Runner 2 on new features files) executed ofter our 2nd batch.
On the version we were using, the tests results were merged but on the updated version, we cannot achieve to get all the results on the same report : the results of the first run are deleted so we’re left with only the results of the second run.
Previously working code :
Results results1 = Runner.parallel(
Arrays.asList("@tag1,@tag2", "@ignore"),
Collections.singletonList("classpath:features"),
5,
"target/sources-rapports");
int totalFailCount = results1.getFailCount();
Results results2 = Runner.parallel(Arrays.asList("@tag3,@tag4", "@ignore"),Collections.singletonList("classpath:features"),5,"target/sources-rapports");
totalFailCount += results2.getFailCount();
generateReport(results2.getReportDir());
The report would contain all test features of results1 and results2. Whereas now, each execution seems to remove previous karate json files before generating the new ones.
New non-working code with the following syntax :
Runner.path("classpath:features")
.tags(Arrays.asList("@tag1,@tag2", "@ignore"))
.outputCucumberJson(true)
.parallel(5);
I'm looking for help to solve this problem. Do not hesitate to ask for more informations if you need.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试此更改:
有关更多信息: https://stackoverflow.com/a/66685944/143475
Try this change:
For further info: https://stackoverflow.com/a/66685944/143475