I want to combine both Robolectric and Cucumber (JVM).
Currently I have two classes ActivityStepdefs
where two step definitions for activity management are defined.
My second class is RoActivity
Where for example an activity is created from it's class name, and where Robolectric will be used.
When I run RoActivityTest
using RobolectricTestRunner
the test in this class passes, but when I run RunCukesTest
(class for running features as junit test) the code from RoActivity
is not running as part of Robolectric, i.e. RunCukesTest
search for features on my project and match it with a method inside ActivityStepdefs
and finally this class will call a method from RoActivity
Is possible to run test with both junit both* runners?
I'm not sure but perhaps it's possible to do something like powermock, using junit rules.
In that case for which one should I have to define the rule?
*Cucumber and Robolectric