These Aegis automated accessibility tests were developed with the help of Aegis project funding. They are built upon the Mago 1.0 test infrastructure and can use validator plugins compatible with the Accerciser accessibility API exploration tool. The tests can be checked out of the bazaar repository here: These are designed to test a software component's usage of ATk/ATSPI and are generic enough that they have been used on GNOME 2.30 in Oracle Solaris 11 and Oracle Enterprise Linux (OEL) as well as GNOME 3.2.x on top of a build-and-test tinderbox on the OpenSuSE based GNOME accessibility testing distro.

Open Accessibility Infrastructure Testing framework


Event Monitor Support
The A11yGenericApplicationTestSuite class contains some event monitor methods which allow an accessibility test to be invoked when a specific event occurs.  These event monitor support methods are:
register_event_listener(self, function, event_name)
Register a method which will be invoked when event_name event occurs

Start the registry in a different thread from the event monitor.
These test primitives are the building blocks of test scenarios.  They allow procedural as well as event triggered invocation of individual accessibility tests.

Use keyboard navigation to traverse the items in a menu.
traverse_menubar(window_name, menubar, startmenuname='')
Traverse an application's menu bar by using the tab and down arrow keys assert that each enabled menu and item is reachable     source code
traverse_main_menu(window_name, app_name, startmenuname='')     
Use keyboard navigation to traverse the main menu of an application 
traverse_child_menubars(window_name, acc, startmenuname='')     
Use keyboard navigation to traverse the child menubars of an application 

Invoke the advertised keyboard shortcuts for an accessible.
traverse_focusable_children(window_name, acc)
Attempts to use keyboard navigation (tab and arrow) to traverse the focusable children of an accessible
traverse_focusable_buttons(window_name, acc)
Attempts to use keyboard navigation (tab) to traverse the focusable buttons which are children of an accessible         
  The following test primitives are inherited from Accerciser using the accerciser validator plugins and the AEGIS testing framework plugin adapter:

Any item that supports the action interface should also be focusable or selectable so the user may interact with it via the keyboard.

Any widget with a role listed in condition should support the action interface.

The application should have on and only one accessible with state focused at any one time.

Any widget with a role listed in condition should support the text interface since they all support stylized text.

The index returned by acc.getIndexInParent should return acc when provided to getChildAtIndex.
Any relation in the map should point to an accessible having the reciprocal relation.

Any accessible with one of the roles listed below should have an accessible name, a labelled by relationship, or both.

A focusable accessible with a table interface should also support the selection interface.

Any accessible with one of the ephemeral states in state map should have the corresponding -able state.

An accessible with a radio button role should be a member of a set as indicated by a relation or appropriate object property.

The index returned by getIndexAt(row, col) should result in getRowAtIndex and getColumnAtIndex returning the original row and col.

The accessible returned by table.getAccessibleAt should return acc.getIndexInParent matching acc.getIndexAt.

Any accessible with an image role or image interface should have either a name, description, or image description. 

Annex I - Source code download section
The AEGIS testing framework development branch can be checked out as follows:

HOWTO run automated accessibility tests

bzr branch lp:a11ytesting
cd a11ytesting
mago -a a11y -f gedit.xml --log-level=debug

Test results will appear under the ~/.mago/a11y directory.


AEGIS Accessibility framework tests are in the form of mago XML files. Here are some examples:

I. Listen for "window:activate" events and run a set of accerciser validator tests on the resulting window:
<?xml version="1.0"?> 
<suite name="a11y generic application"> 
    Registers test functions which will be invoked when certain events occur 
  <case name="Register Listener"> 
    <description>Register accerciser validators</description> 

II. Traverse the main menu of the gnome-panel application:
  <?xml version="1.0"?> 
  <suite name="a11y generic application"> 
    Tests generic accessibility functionality. 
  <case name="Generic Accessibility Tests"> 
    <description>Test menubar navigation by arrow.</description> 
      <window_name>* - panel*</window_name> 
III Launch calculator and traverse all focusables using keyboard navigation:
<?xml version="1.0"?> 
<suite name="a11y generic application"> 
    Tests calculator's generic accessibility functionality. 
  <case name="Launch Calculator"> 
    <description>Launch gnome calculator</description> 
   <case name = "Traverse Applicaiton Focusables"> 
   <case name = "Traverse Calculator Main Menu"> 


def delay(nsecs): 
def get_method(myobject, method_name): 
def call_method(myobject, method_name): 
def startup(application): 
def get_desktop(num): 
def get_wins_with_state(state): 
def get_apps(desktop): 
def find_app(app_name,desktop_num=0): 
def find_accessible(parent_acc,accessible_name,role=""): 
def focus_accessible(acc): 
def get_apps_with_focus(desktop): 
def get_focused_on_desktop(desktop): 
def get_focusable_children(acc): 
def get_focused_children(acc): 
def get_text_areas(acc): 
def get_buttons(acc): 
def get_active_buttons(acc): 
def get_focused_button(acc): 
def get_focused_buttons(acc): 
def get_active_focusables(acc): 
def get_panels(acc): 
def get_active_panels(acc): 
def get_menubars(acc): 
def get_menus(acc): 
def get_menu_items(acc): 
def get_active_menus(acc): 
def get_active_menu_items(acc): 
def get_frames(acc): 
def activate_window(windowname): 
def activate_menu(windowname,menuname): 
def page_up(): 
def page_down(): 
def next_focusable_by_rt_arrow(): 
def next_focusable_by_tab(): 
def prev_focusable_by_lt_arrow(): 
def prev_focusable_by_up_arrow(): 
def next_focusable_by_down_arrow(): 
def prev_focusable_by_sh_tab(): 
def get_acc_keybinding(acc): 
def click(self,app_name,object_name): 

Annex IV - References

  1. Mago test environment:

  2. Linux Desktop Testing Project:

  3. Accerciser accessibility exploration tool: Accerciser

AegisA11yTesting (last edited 2012-01-20 11:49:03 by BrianNitz)