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.
I have a netbeans module project with unit tests, after I run the unit tests separately, everything is fine. When I clean build or only build the whole solution everything is fine, except that the unit tests will not executed as default. I created stuff and I thought that everything is fine because the the project will build and later I executed the tests separately and they failed. I expected that the build will fail, when the tests are failing. So I only see that netbeans will call "clean netbeans" but the tests where not executed. Did I forgot to add smth that the tests should executed while build or is this a bug or is this feature missing?
IMO the expected behaviour is based on working with Maven/Gradle, where a "mvn package"/"mvn install" also executes tests and integration tests. Standard Ant-based project don't execute tests when building via 'ant clean jar' too. If it's important, then switch to Maven-based NBM. :P
Workaround for an Ant-based project. Tested with "Anagram" sample. <target name="-post-jar"> <antcall target="test"/> </target>