This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I am trying out the new Netbeans 4.0 IDE and have hit a snag. Before giving up completely and going back to Eclipse, I thought I would ask for some help here.
I have a web project that I am working on using Tomcat 5 and setup as a proper J2EE web project in Netbeans. I am also using Hibernate. As such, I have created a few JUnit tests to run against my persisted objects and hibernate to ensure that the mappings are working correctly. However, I can not seem to get the tests to run within Netbeans. This is a very simple thing to do in Eclipse, but how do you do it in netbeans?
I can not find a "run junit test" button anywhere and the only things I can find to run the test results in an error message -- No servlet mapping in web.xml file.
In case anyone cares, I don't think this is possible to do. I have tried every which way I can think of and I can not find any way of running JUnit tests on a standard java object in Netbeans if the project is configured as a web project.
In fact, I have found that Netbeans is severaly lacking in its support for JUnit. One definite strike against it when compared with Eclipse.
I personally like seeing that nice green line when all my tests pass, in Netbeans, I don't even get a line saying "All Tests: OK"
I have not seen that page, but I have seen all of the linked pages off that page pertaining to running JUnit in Netbeans 4.0. If you are working on a straight Java project, running JUnit is no problem. The steps outlined in the help files and other pages work great (although I have been unable to find any evidence of a nice little graphical Swing UI for JUnit). I have confirmed this by running JUnit tests against classes in a simply Java project.
The problem exists when you try to run JUnit tests for a web project. These simply do not work which makes no sense to me. I should be able to test straight Java classes with JUnit from within the IDE. However, this most basic ability is lacking in Netbeans 4.0.