1
我有多個需要單獨運行的api版本。有時API測試會是一樣的,有時候它們會有所不同。針對不同的API版本運行多個測試套件
@v1 @v2
Scenario: the api is the same for v1 and v2
@v2
Scenario: v2 specific test
我設置的API版本爲每個標籤
@Before("v1")
public void signupSetup(){
World.api("v1");
}
@Before("v2")
public void signupSetup(){
World.api("v2");
}
我可以配置所有@ V1標籤這樣運行。我如何讓v2測試分開運行?
@RunWith(Cucumber.class)
@CucumberOptions(glue = {"my.package.cucumber", "cucumber.api.spring"}, tags = {"v1"})
public class CucumberTestV1 {
}