I don't know of a way to run all tests on the main thread. But you can annotate test methods of an InstrumentationTestCase with @UIThreadTest to force them to run on main thread.
http://developer.android.com/reference/android/test/UiThreadTest.html Regards, Brett. On Fri, Feb 19, 2010 at 4:46 AM, Ewan Benfield <[email protected]> wrote: > Hi > > Can someone advise the am command (for adb shell) to run junit tests in the > main thread please? The following shows onStart etc running in the test > runner thread... > > am instrument -w -e class co.uk.telesense.tests.MyTest > co.uk.telesense.tests/android.test.InstrumentationTestRunner > > Thanks! > Ewan > -- > Ewan Benfield > > http://www.telesense.co.uk > tel: 0845 643 5691 (+44 845 643 5691) > mob: +44 (0) 77859 26477 > > -- > 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

