import static org.junit.jupiter.api.Assertions.fail;
import org.junit.jupiter.api.Test;
public class TryTest {
@Test
public void test1() throws Exception {
}
@Test
public void test2() throws Exception {
}
@Test
public void test3() throws Exception {
fail();
}
}
Run the test in a test plug-in as a JUnit plugin test. The third test will fail. Select the Run failed tests first button in the JUnit test view and run again. The test3() will be run first and the message on the console will be something like TryTest (Failed Tests first). If the regular Rerun button is used, the tests will be run in regular order (i.e. not test3 first) but the message on the console will still end in (Failed Tests first).
For the following test:
Run the test in a test plug-in as a JUnit plugin test. The third test will fail. Select the Run failed tests first button in the JUnit test view and run again. The test3() will be run first and the message on the console will be something like TryTest (Failed Tests first). If the regular Rerun button is used, the tests will be run in regular order (i.e. not test3 first) but the message on the console will still end in (Failed Tests first).