【发布时间】:2017-03-13 15:24:52
【问题描述】:
我想从这个特性文件中提取测试类:
Feature: Access seleniumframework.com website
Use selenium java with cucumber-jvm and navigate to website
Scenario: Print title, url
When I open seleniumframework website
Then I validate title and URL
这是带有黄瓜的 Run 类
package step_definitions;
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(
features = "classpath:features",
plugin = {"pretty", "html:target/cucumber-html-report"},
tags = {}
)
public class RunCukesTest{
}
【问题讨论】:
-
您能解释一下您要达到的目标吗?如果您是自动化新手,可以参考stackoverflow.com/questions/41340252/…
-
是的,我是新的自动化,实际上我正在尝试从功能文件中提取类步骤定义代码
标签: java junit cucumber cucumber-jvm