Karate Runner hangs at waiting for parallel features to complete

喜你入骨 提交于 2021-01-19 02:35:07

问题


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);        
    }
}

When I try to execute my tests:

-mvn test -Dtest=KarateTestRunner -DfailIfNoTests=false

It displays -

{ ","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.

Can anyone please help.


回答1:


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.

Fixed at 0.9.6 onward.




回答2:


We did have an issue in 0.9.4 - so can you try with 0.9.5.RC5 and confirm.

Here is the issue: https://github.com/intuit/karate/issues/967



来源:https://stackoverflow.com/questions/60067882/karate-runner-hangs-at-waiting-for-parallel-features-to-complete

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!