如何从Cucumber中执行跳过特定的测试方法?
借助功能文件中场景的标记,我们可以跳过在Cucumber中执行的特定测试方法。
示例
功能文件。
@Regression Feature: Invoice Testing @Smoke Scenario: Login Verification Given User is in Home Page @Payment Scenario: Payment Testing Given User is in Payment Page
具有方案的特征文件,其中方案具有标签烟和付款。
示例
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import cucumber.api.testng.AbstractTestNGCucumberTests;
@RunWith(Cucumber.class)
@CucumberOptions(
features = “src/test/java/features”,
glue = “stepDefiniations”
tags = { “~@Payment”}
)要跳过使用@Payment的方案,在TestRunner文件中,在@Payment标记之前放置〜。
热门推荐
10 财运虎年祝福语简短语
11 单亲爸爸春节祝福语简短
12 狗狗上厕所训练
13 植物种植祝福语简短
14 翻译考试祝福语朋友简短
15 个人周年庆简短祝福语
16 狗狗怎么训练
17 分别祝福语简短搞笑英文
18 生日广州男生祝福语简短