0

I have a project in Intellij, with step definitions spread over several classes. When I run my feature file, it will find the first step definition, but not the other ones (they are in a different class). If I move the other step definitions to that same class as the first step, then it finds them... I'm certain that step definitions for one feature file don't have to be in one single java class, ie it is possible to have step definitions spread over different classes. What am I missing?

Here is the project structure and runner:

1
  • I tried glue = "steps/com/dms" as well, same result. The only way I can get all the step definition of my feature file recognized is by moving all of them to the setup Commented Jan 29, 2020 at 22:42

1 Answer 1

1

Found the issue. Somehow the other classes didn't have the public keyword. This is a project moved from groovy to java, so the keyword wasn't needed in groovy and got forgotten in the transfer.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.