Tell Cucumber where to find step definitions

Posted Over 10 years ago. Visible to the public. Repeats.

In case you want to organize your features in sub folders, you must tell Cucumber where to find step definitions for them, for that reason use --require flag. For example, your features located in folder features/awesome_staff/*.*, to run them do the following:

cucumber --require features features/awesome_staff

And Cucumber takes step definitions from folder features/step_definitions

konjoot
Last edit
Over 6 years ago
konjoot
Keywords
Cucumber, StepDefinitions
Posted by konjoot to wiki (2013-12-12 05:57)