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.
Steps to reproduce: 1. Create a new Maven Java application. 2. A file called "AppTest.java" should've been created in Test Packages. Test it (Ctrl+F6). The Test Results should indicate that the testApp() method was run and it passed successfully. 3. Go to Project Properties->Actions->Test file. There should be one property set: "test=${packageClassName}". Change it to "test=MatchNothing". Click "OK". Under Project Files, nbactions.xml should've been modified to reflect the change we just made. 4. Test AppTest.java again (Ctrl+F6). Notice that no tests get executed, which is what we'd expect, given that the Surefire plugin is now only looking for tests in a non-existent file named "MatchNothing". 5. Test AppTest.java one last time. (Ctrl+F6). Wait, what? Suddently AppTest.testApp() is picked up again even though we haven't made any changes to nbactions.xml since the last test run. What gives? For the record, I was actually trying to change the property to "test=**/${className}*" so that Surefire would pick up nested test fixtures. As with the above scenario, the change works once before reverting to the default behavior. Product Version = NetBeans IDE 7.0.1 (Build 201107282000) Operating System = Windows 7 version 6.1 running on amd64 Java; VM; Vendor = 1.7.0 Runtime = Java HotSpot(TM) 64-Bit Server VM 21.0-b17
Disable Compile on Save for tests if you always want to use Surefire even when IDE-compiled classes are available.