Cucumber JVM undefined step

霸气de小男生 提交于 2019-11-29 09:26:43
@RunWith(Cucumber.class)

@CucumberOptions(  monochrome = true,
                         tags = "@tags",
                     features = "src/test/resources/features/",
                       format = { "pretty","html: cucumber-html-reports",
                                  "json: cucumber-html-reports/cucumber.json" },
                        dryRun = false,
                         glue = "fr.tlasnier.cucumber" )

public class RunCucumber_Test {
  //Run this
}

I've met the same problem. And found that if the package where step definitions exists has not been created in the corresponding source folder. You can try to create a class under fr.tlasnier.cucumber.step, then idea should be able to find the steps. I think it is a bug in Idea.

The class in which the steps are defined should be public. Anything else would throw the undefined step error.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!