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: | Cannot run individual test from GUI (Run File disabled) | ||
---|---|---|---|
Product: | projects | Reporter: | emi <emi> |
Component: | Maven | Assignee: | Milos Kleint <mkleint> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | Macintosh | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
emi
2009-10-05 10:07:18 UTC
to run tests, in 6.7+ you need to invoke "test file", "run file" is reserved for running via main() method (and similar). Same applies to debug file/debug test actions. the exception is indeed a bug, we didn't count with hardwired test property values, the assumption is the action will always have an associated test file, while here it doesn't (is that correct? do you invoke the action on the project node or the test file node? Well,the reason I did that custom maven goal with the -Dtest option is because if I try Run->Test File I get some other exception: java.lang.NullPointerException at org.netbeans.api.java.classpath.ClassPath.parseResourceName(ClassPath.java:833) at org.netbeans.api.java.classpath.ClassPath.findResource(ClassPath.java:367) at org.netbeans.modules.maven.cos.CosChecker.checkRunTest(CosChecker.java:379) at org.netbeans.modules.maven.cos.CosChecker.checkRunConfig(CosChecker.java:131) at org.netbeans.modules.maven.execute.PrereqCheckerMerger$Impl.checkRunConfig(PrereqCheckerMerger.java:84) at org.netbeans.modules.maven.ActionProviderImpl.runGoal(ActionProviderImpl.java:231) at org.netbeans.modules.maven.ActionProviderImpl.invokeAction(ActionProviderImpl.java:220) at org.netbeans.modules.maven.ActionProviderImpl$1.run(ActionProviderImpl.java:177) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:602) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1070) Caused: org.openide.util.RequestProcessor$FastItem: task failed due to So, except that custom goal trick I cannot run individual junit tests. PS: Actually it seems to be the same exception. And I also get this when I try to run Debug-> Debug Test File. Just wanted to confirm that with 6.8 M2, Run->Test file and Debug->Debug Test File works. Integrated into 'main-golden', will be available in build *200910091401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/2d3ed0579bd2 User: Milos Kleint <mkleint@netbeans.org> Log: #173724 fix a corner case scenario when a custom action contains hardwired test property declaration |