I have a simple Junit 5 Siute with @BeforeAll and @AfterAll annotation. The Suite is executed but these methods are not executed before and after all classess are executed.
package demo;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;
@Suite
@SelectClasses({ demo.TestDemoClass1.class, demo.TestDemoClass2.class })
public class TestSuite {
@BeforeAll
public static void start() throws Exception {
System.out.println("Before All from Suite1");
}
@AfterAll
public static void end() throws Exception {
System.out.println("After All from Suite1");
}
}`