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 73933 - JUnit window pops up after running Ant 'test' target
Summary: JUnit window pops up after running Ant 'test' target
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: JUnit (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Marian Petras
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-23 17:41 UTC by Sherold Dev
Modified: 2006-10-23 16:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sherold Dev 2006-03-23 17:41:12 UTC
I have an Ant script with a target named "test", "test1", etc. After running
this target the JUnit Test Result window is automatically opened, even if my
target has nothing to do with JUnit tests... it is quite annoying.
Comment 1 Marian Petras 2006-05-26 20:48:05 UTC
This is due to the mechanism of recognizing "testing Ant targets". Test targets
are currently recognized by name.

It will be changed. Names of Ant targets will not be taken into account.
Comment 2 Marian Petras 2006-05-26 21:17:16 UTC
Fixed in the trunk.

The unreliable mechanism recognizing test targets by their names was replaced
with a new mechanism which recognizes test _tasks_ by their names and structure.

Modified files:
src/org/netbeans/modules/junit/output/JUnitOutputReader.java   (1.19)
src/org/netbeans/modules/junit/output/junit-test-results.settings   (1.2)
src/org/netbeans/modules/junit/output/TaskType.java   (1.1 - initial revision)
src/org/netbeans/modules/junit/output/junit-test-results.wstcref   (1.2)
src/org/netbeans/modules/junit/output/AntSessionInfo.java   (1.3)
src/org/netbeans/modules/junit/output/Manager.java   (1.10)
src/org/netbeans/modules/junit/output/JUnitAntLogger.java   (1.14)
nbproject/project.properties   (1.8)

Diffs:
http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/JUnitOutputReader.java?r1=1.18&r2=1.19&diff_format=u
http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/junit-test-results.settings?r1=1.1&r2=1.2&diff_format=u
http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/TaskType.java?rev=1.1&content-type=text/vnd.viewcvs-markup
http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/junit-test-results.wstcref?r1=1.1&r2=1.2&diff_format=u
http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/AntSessionInfo.java?r1=1.2&r2=1.3&diff_format=u
http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/Manager.java?r1=1.9&r2=1.10&diff_format=u
http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/JUnitAntLogger.java?r1=1.13&r2=1.14&diff_format=u
http://junit.netbeans.org/source/browse/junit/nbproject/project.properties?r1=1.7&r2=1.8&diff_format=u

The change fixes also the following bugs:
  bug #59883 - Floating window wars between JU output & all others windows
  bug #70749 - JUnit Results window does not display for tests
               run from freeform projects
  bug #73397 - "Failed to prepare tests" - display better message
  bug #76587 - JUnit results window often reopens itself
Comment 3 Max Sauer 2006-08-08 16:47:15 UTC
Verified.
---
NetBeans IDE Dev (Build 200608071800)
1.6.0-rc; Java HotSpot(TM) 64-Bit Server VM 1.6.0-rc-b94
SunOS version 5.10 running on sparcv9
en (nb); ISO646-US
Comment 4 Marian Petras 2006-08-14 11:55:31 UTC
It turned out that I forgot to make some more changes. These are the changes
that should have been made as a part of the big commit and that I made later:

   junit/src/org/netbeans/modules/junit/output/:
                                         JUnitOutputReader.java   (1.24 -> 1.26)
                                         Manager.java   (1.12 -> 1.14)
                                         Bundle.properties   (1.11 -> 1.13)

Part of the changes have been made as a fix to issue #82064.

Diffs:
http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/JUnitOutputReader.java?r1=1.24&r2=1.26&diff_format=u
http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/Manager.java?r1=1.12&r2=1.14&diff_format=u
http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/Bundle.properties?r1=1.11&r2=1.13&diff_format=u