My app is a Service that runs in /system/app
com.abc.def.MyApp
Trying to write unit tests for it, I get this error in the logcat while running.
I/TestGrouping( 5647): TestCase class com.abc.def.test.MyAppTest is missing a public constructor with no parameters or a single String parameter - skipping
command used:
D:\tmp_install>adb shell am instrument -w com.abc.def.test/android.test.InstrumentationTestRunner
WARNING: linker: memtrack.jacinto6.so: unused DT entry: type 0xf arg 0x115
WARNING: linker: libsrv_um.so: unused DT entry: type 0xf arg 0xc4e
WARNING: linker: gralloc.jacinto6.so: unused DT entry: type 0xf arg 0x5d9
WARNING: linker: libpvr2d.so: unused DT entry: type 0xf arg 0x778
Test results for InstrumentationTestRunner=
Time: 0.0
OK (0 tests)
My snippet of code is:
public class MyAppTest extends ServiceTestCase<MyApp> {
public MyAppTest(Class serviceClass) {
super(serviceClass);
Log.d(tag, "hello world! MyAppTest ctor");
}
public MyAppTest() {
super(com.abc.def.MyApp.class);
}
....
I have followed this answer https://stackoverflow.com/a/8981508/398348
Am I using ServiceTestCase incorrectly?