Eclipse Photon doesn't recognize my Junit 5 tests for 'Run As'

Viewed 572

Assuming I have a simple test:

import org.junit.jupiter.api.Test;

public class MyTest {

    @Test
    public void test() {

    }

}

With only JUnit5 as a dependency

    <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-engine</artifactId>
        <version>5.2.0</version>
        <scope>test</scope>
    </dependency>

If I click 'Run as' on the class, it doesn't show up the usual 'JUnit test' option. If I manually add a run configuration, select the class and select the JUnit 5 runner, it runs properly.

But the 'run as junit test' option is just gone for classes, packages, projects.

Does it work for anyone?

0 Answers
Related