Having two instrumentation test sets

82 views
Skip to first unread message

Tiago Veloso

unread,
Jul 9, 2013, 7:27:29 AM7/9/13
to adt...@googlegroups.com
Is it possible to have 2 instrumentation test suites?

One suite would run with the debug APK and the other suite would run with a another BuildType APK.

Xavier Ducrohet

unread,
Jul 9, 2013, 11:47:21 AM7/9/13
to adt...@googlegroups.com
Not at the moment. If there's a strong need we could see to add it.

I'm interested about your use case. Could you tell us more?


On Tue, Jul 9, 2013 at 4:27 AM, Tiago Veloso <ti.v...@gmail.com> wrote:
Is it possible to have 2 instrumentation test suites?

One suite would run with the debug APK and the other suite would run with a another BuildType APK.

--
You received this message because you are subscribed to the Google Groups "adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

Malachi de AElfweald

unread,
Jul 9, 2013, 11:52:52 AM7/9/13
to adt...@googlegroups.com
In my case, our current multi-module project builds out a couple different APKs. I'd like to be able to run instrumentation tests against each of them. My understanding is that each AndroidManifest can only refer to one APK to instrument?
Thank you,
Malachi de Ælfweald
Sr. SDK Developer - Android

Xavier Ducrohet

unread,
Jul 9, 2013, 11:56:43 AM7/9/13
to adt...@googlegroups.com
Are those different APKs different apps or different builds (debug vs release ...) of the same app?

If the apps are different (using flavors) then you can already have different test app for each.

Tiago Veloso

unread,
Jul 9, 2013, 11:56:43 AM7/9/13
to adt...@googlegroups.com
I have a set of test cases running with Robotium.

Some test cases require the server DB to be flushed afterwards (CRUD actions), for that we built an embedded server with an in memory DB that gets flushed after each run.

However, some test cases require a connection to a server, which is impractical to set up as embedded. 

So I figure I could break my current test suite in two, one that would run with the APK configured with the embedded server, and the other would run with the APK configured with the real server.




--
You received this message because you are subscribed to a topic in the Google Groups "adt-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adt-dev/MxGwkLfW5TY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adt-dev+u...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Tiago Veloso

Xavier Ducrohet

unread,
Jul 9, 2013, 12:01:46 PM7/9/13
to adt...@googlegroups.com
yeah that makes sense. We'll have to see how we can support testing against different build types.

Tiago Veloso

unread,
Jul 9, 2013, 12:05:02 PM7/9/13
to adt...@googlegroups.com
They are different builds, let's say I have a build type "tested" (from my previous post), this build type uses the embedded server. And then I have the default build type "debug" which points to a "full" version of the server. 

I would like to be able to run a given test suite with the "tested" build type and another with the "debug" build type.


You received this message because you are subscribed to a topic in the Google Groups "adt-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adt-dev/MxGwkLfW5TY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adt-dev+u...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Tiago Veloso

Tiago Veloso

unread,
Jul 9, 2013, 1:37:03 PM7/9/13
to adt...@googlegroups.com
So this feature will be added? Cool. I am sure there are other more pressing issues at hand, but could you tell me estimate? If not it's Ok.

Thanks for the help and hard work. 

tim.ha...@grandcentrix.net

unread,
Jul 24, 2015, 12:18:23 PM7/24/15
to adt-dev, ti.v...@gmail.com

Hello,

how is the status? Are there plans to add this feature?

I'm testing with different testing frameworks. Each requires its own testInstrumentationRunner. Currently I edit the defaultConfig in the build.gradle to switch the instrumentation runner. 

Is it possible to switch the testInstrumentationRunner without editing the build.gradle or adding extra product flavours? Having testFlavours would be nice.

Thank you,
Tim


On Tuesday, July 9, 2013 at 7:37:03 PM UTC+2, Tiago Veloso wrote:
So this feature will be added? Cool. I am sure there are other more pressing issues at hand, but could you tell me estimate? If not it's Ok.

Thanks for the help and hard work. 


grandcentrix GmbH
Schanzenstrasse 6-20
51063 Köln, Deutschland

phone: +49 221 677 860 0

Amtsgericht Köln | HRB  70119 | Geschäftsführer: R. Rottmann, M. Willnow | USt.-IdNr.: DE266333969

Xavier Ducrohet

unread,
Jul 24, 2015, 12:36:14 PM7/24/15
to adt...@googlegroups.com, ti.v...@gmail.com
While we may add multiple instrumentation test sets inside module, this is not going to show up for a while (definitively not this yet).

However, 1.3 will have the ability to have separate test module, which will target any variant in another module. This should allow you to do what you need.

--
You received this message because you are subscribed to the Google Groups "adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tim Haussmann

unread,
Jul 24, 2015, 1:17:05 PM7/24/15
to adt...@googlegroups.com, ti.v...@gmail.com
Hello,

thank you for the quick answer. However, for me this raises several other questions.
Does 1.3.0-beta4 already support separate test modules?
Where can I find examples or documentation beside http://tools.android.com/tech-docs/new-build-system/gradle-experimental?
Is there an approximate release date for 1.3?

Thank you,
Tim

You received this message because you are subscribed to a topic in the Google Groups "adt-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adt-dev/MxGwkLfW5TY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adt-dev+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages