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.
It is weird, that exactly the same code will be tested and executed differently for Java SE and Maven Java SE project. If you will generate tests according to http://wiki.netbeans.org/TS_72_UnitTesting#Test_suite:_Different_project_types, the test suite will not be executed as part of Java SE application, but will be executed as Maven Java SE application. Is there any good reason to do so? NetBeans Dev 201206070001, JDK 7u2 32bit
I am not sure what you mean. Could you please describe the steps you followed in order to reproduce the issue? Thank you
Sorry for not be clear enough. To reproduce: 1.) Open JUnitSampleProject and create tests for "teststorun" package 2.) Test the Ant Java SE project (ALT + F6) => the result will be 9 tests failed and 1 error 3.) Create empty Maven project and copy the content of "teststorun" package into source packages 4.) Create tests for that package 5.) Test the Maven Java SE project (ALT + F6) => the result woll be 18 tests failed and 2 errors this is because Maven project will execute also the test suite file and the Ant project will not
I can now reproduce. Thank you. Milos any idea why maven executes both the individual test classes and the test suite resulting in reporting all test results twice? Did something change lately? BTW it does not happen in 7.1
(In reply to comment #2) > > 3.) Create empty Maven project and copy the content of "teststorun" package > into source packages > 4.) Create tests for that package > 5.) Test the Maven Java SE project (ALT + F6) > => the result woll be 18 tests failed and 2 errors > > this is because Maven project will execute also the test suite file and the Ant > project will not That's a feature/fault of maven surefire plugin. in the Create tests.. action's dialog you have the option to omit the creation of suite files. or you can configure the surefire plugin to run just the suite files or to omit executing them... In general it's not worth the effort to synchronize behaviour of IDE-generated Ant build scripts and Maven. Closing as won't fix. The maven behaviour appears to be maven standard, user can configure POM or omit generating/delete the suite file.