java - How to link feature and step definition in cucumber -
java - How to link feature and step definition in cucumber -
i'm new cucumber java , had problem in initial stages: i'm not using maven project reason. created simple java project in eclipse.
i have features under "src/dummy/pkg/features", , implementation "stepdef.java" under "src/dummy/pkg/features/implementation"
i have written step definitions given, when, , then, when run features file, unable recognize implementation. how link features step definitions?
create class yourclass
, below , run junit test.
@runwith(cucumber.class) @cucumberoptions( monochrome = true, features = "src/dummy/pkg/features/", format = { "pretty","html: cucumber-html-reports", "json: cucumber-html-reports/cucumber.json" }, glue = "your_step_definition_location_package" ) public class yourclass { //run maven or junit }
java cucumber cucumber-jvm cucumber-junit
Comments
Post a Comment