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?
Robotium
is a tool for unit/acceptance testing on emulator or real device,Robolectric
is library to unit test android code on desktop jvm. I think it would be possible to pairjBehave
withRobolectric
but again as for me it would be something that doesn't fit well.As example simple behaviour test on android:
Test on
Robotium
will:Tests with
Robolectric
are smaller:So you could try with
jBehave
map "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 inRobolectric
also 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.