目前,当尝试通过命令行窗口运行测试时,以下命令可以工作,但是自从从 info.cakes 更新到 io.cucumber 后,它似乎不再工作了?
mvn test -Dcucumber.options="--tags @login"
异常消息:
Sep 17, 2019 5:18:37 PM cucumber.runtime.FeaturePathFeatureSupplier get
WARNING: No features found at classpath:runners
但是,直接从运行程序类运行测试是可行的:
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>
HUWWW
相关分类