首页 > 解决方案 > JUnit 4禁用'没有找到匹配的测试'错误

问题描述

有人可以告诉我是否可以禁用No tests found matchingJUnit 4.12 中的错误?下面是例外

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.003 sec <<< FAILURE!
initializationError(org.junit.runner.manipulation.Filter)  Time elapsed: 0.005 sec  <<< ERROR!
java.lang.Exception: No tests found matching *com.vnera.common.testcategories.IntegrationTest from org.junit.runner.Request$1@1fd386c3
    at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:40)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
    at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:62)
    at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:139)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
    at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

标签: javajunit4

解决方案


推荐阅读