Getting Started


Assistive Technologies

Mago makes heavy use of LDTP ( to interact with the application and it uses the Accessibility libraries to discover through the application’s user interface.

To enable the Assistive Technologies, select the menu System -> Preferences -> Assistive Technologies. the following dialog will be displayed.


Check the box Enable Assistive Technologies

Alternatively you can enable it from the command line. Open a terminal and run:

# Enable accessibility for the current user
$ gconftool-2 --set --type bool /desktop/gnome/interface/accessibility true

You may also need to disable the screensaver to prevent the hang of the tests.

Finally restart your GNOME session (log out and log in)

Additional Packages

In order to get a fully working system you need the following packages:

python >=2.7
To take advantage of new features introduced in unittest
Easy to use distributed version control system to get mago and push changes if you want to contribute.
ldtp python-ldtp
The glue that uses the “Accessibility” libraries to poke through the application’s user interface
Test discovery and running for Python’s unittest
Interface for Python to the X11 Protocol
Python Imaging Library used for image compairison

Getting Mago

The Mago project is hosted in Launchpad at

The trunk branch is owned by a Launchpad team, mago-contributors, that it is a moderated team. Once you have contributed through merge proposals, you can apply to be part of the team and will be able to push to trunk and review some other members contributions.

To get Mago from Launchpad you need to install the tool Bazaar ( Then run the following command to get the latest version from the Bazaar repository:

$ bzr branch lp:mago

This will create a directory mago. Go to this newly created directory and you’ll be able to start running your first tests.

You can get the help of mago by running the command:

$ ./bin/mago -h

Running the examples

The directory examples/ contains few pieces of code which exercises different parts of mago.

Mago uses Nose ( to collect and run tests and follows the same syntax.

To run a specific example:

$ ./bin/mago examples/

Or alternatively

$ ./bin/mago -w examples test_minimal

To run all the tests in a directory enter:

$ ./bin/mago examples/

Table Of Contents

Previous topic

Mago’s documentation

Next topic

Tutorial: A Step by Step example

This Page