Junit With Net Beans

The JUnit module supports unit test generation (with stub tests for public methods), test suite creation, and execution of tests (at both the class and package level). When 3.2 gets released (around the May/June timeframe), it will be part of the standard download.

It is built around JUnit 3.5.

See http://junit.netbeans.org/ for more detail. This requires NetBeans 3.1 or higher (which means it won't work with ForteForJava 2.1).

Also see http://www.netbeans.org/moduledescs/junit.html (this link is broken, someone who knows and alternative URL refactor me pls) for instructions on an alternative means of running unit tests.


NetBeans 3.3.1 makes unit-testing ridicilously easy. I have my tests in a parallel directory structure to the code I'm testing and in NetBeans I mount my source as one file system and my tests as another file system. I can go straight from the sourcecode to the test or just run the test for a class after changing it in some way just by pressing a key combination.

I haven't yet found out how to run all the tests at once from NetBeans so I just use JakartaAnt for that.

--AdewaleOshineye


EditText of this page (last edited November 20, 2004) or FindPage with title or text search