JUnit5 version:5.11.1
code:
class HelloWorldTest {
@BeforeAll
public static void beforeAll() {
System.out.println("BeforeAll...");
}
@RepeatedTest(2)
void test() {
System.out.println("test execute");
}
@RepeatedTest(2)
void test1() {
System.out.println("test1 execute");
}
@AfterAll
public static void afterAll() {
System.out.println("AfterAll..."); }
}
Console output:
test execute
test execute
test1 execute
test1 execute
BeforeAll...
AfterAll...