This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 214240

Summary: Junit re-run failed runs all tests when compile on save is disabled
Product: projects Reporter: everflux <everflux>
Component: MavenAssignee: Milos Kleint <mkleint>
Status: RESOLVED DUPLICATE    
Severity: normal CC: mmirilovic
Priority: P2    
Version: 7.2   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description everflux 2012-06-14 20:55:55 UTC
[ BUILD # : 201206140001 ]
[ JDK VERSION : 1.7.4 ]

Maven based project, compile on save is disabled.
Junit 4 based test file (@Test), run file with right click "test file".
14 test cases are executed, one fails.
When clicking on the "re run failed" again 14 tests are executed which includes
the failed test and 13 which do not fail.
Comment 1 everflux 2012-06-14 20:59:29 UTC
Additional remark: After turning on the compile on save for test and application code I have to "clean and build" the project in order to get the expected behavior.
Comment 2 everflux 2012-06-16 21:59:40 UTC
Bug is still present in 7.2rc1 / 201206141830
Comment 3 Theofanis Oikonomou 2012-06-18 10:47:08 UTC
I followed your steps but in NetBeans IDE Dev (Build 20120618-3730c20bc2c7) I get that no tests are executed after invoking Rerun failed. From gsf.testrunner the failed test methods are passed correctly to the implementation in JUnitOutputListenerProvider. Could you please evaluate. Thank
you
Comment 4 Milos Kleint 2012-06-18 12:48:22 UTC
if I take the example project from issue 214334, and Run test on CalculatorTest, the following is executed.

mvn -Dtest=teststorun.CalculatorTest test-compile surefire:test

one test fails, one test passes.

clicking Rerun failed executes this:

mvn -Dtest=teststorun.CalculatorTest#testDivide test-compile surefire:test

and correctly executes the 1 failing test only.

when I modify the IfaceTest to have 1 passing and 2 failing tests, Re-running shows no tests being executed which is bug 214334.

in that sense it's either duplicate of 214334 or workforme resolution. Can you attach a sample project demonstating the problem?
Comment 5 Milos Kleint 2012-06-20 07:06:45 UTC
duplicate of issue 214334

*** This bug has been marked as a duplicate of bug 214334 ***