Mago makes heavy use of LDTP (http://ldtp.freedesktop.org) 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)
In order to get a fully working system you need the following packages:
The Mago project is hosted in Launchpad at https://launchpad.net/mago
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 (http://doc.bazaar.canonical.com) 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
The directory examples/ contains few pieces of code which exercises different parts of mago.
Mago uses Nose (http://somethingaboutorange.com/mrl/projects/nose/) to collect and run tests and follows the same syntax.
To run a specific example:
$ ./bin/mago examples/test_minimal.py
$ ./bin/mago -w examples test_minimal
To run all the tests in a directory enter:
$ ./bin/mago examples/