I'm trying to order some class tests so Test_Class_1 will run before Test_Class_2. I saw a few post about Jupiter 5.8.0 can do it. It seems to be pretty straightforward, but could not make it work.
I'm following the documentation
https://junit.org/junit5/docs/current/user-guide/#overview
But I must be failing to see something
I have these two test class
@Order(1)
public class Test_1 {
@Test
public void test(){
System.out.println("TEST ONE");
}
}
and
@Order(2)
public class Test_2 {
@Test
public void test(){
System.out.println("TEST TWO");
}
}
I have the junit-platform.properties (in test/resources) with
junit.jupiter.testclass.order.default=org.junit.jupiter.api.ClassOrderer$OrderAnnotation
and a very simple pom.xml
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.8.0</version>
<scope>test</scope>
</dependency>
</dependencies>