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've tried to create a JUnit test (works) and run it. Always getting "taskdef class org.testng.TestNGAntTask cannot be found" Seems, NetBeans insists on TestNG while I'm trying to use JUnit. NetBeans should either automatically detect, which libraries are used, or at least there need to be a property.
Which NetBeans version do you use? How do you create tests? Have you installed TestNG Support plug-in (menu Tools -> Plugins -> Installed tab)? Please read the tutorial (http://netbeans.org/kb/docs/java/junit-intro.html) and try again. Even after installing TestNG Support plug-in (http://wiki.netbeans.org/TestNG) I can't reproduce your issue.
(In reply to comment #1) > Which NetBeans version do you use? Daily build > How do you create tests? Have you installed > TestNG Support plug-in (menu Tools -> Plugins -> Installed tab)? Of course, otherwise there couldn't be a reference to TestNG. > Please read the tutorial (http://netbeans.org/kb/docs/java/junit-intro.html) > and try again. > > Even after installing TestNG Support plug-in (http://wiki.netbeans.org/TestNG) > I can't reproduce your issue. I've already tried to fix this. First I've uninstalled TestNG, but this has been insufficient, so I fixed some files (don't remember exacly which). The problem seems to be caused the following way: 1. Installed TestNG 2. Created new project. Seems to automatically integrate TestNG as a testing tool. 3. When I want to use the project without TestNG (removing also the lib from testing), I'm getting an error message, because the build script still wants to run TestNG. Perhaps, tt'd be a good idea, to make the testing framework selectable in project properties.
I managed to reproduce. it looks like TestNG plugin changes build-impl.xml and forces it to use testng-impl.xml. It is possible to fix them manually but I agree it would be nice to have such a property in the project.