[英]Is it possible to see scenarios in feature files in the runner window while running parallel in karate?
When I run my tests with a parallel runner, I can't see scenarios in the feature files in which one failed or successful.当我使用并行运行器运行测试时,我无法在功能文件中看到失败或成功的场景。 I want to see these scenarios on the runner window in IntelliJ Idea.我想在 IntelliJ Idea 的跑步者 window 上看到这些场景。 I am using parallel runner for cucumber reports.我正在为 cucumber 报告使用并行运行器。
Here is my code这是我的代码
@Test
public void testParallel() {
List<String> features = Arrays.asList("classpath:features");
Results results = Runner.path(features)
.outputCucumberJson(true).tags("~@ignore")
.karateEnv("deee")
.parallel(1);
generateReport(results.getReportDir());
assertTrue(results.getErrorMessages(), results.getFailCount() == 0);
}
public static void generateReport(String karateOutputPath) {
Collection<File> jsonFiles = FileUtils.listFiles(new File(karateOutputPath), new String[] {"json"}, true);
List<String> jsonPaths = new ArrayList<>(jsonFiles.size());
jsonFiles.forEach(file -> jsonPaths.add(file.getAbsolutePath()));
Configuration config = new Configuration(new File("target"), "deee");
ReportBuilder reportBuilder = new ReportBuilder(jsonPaths, config);
reportBuilder.generateReports();
}
The parallel runner does not integrate with the IDE view.并行运行器不与 IDE 视图集成。 It is designed for CI execution.它专为 CI 执行而设计。
This other answer may explain the difference and why: https://stackoverflow.com/a/65578167/143475这个其他答案可以解释差异和原因: https://stackoverflow.com/a/65578167/143475
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.