Details
-
Wish
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
After running a particular module/project if the test fails even after rerunning it N specified times the subsequent modules fail automatically without running them.
Following is a use-case for this
import org.junit.Assert; import org.junit.Test; public class surefireTest { private static boolean flag = true; @Test public void test1() { Assert.assertTrue(flag); flag = false; } @Test public void test2() { test1(); } @Test public void test3() { test1(); } }
Running the above code using surefire using <forkCount>1</forkCount> & <rerunFailingTestsCount>3</rerunFailingTestsCount> should ideally be able to pass all the testcases, but in our case it is able to pass just testcase 1. Is it possible to have a completely isolated environment (free from pollution from other testcases) for all 3 testcases, that is as soon as a testcase fails, we kill the current fork and start a new fork and retry for the failed testcase and so on.
Please find the observed result attached below.
Thanks!