[aerogear-dev] Android integration tests and modules

Summers Pittman supittma at redhat.com
Mon Aug 18 16:55:26 EDT 2014

On 08/18/2014 09:27 AM, Summers Pittman wrote:
> Ideally we would like to quit using the Robolectric Android stubs and
> begin using Google's Android APIs for linking and testing.  This is one
> of the reasons that the unit tests havn't been brought over to the
> modules YET.  Over the weekend (between family duties and internet
> issues) I did a lot of research and coding towards moving our tests into
> the module packages.  With the release of X86 emulators and stability
> Genymotion, I think that using solely integration test projects for our
> testing is now doable.
> The Android SDK (current, ANT/Eclipse based) way is to have a separate
> test project.  The Android SDK (future Gradle based) way is to have your
> tests in a test package.  The maven way (Maven based Android builds) is
> to have a parent project with two children: one child being code and the
> other child being tests.
> Currently we have one BIG integration test project which contains all of
> our integration tests.  I think that we should move the tests out of our
> monolithic project and into the modules where they probably belong.  I
> also propose that we make each module in the two child project pattern
> that then Maven based builds recommend.  When it is time to move to
> Gradle then we can just fiddle with sourceSets and kill the Maven build.
> Wdyt?

Here is an example of what I think things should be like.  (Still a bit 
of a work in progress).


To build the parent project you need a adb device connected to run the 
tests.  If you prefer you can just build the library subproject.  
Perhaps there should be a different way to skip testing?

Summers Pittman
>>Phone:404 941 4698
>>Java is my crack.

More information about the aerogear-dev mailing list