Cucumber Not Finding Step Definitions

Cucumber: Unable to find step definition

It looks like Cucumber isn't finding your step defintion class. In your unit test class you say:

 glue = {"com.macro.definition"}

However the step definition classes are in com.test.definition

Try changing that line to:

 glue = {"com.test.definition"}

You may have to rebuild your project to pick up the change.

Cucumber not finding step definitions

Try

cucumber spec/features/main_structure.feature -r spec/features

Step Definitions are not recognized while running cucumber tests from command prompt

Stepdefiniton classes should always reside in a package and under src\test\java folder.

Please create a package cucumberStep or something and move the class LoginSteps under that.

Code:

@CucumberOptions(features = "src\\test\\resources\\features", glue = { "cucumberStep", }, dryRun = false, plugin = { "pretty",
"html:report/TestReport.html", }, monochrome = true, stepNotifications = true, tags = "@Regression")

Cucumber-Why my step definition is not getting identified

I have found an answer!!
mistake was in a test runner file,while specifying a step definition path in glue we need to specify folder name not the test runner path,

Changed glue to

glue = {"com.mavenDemo" }

Thanks.

Cucumber with IntelliJ not finding step definitions

I finally found the solution to my question. The error was caused by a plugin called Substep IntelliJ Plugin. You need to search for it in the IntelliJ Plugin Section and disable or deinstall it.



Related Topics



Leave a reply



Submit