The NetBeans developers do a lot of functional testing and that testing is supported as part of the NetBeans module project.
One of the modules that I work with that has functional tests is here: http://hg.netbeans.org/web-main/file/tip/j2ee.sun.appsrv81
If you create an nbm module project, there are not functional tests defined by default, so you need to create some directories and the like 'by hand' on the Files explorer:
test/qa-functional/src
an initial test
This is a minimal test to get you started.
package a;
import junit.framework.Test;
import org.netbeans.junit.NbTestCase;
import org.netbeans.junit.NbModuleSuite;
public class SampleTest extends NbTestCase {
private final int SLEEP = 10000;
public SampleTest(String testName) {
super(testName);
}
public void testBogus() {
}
public static Test suite() {
return NbModuleSuite.create(
NbModuleSuite.createConfiguration(SampleTest.class).
addTest(SampleTest.class, new String[] { "testBogus"}).
enableModules(".*").clusters(".*"));
}
}
After these things are in place, you should be able to do the following:
Switch to the Files explorer (if you
aren't there already)
Right click on the node for the
build.xml file
Select the Run Target->Advanced...
item. A dialog will open.
Select test-qa-functional from the
combobox entry field labeled 'Select
targets to run:'
Press the Run button to dismiss the
dialog and execute the test.
Once you get the minimal test case running, you can start to examine the qa-functional test that have been written for the NetBeans IDE to learn more.