JUnit4 - AssertionFailedError: No tests found

Ich bin mit AndroidJUnitRunner mit Espresso.

Schrieb ich einen einfachen test aber immer erhalten diese Ausnahme. Laut Stackoverflow Antworten, das problem ist, vermasselt die JUnit3 und JUnit4, aber ich habe noch nie verwendet JUnit3 in meinem Projekt.

junit.Rahmen.AssertionFailedError: No tests found in com.walletsaver.app.test.espresso.SignUpPopupTest

package com.walletsaver.app.test.espresso;

import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;

import com.walletsaver.app.activity.LoginActivity;

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

import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.matcher.ViewMatchers.withText;

@RunWith(AndroidJUnit4.class)
@SmallTest
public class SignUpPopupTest {

    @Rule
    public ActivityTestRule<LoginActivity> mActivityRule =
            new ActivityTestRule<>(LoginActivity.class);

    @Test
    public void checkSignUpPopup() throws Exception {
        onView(withText("Sign Up")).perform(click());
    }
}

Run configuration:
JUnit4 - AssertionFailedError: No tests found

Ausgabe:
JUnit4 - AssertionFailedError: No tests found

InformationsquelleAutor Val | 2015-12-22
Schreibe einen Kommentar