Specify the feature file location in cucumber

后端 未结 5 1647
暖寄归人
暖寄归人 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:08

    I found the solution,

    there is the @Cucumber.Options annotation, among setting the report output format and location, it also allows setting the location for the feature files.

    @Cucumber.Options(
        format = {
            "pretty",
            "html:target/cucumber-html-report",
            "json-pretty:target/cucumber- report.json"
        },
        features="features/"
    )
    

提交回复
热议问题