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.
what project type? It's on purpose in maven projects for example, there's no native maven way of running just a method.
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.
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.
*** Issue 164079 has been marked as a duplicate of this issue. ***
Works fine in dev (NB 7.2), already fixed.
It works not completely as expected for me, see http://netbeans.org/bugzilla/show_bug.cgi?id=213887 .