Specify the feature file location in cucumber

后端 未结 5 1650
暖寄归人
暖寄归人 2021-01-05 09:49

I have created some cucumber test steps and a small Cucumber test case, which I run with JUnit like so:

@RunWith(Cucumber.class)

public class FuelCarTest {
         


        
5条回答
  •  甜味超标
    2021-01-05 10:13

    You can use @CucumberOptions instead of @Cucumber.Options

    @RunWith(Cucumber.class)
    @CucumberOptions(
        format = "pretty",
        tags = {"~@Ignore"},
        features = "src/test/resources/com/"  //refer to Feature file
    )
    public class CucumberIT {  }
    

提交回复
热议问题