Hars13
Hars13

Reputation: 11

Custom runner class AndroidJUnit4 should have a public constructor with signature AndroidJUnit4(Class testClass)"

I am trying to creating a privileged apk and have updated my Android.mk to set the privilege module to true. My apk is compiled on a linux build and not using Android Studio. I also have the following in my Test Code

When I push my apk to target and try to execute it the junit4 error is see

My Test.java has the following:

import android.support.test.filters.LargeTest;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import android.test.ActivityInstrumentationTestCase2;
import android.util.Log;

import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;

import org.junit.runners.JUnit4;
@LargeTest
@RunWith(AndroidJUnit4.class)
public class myTest {....}

My testActivity.java file has the following:

public class myTestActivity extends Activity implements {....}

My testRunner.java has the following:

public class myTestRunner extends AndroidJUnitRunner {...}

Expected results the test completes successfully and plays the video. But instead I see the error

Upvotes: 1

Views: 177

Answers (0)

Related Questions