Hey,

Just wondering if anyone has found a way to pass the command line parameter
'-e size small' to the Android JUnit test runner as configured through
eclipse. I'd rather work within eclipse than on the command line if
possible.

Cheers,

Gav

On Sat, Apr 11, 2009 at 11:21 PM, Gavin Aiken <gavin.ai...@imperial.ac.uk>wrote:

> Hi all,
>
> To build a test suite containing only small tests I looked at the source
> examples and found 
> SmallTests.java<http://www.google.co.in/codesearch/p?hl=en#SS2by_AKaLs/tests/src/com/android/email/SmallTests.java&q=android%20package:git://android.git.kernel.org%20SmallTests>in
>  the email app test source. I assumed that I would need to add a
> Predicate to such a class as this seems not to distinguish test sizes
> (Unless the test runner infers this from the name of the suite?).
>
> I could then add the predicate to a TestSuiteBuilder via 'addRequirements'
> but I couldn't work out how to build a predicate based on the annotation
> class SmallTest.
>
> Eventually I found the 
> InstrumentationTestRunner<http://developer.android.com/reference/android/test/InstrumentationTestRunner.html>documentation
>  and it seems that the command;
>
> adb shell am instrument -w -e size small
> com.android.foo/android.test.InstrumentationTestRunner
>
> Does the trick.
>
> I post this information for reference but also to ask if the former option
> is possible, i.e. if there is a simple predicate that I could create to
> isolate SmallTest annotated tests?
>
> Just for interests' sake :)
>
> Gav
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to