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.
Summary: | [67cat] Debug test file generates xml output in project root for maven project | ||
---|---|---|---|
Product: | java | Reporter: | neilg <neilg> |
Component: | Project | Assignee: | Jesse Glick <jglick> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | blaha, jglick, massimo, mkleint, sustaining |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 171050, 174173 | ||
Attachments: | right-click contextual menu on junit test class |
Description
neilg
2009-03-20 23:08:32 UTC
it seems to be generated by the JavaRunner's (compile on save) internal scripts. reassigning to java for evaluation we will look at it. *** Issue 161088 has been marked as a duplicate of this issue. *** *** Issue 162755 has been marked as a duplicate of this issue. *** Was going to submit a bug, but then saw this issue open in 6.7. I am assuming you have temporarily disabled the Debug File action, as it no longer is enabled when right-clicking on a JUnit test class within a Maven project. Please confirm or else i will open another issue. Dumping stray files into a versioned project directory is very bad and must be fixed. I think P2 is well justified. Reproducible in 090615 (only in debugging mode). Anyway there is no reason that I can see to generate an XML report at all for running a single test in debug mode. Ought to be trivial to fix. (Why has this been sitting untouched for months?) Would even recommend 6.7 fix candidate status. Try something like: diff --git a/java.source.ant/src/org/netbeans/modules/java/source/ant/resources/junit-debug-snippet.xml b/java.source.ant/src/org/netbeans/modules/java/source/ant/resources/junit-debug-snippet.xml --- a/java.source.ant/src/org/netbeans/modules/java/source/ant/resources/junit-debug-snippet.xml +++ b/java.source.ant/src/org/netbeans/modules/java/source/ant/resources/junit-debug-snippet.xml @@ -91,7 +91,6 @@ <arg value="${classname}"/> <arg value="showoutput=true"/> <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/> - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,TEST-${classname}.xml"/> <extra-args/> <syspropertyset> <propertyref prefix="test-sys-prop."/> diff --git a/java.source.ant/src/org/netbeans/modules/java/source/ant/resources/junit-snippet.xml b/java.source.ant/src/org/netbeans/modules/java/source/ant/resources/junit-snippet.xml --- a/java.source.ant/src/org/netbeans/modules/java/source/ant/resources/junit-snippet.xml +++ b/java.source.ant/src/org/netbeans/modules/java/source/ant/resources/junit-snippet.xml @@ -59,7 +59,6 @@ <jvmarg value="-ea"/> <jvmarg line="${run.jvmargs}"/> <formatter type="brief" usefile="false"/> - <formatter type="xml"/> <syspropertyset> <propertyref prefix="test-sys-prop."/> <mapper from="test-sys-prop.*" to="*" type="glob"/> massimo - Run/Debug File are now only for running main() methods. Use Test File & Debug Test File to invoke JUnit. Jesse, thanks, but i see no 'Debug Test File' action in the contextual menu (see attached image). Using junit 3.x, standard J2SE installation of NetBeans 6.7 RC3. The only debug action available is 'Debug File', which is grayed out. Created attachment 83723 [details]
right-click contextual menu on junit test class
massimo - it's not in the context menu (don't ask me why; filed separately IIRC) but it is in the main Debug menu and available via C-S-F6. Beautiful, thanks (should of thought of that). Going to add an issue for it (and maybe provide a patch, should be trivial to add in the contextual menu), it should probably go there as well. *** Issue 168182 has been marked as a duplicate of this issue. *** If not me, who? If not now, when? - רש"י core-main #918b569e5a3d Integrated into 'main-golden', will be available in build *200907080200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/918b569e5a3d User: Jesse Glick <jglick@netbeans.org> Log: #160777: do not pollute project dir (or $userdir/var/cache/executor-snippets) with TEST-*.xml. Reporter, would you verify the fix in the latest build *200907080200* on http://bits.netbeans.org/dev/nightly/? Thanks, Petr I was not able to reproduce (based on the provided steps) the bug in the latest build. The fix has been ported into the release67_fixes repository. http://hg.netbeans.org/release67_fixes/rev/7aaee27c53b1 v. in 6.7.1 |