Product Version: NetBeans IDE Dev (Build 200908270201)
Java: 1.6.0_15; Java HotSpot(TM) Client VM 14.1-b02
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)
I have a package with some java classes in Maven project (Quickstart Archtype).
I created junit tests for the whole package (invoked 'Tools > Create JUnit Tests' on the package node). Test suite was
also generated (it is checked by default in the "Create Tests" dialog).
Now there are two problems:
1, The test suite cannot be run as the 'Run File' is disabled for all test files
2, If I test the whole project (invoke 'Test' on the project's root node or press Alt+F6), it does not ignore the suite
(like in case of simple J2SE project) and mixes up the test methods from individual test files and the suite.
The result of it is quite confusing, the Results window shows ... well, nonsenses :) [see attached screen]
Created attachment 86773 [details]
1. not a bug. Since 6.7 running tests is done via "Test file" not "run file". Test file works on suites.
2. doesn't sound like a bug to me either. The "Test" execution is done via Maven's surefire plugin. I assume you need to
configure it what to run, otherwise it runs everything, including suites.
see http://maven.apache.org/plugins/maven-surefire-plugin (currently down for me)
please reopen if I have missed something obvious in 2.
ad1- Yes, I agree. I realized that 'Test File' works, but too late :) This is OK
ad2- I see. I was just used to test Java applications (not using Maven), where the suite file was automatically ignored
during testing of the whole project. So I was not expecting that I have to modify something manually. And the result
really surprised me :)
But OK, I agree this is not a bug either. Thanks for explaining