Function Testing on Netbeans 6.8

It is not yet a torrent, but some articles can be found on the network about testing functions (in particular, http://blogs.oracle.com/geertjan/entry/gui_testing_on_the_netbeans ). However, the tools he mentioned do not seem to be supported or have a plugin that works with the latest version of Netbeans (6.8).

Do you have any feature for testing GUI? What is your level of integration into the development process (integration of IDE, ant, etc.).

An additional sweetie is that Netbeans is not only an IDE, but also a graphical application developed for the NetBeans 6.8 platform (that's why I'm mostly interested in graphical applications for the NB platform, but tips for any Swing applications in general will help too) .

+3
source share
1 answer

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:

  • Test / QA Functional / SRC

  • initial test

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, .

+1

Source: https://habr.com/ru/post/1740038/


All Articles