这是测试运行器的代码
package Runner;
import io.cucumber.junit.Cucumber;
import io.cucumber.testng.AbstractTestNGCucumberTests;
import io.cucumber.testng.CucumberOptions;
import org.junit.runner.RunWith;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeSuite;
@RunWith(Cucumber.class)
@CucumberOptions( monochrome = true,
features ="src/test/resources/Features/tc1",
glue = "HuntingtonGlue",
tags= "@tc1"
// dryRun = true
)
public class TestNgCucumberRunner extends AbstractTestNGCucumberTests {
@BeforeSuite(alwaysRun = true)
public void beforeSuiteApiBase() throws Exception {
if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")) {
try {
Runtime.getRuntime().exec("taskkill /F /IM chromedriver.exe.exe /T");
} catch (Exception e) {
e.printStackTrace();
}
}
}
跑步者无法找到测试步骤并给出以下错误
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':test'.
> No tests found for given includes: [Runner.TestNgCucumberRunner](filter.includeTestsMatching)
标签、特征文件和胶水类位置准确,感谢任何帮助。