Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Selenium webdriver 如何结合Cucumber jvm并行插件使用Cucumber ReTry Runner_Selenium Webdriver_Cucumber Junit - Fatal编程技术网

Selenium webdriver 如何结合Cucumber jvm并行插件使用Cucumber ReTry Runner

Selenium webdriver 如何结合Cucumber jvm并行插件使用Cucumber ReTry Runner,selenium-webdriver,cucumber-junit,Selenium Webdriver,Cucumber Junit,我使用cucumber jvm并行插件,在运行时为基于Java cucumber的测试生成动态运行程序 <artifactId>cucumber-jvm-parallel-plugin</artifactId> <version>4.2.0</version> 对于独立测试,我们有一个名为ReTry Runner的东西,它可以在当前测试完成后触发 <artifactId>cucumber-jvm-parallel-plugin<

我使用cucumber jvm并行插件,在运行时为基于Java cucumber的测试生成动态运行程序

<artifactId>cucumber-jvm-parallel-plugin</artifactId>
<version>4.2.0</version>
对于独立测试,我们有一个名为ReTry Runner的东西,它可以在当前测试完成后触发

<artifactId>cucumber-jvm-parallel-plugin</artifactId>
<version>4.2.0</version>
    @RunWith(Cucumber.class)
    @CucumberOptions(
        plugin = {"listners.ExtListner",
                "html:target/cucumber-html-report",
                "json:target/cucumber.json"}
        ,features = {"@target/rerun.txt"}
        , format = {"pretty", "html:target/cucumber-html-report-retry"}
        , glue = {"stepDefs"}
        ,strict = false
)
public class IOSReTryRunner {
    private static boolean dunit = false;

    @BeforeClass
    public static void setup() throws IOException, AWTException {
        // Initiates the extent report and generates the output in the output/Run_<unique timestamp>/report.html file by default.
        ExtListner.initiateExtentCucumberFormatter();
        // Loads the extent config xml to customize on the report.
        ExtListner.loadConfig(new File("src/main/resources/features/extent-config.xml"));

        // User can add the system information as follows
        ExtListner.addSystemInfo("Browser Name", "<Name>");

        // Also you can add system information using a hash map
        Map systemInfo = new HashMap();
        systemInfo.put("Cucumber version", "v1.2.3");
        systemInfo.put("Extent Cucumber Reporter version", "v1.1.1");
        ExtListner.addSystemInfo(systemInfo);
    }

    @AfterClass
    public static void teardown() throws IOException, NoSuchFieldException {
        System.out.println("Ran the tearDown.");
//        WebDriverFactory.getInstance().closeAppiumDriver();

    }
}
有没有任何方法可以使用上述cucumber jvm并行插件为自动生成的运行程序使用相同的机制?

cucumber jvm并行插件是一个代码生成器。您可以通过maven配置中的customVmTemplate为其提供自定义虚拟标记模板

<artifactId>cucumber-jvm-parallel-plugin</artifactId>
<version>4.2.0</version>
有关支持的内容的参考,请查看内置模板:

<artifactId>cucumber-jvm-parallel-plugin</artifactId>
<version>4.2.0</version>

感谢您提供简短的提示。要完全实现它,我需要更多的帮助。普通cucumber java runner在下面的输出目录html:target/cucumber html report retry中创建重试报告,正如在cucumber选项中添加的一样:。rerun:target/rerun.txt然后使用原始问题中提到的另一个运行程序,我只能运行失败的案例。所以,在并行运行程序插件的情况下,我们应该如何聚合失败的测试。您是否有示例代码段?非常感谢