JUnit testing got initializationError with java.lang.Exception: No tests found matching

后端 未结 8 1544
别那么骄傲
别那么骄傲 2021-01-01 18:59

When running JUnit testing , it gave an initializationError: No tests found matching. Like this:

prodapi-main-junit
initializationError(org.junit.runner.man         


        
8条回答
  •  太阳男子
    2021-01-01 19:38

    Had the same issue with PowerMock @RunWith(PowerMockRunner.class) then discovered that my @Test was the wrong implementation. Was using import org.junit.jupiter.api.Test;

    I switched to import org.junit.Test; and that fixed the problem for me.

提交回复
热议问题