NetBeans developers perform many functional tests and support testing as part of the NetBeans module project.
One of the modules I work with this has functional tests: http://hg.netbeans.org/web-main/file/tip/j2ee.sun.appsrv81
If you create an nbm module project, no functional tests are specified by default, so you need to create some directories and the like manually in the file explorer:
This is the minimum 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 all this is done, you can do the following:
Go to file explorer (if you no longer exist)
node
build.xml
Run Target → Advanced...
. .
test-qa-functional
combobox "
: '
"",
.
, qa- , IDE NetBeans, .