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 161283

Summary: Compile on Save affects JUnit test actions
Product: java Reporter: pribyl <pribyl>
Component: ProjectAssignee: Tomas Zezula <tzezula>
Status: RESOLVED WORKSFORME    
Severity: blocker CC: mmirilovic
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description pribyl 2009-03-26 16:29:16 UTC
Product Version: NetBeans IDE Dev (Build 200903251400)
Java: 1.6.0_13; Java HotSpot(TM) Client VM 11.3-b02
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)

If Compile on Save of a project is disabled, then "Run Again" and "Debug" options in JUnit test results window are not
available in the popup menu (not even present).

I consulted this with Andrey(JUnit), and he said that:
From the JUnit point of view we just get the ActionProvider from project's Lookup and asks for some actions. If provider
says that Run/Debug single test method action is enabled then we are creating the corresponding popup menus.
Comment 1 Milos Kleint 2009-04-01 06:48:01 UTC
what project type? It's on purpose in maven projects for example, there's no native maven way of running just a method.
Comment 2 pribyl 2009-04-01 14:06:00 UTC
Well, it can be seen on simple J2SE project (sorry I did not specify that in the first post)

If you create sample J2SE project with default setting, create a test for Main class and run it.
In the result window right-click on the 'testMain (failed)' node. You should see options: Go to Source, Run Again and Debug.
Now select Project's properties and turn off Compile on Save. Right click on the testMain node again. Only Go to Source
is available now.
Comment 3 Andrey Yamkovoy 2009-04-08 14:01:37 UTC
For the Run/Debug Single Method actions JUnit asks ActionProvider implementation from the project lookup. For the J2SE
project it's J2SEActionProvider. So reassigning to java.
Comment 4 Andrey Yamkovoy 2009-04-30 11:07:55 UTC
*** Issue 164079 has been marked as a duplicate of this issue. ***
Comment 5 Tomas Zezula 2012-06-05 17:32:22 UTC
Works fine in dev (NB 7.2), already fixed.
Comment 6 everflux 2012-06-09 20:15:57 UTC
It works not completely as expected for me, see http://netbeans.org/bugzilla/show_bug.cgi?id=213887 .