Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 214240 - Junit re-run failed runs all tests when compile on save is disabled
Junit re-run failed runs all tests when compile on save is disabled
Status: RESOLVED DUPLICATE of bug 214334
Product: projects
Classification: Unclassified
Component: Maven
7.2
PC Linux
: P2 (vote)
: 7.3
Assigned To: Milos Kleint
issues@projects
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-14 20:55 UTC by everflux
Modified: 2012-06-20 07:06 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo