eclipse-jdt / eclipse.jdt.ui

Eclipse Public License 2.0
35 stars 86 forks source link

Bug 202162 - [JUnit] Rerun tests after failure first run still says failure first in message but does not run failures first #1434

Closed jjohnstn closed 2 months ago

jjohnstn commented 2 months ago

For the following test:

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).