cucumber-android #525

merged 13 commits into from Jun 26, 2013


None yet

2 participants


cucumber-android is a module for Android compatibility. It's basically just a custom Android Instrumentation that can be used in an Android test-project instead of InstrumentationTestRunner.

I integrated the code from my other repository:

There's also a discussion about it here:!topic/cukes/Hpjy2Me9VcQ

Unfortunately I haven't found a way to implement normal unit-tests, since cucumber-android is an Android library project and also depends very much on the Android runtime (Context, .apk classpath, etc.).

I made, however, another another module for integration-testing, called android-test. It combines an Android application that uses the cucumber-android library with an Instrumentation Test that uses CucumberInstrumentation. I'm not sure if it should be put in examples/ instead of being a top-level module (it was easier to test for me the other way).


Sorry for taking so long to review this.

There is a lot of code that is copy-pasted from cucumber-java here. We have to get rid of that. @lmcgrath did some great work in #360 and #361 that might be useful.

I also want to get rid of the 3rd party ext.* code.

Finally - please rename all private fields according to existing coding conventions. We're not using the m prefix anywhere else.

I'll make some changes to the current cucumber-core/cucumber-java code that should make it easier to reuse rather than copy-paste.

@aslakhellesoy aslakhellesoy added a commit that referenced this pull request Jun 25, 2013
@aslakhellesoy aslakhellesoy Refactoring for #525. WIP. 51da5a8

I have made some progress refactoring this. Some cucumber-junit tests are failing because of the refactoring, but the android stuff seems to work fine.

I'll make some more changes in the initialisation code and fix the broken tests. Then we should be good for a merge!

See my work on the android branch.


Thank you for taking the time! I made some comments regarding the API level in the properties files in this commit: 51da5a8 (Eclipse and IDEA always seem to change those values automatically).

@aslakhellesoy aslakhellesoy merged commit 9aeb8f3 into cucumber:master Jun 26, 2013

1 check failed

default The Travis CI build could not complete due to an error

@mfellner hooray this is now on master! I managed to remove a lot of code. Don't feel bad about that - the refactorings I did to achieve that were deep into core, and hard to do without being very intimate with the code. On the flip side I would never have been able to do the android stuff on my own, so hats off.

The android stuff is also built on travis, and snapshot apk files are deployed along with regular jar snapshots. Well, it's building right now, so we'll see how it goes.

I still want to change/improve a few things, but what we have now is good enough for a first release. I'll create new issues for these things.

@mfellner would you be interested in being the core maintainer of the android module? If so, go ahead and edit

Great work!


This is really great news, thank you again for doing all the refactoring! I'd certainly be glad to continue to improve the android module. I'll edit the team page accordingly if I may. :)

Some people already showed a lot of interest in this thing – they're really going to be happy to hear cucumber-android is now officially integrated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment