1

When I run a simple example like the eclipse plug-in test, I get the following error:

java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=test], {ExactMatcher:fDisplayName=test(ru.cft.platform.deployment.ui.plugin.reverse.qqq)], {LeadingIdentifierMatcher:fClassName=ru.cft.platform.deployment.ui.plugin.reverse.qqq,fLeadingIdentifier=test]] from org.junit.internal.requests.ClassRequest@310850ef
at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:40)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createFilteredTest(JUnit4TestLoader.java:80)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:71)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:46)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:522)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460)
at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:181)
at org.eclipse.pde.internal.junit.runtime.PlatformUITestHarness.lambda$0(PlatformUITestHarness.java:43)
at java.lang.Thread.run(Thread.java:745)

If I run the example as a normal junit test, then everything runs without problems.

What am I doing wrong? There is a need to run it through JUnitPlatform, to use the Suite.

Edit:

    package sss;

import static org.junit.jupiter.api.Assertions.fail;

import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.junit.platform.runner.JUnitPlatform;
import org.junit.runner.RunWith;
@RunWith(JUnitPlatform.class)
public class test {
    @Test
    @DisplayName("My First Test")
    public void test() {
        fail("Not yet implemented");
    }
}
  • In fact, the error inside is different, it falls on org.junit.platform.launcher.core.LauncherFactors with an error – Элина Саянова Mar 07 '18 at 04:53
  • Please post the actual code here on SO. An image is not useful for anyone trying to help you with your code. Please provide a Minimal, Complete, and Verifiable example https://stackoverflow.com/help/mcve – johnashu Mar 07 '18 at 04:54
  • In fact, the error inside is different, it falls on org.junit.platform.launcher.core.LauncherFactors with an error _Caused by: org.junit.platform.commons.util.PreconditionViolationException: Cannot create Launcher without at least one TestEngine; consider adding an engine implementation JAR to the classpath_ but library in classpath. a similar problem exists here https://stackoverflow.com/questions/48672051/junit5-platform-launcher-api-cannot-create-launcher-without-at-least-one-teste – Элина Саянова Mar 07 '18 at 05:00
  • Does following the example explained here https://www.eclipse.org/community/eclipse_newsletter/2017/october/article5.php help? – Sormuras Mar 07 '18 at 10:58

0 Answers0