I'd like to use Behavior Driven Development (BDD) to develop an Android app. I'm thinking of using jBehave with Robolectric. Someone wrote about using jBehave with Robotium but does anyone know if Robolectric can be used instead of Robotium with jBehave?
Any known issues?
Robotiumis a tool for unit/acceptance testing on emulator or real device,Robolectricis library to unit test android code on desktop jvm. I think it would be possible to pairjBehavewithRobolectricbut again as for me it would be something that doesn't fit well.As example simple behaviour test on android:
Test on
Robotiumwill:Tests with
Robolectricare smaller:So you could try with
jBehavemap "see item details" toRobolectric“Intent fired” but this check is misleading because there so many things could happen from firing Intent to showing Activity with details. You could inRobolectricalso try to fire activity and check details but this level of mocking is too much for BDD which suppose to have as less mocking as possible.