如何从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 官宣新年祝福语简短