There's no support for this at this time, though we do want to support it.

On Tue, Apr 22, 2014 at 2:40 AM, Matt Turner <[email protected]> wrote:

> Hi all,
>
> I'm trying to get android tests to run conditionally in gradle.
>
> Our Android tests run on real devices.
> We have some tests specifically for Handset, others for Tablet, and some
> common tests.
> I'd like to be able to tell gradle to exclude either the Handset tests, or
> the Tablet tests - depending on which device we're testing on.
>
> So far, using gradle 1.10, I have the full test suite running using the
> following
> (note, we have a non-standard directory layout which I can't change for
> the moment)
>
>     androidTest {
>         manifest.srcFile 'test/AndroidManifest.xml'
>         java {
>             srcDir = 'test/src'
>         }
>         assets.srcDirs = ['test/assets']
>     }
>
> This works fine, when I run gradle connectedCheck all of the tests run.
>
> However, if run on a phone the tablet specific tests will fail, and
> vice-versa.
> How can I set things up to conditionally exclude some tests ?
>
> I'd like to be able to do something like
>   gradle handsetTest
>
> or alternatively:
>   gradle -Ptype=handset connectedCheck
>
> which would exclude all the tablet tests from the androidTest source set.
>
> --
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



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

Please do not send me questions directly. Thanks!

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to