The only thing I could think of is to create a specialization of
InstrumentationTestRunner that will process the
extra com.myApplication.myProperty arguments. The "-e" arguments get passed
as key-value pairs into the bundle parameter in the onCreate method of the
test runner. You would need to override the onCreate method to process the
extra arguments (but make sure you call super.onCreate() so the tests
actually get run.

Brett.


On Wed, Mar 3, 2010 at 7:00 AM, torre <[email protected]> wrote:

> Hello,
>
> I use the following instrumentation testrunner command line to run
> JUnit tests on my project :
> adb shell am instrument -w -e class com.myApplication.test.AllTests
> com.myApplication.test/android.test.InstrumentationTestRunner and it
> runs OK.
>
> I am now trying to pass a property value argument to my
> instrumentation test runner, something equivalent to the eclipse vm
> argument -Dcom.myApplication.myProperty="String"
> The value ("String") of a property (com.myApplication.myProperty) must
> be defined in the command line.
> I tried to bend my command line to make this work, changing it for
> example into :
>
> adb shell am instrument -w -e class com.myApplication.test.AllTests
> com.myApplication.test/android.test.InstrumentationTestRunner -e
> com.myApplication.myProperty "String"
>
> but didn't manage to make it work correctly.
>
> Is there a way to make this work ?
>
> Thanks in advance,
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Reply via email to