首页 > 解决方案 > 如何将我的黄瓜项目转换为并行运行?

问题描述

嗨,我目前有一个大型项目,我在其中运行我的黄瓜测试,我在晚上运行这些,但我发现 jenkins 构建在一个小时左右后不断中断,所以我现在想并行运行我的测试。

这可能与现有项目有关吗,我的项目在 src/test/java 目录中设置了功能文件、步骤、运行器等 在此处输入图像描述

我的测试跑步者看起来像这样

import io.cucumber.junit.CucumberOptions;
import io.cucumber.junit.Cucumber;
import org.junit.runner.RunWith;
import org.testng.annotations.DataProvider;

@RunWith(Cucumber.class)
@CucumberOptions(
    features = {"src/test/java/noting/feature_files/"},
    glue = {"noting.steps", "noting.hooks"},
    tags = {"@regression"},
    monochrome = true,
    plugin = {"pretty", "json:target/cucumber-report/cucumber.json", "rerun:target/rerun.txt"}
)

public class MainRunner {



}

有没有办法将其转换为并行运行,可能是通过注释或功能包?

标签: javaseleniumtestingjunitcucumber

解决方案


推荐阅读