目前,當(dāng)嘗試通過命令行窗口運(yùn)行測試時(shí),以下命令可以工作,但是自從從 info.cakes 更新到 io.cucumber 后,它似乎不再工作了?mvn test -Dcucumber.options="--tags @login"異常消息:Sep 17, 2019 5:18:37 PM cucumber.runtime.FeaturePathFeatureSupplier getWARNING: No features found at classpath:runners但是,直接從運(yùn)行程序類運(yùn)行測試是可行的:package runners;import io.cucumber.junit.CucumberOptions;import io.cucumber.junit.Cucumber;import io.cucumber.testng.AbstractTestNGCucumberTests;import org.junit.runner.RunWith;@RunWith(Cucumber.class)@CucumberOptions(features = { "classpath:features" }, glue = { "stepDefinitions"}, monochrome = true, tags = {"@login"}, dryRun = false, plugin = { "pretty", "html:target/cucumber", "json:target/cucumber.json"}) public class MainRunner extends AbstractTestNGCucumberTests {}黃瓜版本:<cucumber.version>4.7.2</cucumber.version>
1 回答

HUWWW
TA貢獻(xiàn)1874條經(jīng)驗(yàn) 獲得超12個(gè)贊
import io.cucumber.junit.CucumberOptions;
import io.cucumber.junit.Cucumber;
import io.cucumber.testng.AbstractTestNGCucumberTests;
import org.junit.runner.RunWith;
您正在混合 JUnit 和 TestNG。您應(yīng)該在單個(gè)類中使用 JUnit 或 TestNG。不是都。
添加回答
舉報(bào)
0/150
提交
取消