问题:W/TestGrouping( 5476): Invalid Package: '' could not be found or has no tests
原因:在写testcase时,没有指名具体的被测包名和包中的主class。
解决方法:
public class RootActivityTest extends AthrunTestCase{
private static final String TAG = "MainActivityTest";
public RootActivityTest() throws Exception {
super("com.gorillalogic.monkeytalk.demo1", "com.gorillalogic.monkeytalk.demo1.RootActivity");
AthrunTestCase.setMaxTimeToFindView(10000);
}
.........................................
}
注意:没创建一个TestCase(继承ActivityInstrumentationTestCase2),在构造函数中都需要指明被测包名(红色部分)和被测主类(绿色部分)。