1

Get main Activity from Application Object for jUnit test

view story
linux-howto

http://stackoverflow.com – I'm trying to set up some unit tests for my application and I need it to be set up the same way that the application runs on device. Is it possible to get the main activity (the one from the manifest listed under the Application) object from the Application object? @TestTargetClass(MyApplication.class) public class ApplicationTest extends ApplicationTestCase<MyApplication> { public ApplicationTest() { super(MyApplication.class); } private MyApplication application; @Override protected void setUp() throws Exception { super.setUp(); (HowTos)