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");
    }
}
4
  • In fact, the error inside is different, it falls on org.junit.platform.launcher.core.LauncherFactors with an error Commented Mar 7, 2018 at 4: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 stackoverflow.com/help/mcve Commented Mar 7, 2018 at 4: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 stackoverflow.com/questions/48672051/… Commented Mar 7, 2018 at 5:00
  • Does following the example explained here eclipse.org/community/eclipse_newsletter/2017/october/… help? Commented Mar 7, 2018 at 10:58

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.