Karate Cucumber reports in Junit 4 without parallel execution

让人想犯罪 __ 提交于 2021-02-13 17:30:52

问题


I'm using Karate with Junit 4.

I have one suite:

@RunWith(Suite.class)
@SuiteClasses({ ExampleRunner1.class, ExampleRunner2.class })
public class ExampleSuiteIT {}

and runners like this:

@RunWith(Karate.class)
@KarateOptions(tags = {"~@ignore"})
public class ExampleRunner1 {}

I want to generate a cucumber.json file to use some report tool like Cluecumber

Is it mandatory to use the parallel execution to generate Cucumber reports? I saw the implementation of DemoTestParallel and there is a lot of code there. I'm trying to avoid code in my suite class and also I don't need parallel execution.

Thanks in advance.


回答1:


Is it mandatory to use the parallel execution to generate Cucumber reports

Using the Runner class is mandatory to generate the Cucumber JSON files. If you don't want parallel execution, use a thread count of 1. Then it is up to you what you want to do with the JSON files.



来源:https://stackoverflow.com/questions/63005586/karate-cucumber-reports-in-junit-4-without-parallel-execution

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