Download NetBeans!

20070802 Thursday August 02, 2007

Testing... Testing... One, Two Three

I met with Jiri Skrivanek this morning, to find out about all the (many) testing tools available to NetBeans users. Jiri is from the QE group. He's responsible for several of the NetBeans testing tools, having even created some of them himself, so he knows what he's talking about. Some are applicable to NetBeans Platform developers specifically, while others are generic, applicable to any kind of user of NetBeans IDE.

Here's a picturesque perspective of the available possibilities:

http://testtools.netbeans.org/

For details on installing the modules discussed below, click here.

Here are the notes that I took on each of the modules that relate to testing, while talking to Jiri:

  • JUnit. This is the only testing tool that is fully supported by NetBeans IDE. In other words, it is (and has been) part of the standard NetBeans IDE distribution and receives full priority for enhancements and bug fixing. All the other testing tools are available on the Beta Update Center for 5.5.1, in the Development Update Center for 6.0 builds, and probably on the Beta Update Center after 6.0 is released. All the modules work for 6.0, no major changes, except possibly internal ones that do not impact the user, have been made between 5.5 and 6.0 and work correctly in 6.0.

    Click here for further reading.

  • Jemmy Library. External (i.e., non-NetBeans specific) user interface testing library. It lets you create user interface tests of Swing applications. NetBeans provides a library wrapper for the external Jemmy library, which is what you can download from the update center. Then you can use the Java classes from Jemmy in your own code.

    Click here for further reading.

  • Jemmy Support. Provides tools on top of the Jemmy library. Adds menu items to the Tools menu and buttons on the toolbar. You can browse through AWT hierarchy, browse resource bundles, generate Jemmy operators (source code) for custom user interface components (these are counterparts to Swing components, for testing the Swing components), then you can handle Swing components through its custom operator. Finally, you can run internal actions, which means that you can run your tests inside the NetBeans JVM, which is useful for tests for NetBeans Platform applications or modules, allowing you to run tests in the NetBeans development IDE, where you are developing the test, without requiring you to start up a separate IDE instance.

    Click here for further reading.

  • Jelly Tools. Consists of two parts, a library and a module that wraps the library. This is an extension of Jemmy, specifically for NetBeans Platform developers and NetBeans module developers. Based on the concepts of Jemmy, with the Jelly tools you can test NetBeans-specific components, such as the ubiquitous TopComponent. For example, you can generate operators for testing your TopComponents, but also the main window itself.

    Click here for further information.

  • XTest. Test harness/framework for JUnit-based tests, which organizes results for you. Developed by NetBeans QE, some parts are general, some NetBeans-specific. Run your tests in the JVM or in NetBeans IDE. XTest samples (Anagram Game and Paint Application) are installed by this module in the IDE's New Projects wizard, to show you what these tests look like. If you install this module, you get a harness (which consists of JARs with Java classes and Ant scripts), actions (for running tests on project nodes), a template to create an XTest infrastructure (e.g., you get a script under module/test, for unit tests and functional tests).

    Click here for further reading.

  • Miscellaneous. A11Y, for accessibility testing and TestNG, for which Xzajo has been developing NetBeans-specific support. Click here for reading on A11Y and click here to read Xzajo's blog.

I hope this was a general enough introduction. I plan to explore some of these modules in some detail, starting with Jelly Tools, soon.

Aug 02 2007, 07:40:22 AM PDT Permalink