NetBeans 6.1 Accessibility Testing Utilities - a11y
Author: Jaromir Uhrik
The a11y tester utility is distributed as the .nbm (NetBeans module) from the time of NetBeans release 4.0.
because the most common way of use is to use this utility inside of NetBeans. Currently .NBM for this module of following version is available:
-
2.5.1 - compatible with NetBeans 6.1 and successor (jdk1.5 and newer)
The current version 2.5.1 is compatible primarily with current NetBeans 6.1 builds.
This document shows how to download, install and use the Accessibility test tool (
a11y.nbm) of version 2.5.1
inside of the NetBeans 6.1 IDE (procedure for the former versions is analogical):
- install from the update center (preferred type of installation)
- other installation types
- download of the module
- installing of the module
- test NetBeans frames and windows
- test applications-windows (outside NetBeans !!! - standalone application)
- test applications-windows by XTest tests
1. Install from the update center (preferred type of installation)
For the installation via update center it is necessary to add update provider to the list of providers in plugin manager.
Then it is possible to install the accessibility tester plugin in a common way. The steps of adding update provider are following:
- select main menu Tools|Plugins
- choose Settings tab and press Add button
- type "http://a11y.netbeans.org/nbms/updates.xml" in the URL field
- confirm the dialog and the Accessibility plugin appears in the Available Plugins tab
- after the plugin is installed it forces restart of IDE
- after the IDE restart the accessibility tester's icon appears in toolbar
2.1. Download of the module
There are 3 standard ways of getting the module:
Save the a11y.nbm file locally to your hard-drive and follow steps of standard installation through the NetBeans Plugin Manager.
2.2. Install and run the module
Just these steps are necessary:
-
To run AccessibilityTester for testing frames and dialogs of IDE you must run IDE with switch:
-J-Da11ytest.IDE=true
This switch has been removed in version 2.5.1 of accessibility tester.
-
Start Plugin Manager (select main menu Tools|Plugins)
-
In "Downloaded" tab push "Add Plugins..." button and browse the downloaded a11y.nbm
-
Go through the process of downloading
-
After the successful install the NetBeans toolbar contains new category with wheelchair icon (
- UIAccessibilityTester)
-
Simply press the icon to start the tester tool
2.3. Testing NetBeans frames and windows (MDI,SDI)
To run AccessibilityTester for testing frames and dialogs of IDE you must install a11y.nbm and run IDE with switch :
-J-Da11ytest.IDE=true
This switch has been removed in version 2.5.1 of accessibility tester.
After installation new toolbar with action is present.
You must exactly to do :
- push button (
- UIAccessiibilityTester) from Accessibility Toolbar
- new (UIAccessibilityTester) window is opened (only after first invoking)
- prepare test settings
- push button "Run"
- open window that you can test
- press Ctrl-F11
- test results is written to your defined output (it's possible define it in Test results tab)
- new AWT-tree tab of tested frame is added to UIAccessibilityTester
2.4. Testing applications-windows (without NetBeans - as independent application)
To run UIAccessibilityTester you need to have obtained a11y.jar and installed JDK.
To acquire a11y.jar from a11y.nbm is easy. Since a11y.nbm is a .zip file in fact - you can
just rename it to a11y.zip and extract.
You will find the a11y.jar file under /netbeans/modules/ folder of a11y.zip file.
The UIAccessibilityTester class is in the org.netbeans.a11y.tester directory included with this a11y.jar.
Before you can run it, you need to set up your environment appropriately by following these instructions:
- Copy a11y.jar to the $JDKHOME/jre/lib/ext directory under your JDK installation.
- Modify (create one if it doesn't exist) your $JDKHOME/jre/lib/accessibility.properties file to include the following line:
assistive_technologies=org.netbeans.a11y.tester.UIAccessibilityTester
After you follow these instructions, you should be ready to run UIAccessibilityTester.
Notice:
By following the instructions above, UIAccessibilityTester will automatically be started any time you start any Java application.
2.5. Testing applications-windows by XTest tests
To run AccessibilityTester for testing accessibility of windows by XTest you must write class ,
which extends org.netbeans.a11y.harness.XTestAccessibilityTestCase.
You must exactly to do :
- your class extends
XTestAccessibilityTestCase
- you must write method
getTestedComponent() that returns tested component
- you can write method
setSettingsFile() that returns settings file for accessibility test (if not default settings are used)
a11y.jar must be available for compilation and for test running :