See issue #102
Do not crash when there are abstract classes with cucumber annotations
On further investigation, this may not be desirable to merge at this time, since there are currently other more fundamental issues that prevent abstract stepdef classes from being usable. (Specifically, when multiple features are run in a single junit run, stepdefs from other packages are not completely cleared out of the picocontainer, causing injections to fail when building the world if there are multiple subclasses of an abstract stepdefs class.)
Yes, I'm very sceptical about inheritance and abstract classes in general, and especially for stepdefs.
I think the solution is to document this better, so that people who are inclined to use inheritance can learn how to use delegation and dependency injection instead.
We have encountered this (or similar) issue when we tried to create base class with @before method to initialize / reset mocks. When cucumber discovered inherited method in our step def class, it tried to instantiate declaring class for it.
Not sure what would be the reason why cucumber would specifically try to instantiate declaring class. Seems like a bug.
It would benefit us if this issue will be fixed.
Please open a new ticket with: