本文介绍了空手道赛跑者在等待并行功能完成时挂起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Karate Runner 执行一些测试 -

I am trying to execute some tests using Karate Runner -

@KarateOptions(tags = {"~@ignore"})
//@KarateOptions(features = "examples/test.feature")
public class KarateTestRunner {
    @BeforeClass
    public static void beforeClass() throws Exception {
        //TestBase.beforeClass();
    }

    @Test
    public void testParallel() {
        Results results = Runner.parallel(getClass(), 5);
        generateReport(results.getReportDir());
        assertTrue(results.getErrorMessages(), results.getFailCount() == 0);
    }
}

当我尝试执行测试时:

-mvn test -Dtest=KarateTestRunner -DfailIfNoTests=false

它显示 -

{ ","type":"log","logger":"com.intuit.karate.Runner","thread":"main","level":"INFO","categories":[],"msg":"waiting for parallel features to complete ..." }

它挂在这里.没有日志.

And it hangs here. No logs.

谁能帮忙.

推荐答案

有一个 问题 (#1258) 与多线程有关.
当您尝试跑步时,有时 chrome websocket 会在空手道处理之前做出回应.

There was an issue (#1258) related with multi-thread.
When you try to run, sometimes chrome websocket answer back before the karate can handle that.

在 0.9.6 以后修复.

Fixed at 0.9.6 onward.

这篇关于空手道赛跑者在等待并行功能完成时挂起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 04:26