简体   繁体   English

在空手道中并行运行时,是否可以在运行器 window 的功能文件中查看场景?

[英]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.

相关问题 黄瓜功能并行执行的文件和方案 - Cucumber Feature Files and scenarios for parallel execution Cucumber 功能文件与空手道中的 Test Runner 文件有什么关系? - What is relation of Cucumber feature files with Test Runner file in Karate? Cucumber Runner 不会使用空手道加载所有功能文件 - Cucumber Runner doesn't load all feature files using Karate 我将 @parallel=false 保留在我的功能级别,并且场景没有并行执行,但所有功能文件都在并行执行 - I have kept @parallel=false at my feature level and scenarios are not executing parallel but all the feature files are executing parallel 使用 CLI 并行运行功能文件但在同一线程中运行场景? - Using CLI to run feature files in parallel but scenarios within same thread? 黄瓜-运行并行方案 - Cucumber - running parallel scenarios 在空手道的特定功能文件中的所有场景之后,如何执行相同的代码行? - How can I execute the same lines of code after all scenarios in specific feature files in Karate? 黄瓜测试方案并行运行? - Cucumber test scenarios running in parallel? Cucable 插件未并行运行场景 - Cucable Plugin not running Scenarios in parallel 并行运行 cucumber 功能文件中的场景,一次一个功能文件 - Run scenarios in a cucumber feature file in parallel, one feature file at a time
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM