thej
thej

Reputation: 648

error in junit testing

junit.framework.AssertionFailedError: Class com.android.deviceintelligence.test.Testshutdown has no public constructor TestCase(String name) or TestCase()
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:529)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1448)

thanks for the help in advance.I am fully stuck with this error so please help me.

Upvotes: 1

Views: 1357

Answers (2)

user2128396
user2128396

Reputation: 1

if your Testshutdown extends ActivityInstrumentationTestCase2 you have to setup a public default Construtor and call within super(Testshutdown.class).

Upvotes: 0

pleerock
pleerock

Reputation: 18846

try to add one another constructor:

public Testshutdown() {
        super("", YourActivity.class);
}

Upvotes: 3

Related Questions