What is autopilot and how do I contribute to a new autopilot testcase for a package ?


What is Autopilot?

From the Ubuntu wiki:

Autopilot is a functional testing tool for Unity. It simulates user actions by generating keyboard and mouse events, and then testing the internal state of Unity and associated applications.

You can get involved with testing by joining the QA team. Here is a link to their mailing list - ubuntu-quality, their launchpad page, as well as the official Ubuntu QA page.


To install Autopilot from the command line, run the following commands:

sudo add-apt-repository ppa:autopilot/ppa
sudo apt-get update && sudo apt-get install python-autopilot

An example of a simple test unit:

autopilot run unity.tests.test_showdesktop.ShowDesktopTests.test_showdesktop_hides_apps 

Warning: Running autopilot tests on your default desktop will cause your pc to send mouse and keyboard movements without your control. Please read the articles below before blindly running this command.


There is a tutorial here. Additionally, there have been several good articles mentioned in the Ubuntu weekly newsletter. These were written by Nicholas Skaggs, a community coordinator on the testing team, that have been very useful for me.

Autopilot: part 1

Autopilot: part 2 - Here the author walks through a simple "hello world" use case of autopilot

Autopilot: part 3

I highly recommend reading the three above linked articles before getting started with autopilot.

Contributing Testcases

You can submit test cases by emailing the ubuntu-quality mailing list using a specified format outlined here.

Additionally, test cases can be pulled via bzr using the following command:

bzr branch lp:ubuntu-autopilot-tests

Adding test case changes to the code branch can be done with a bzr push comand:

bzr push lp:<username>/ubuntu-autopilot-tests/ubuntu-autopilot-tests

See http://code.launchpad.net/ubuntu-autopilot-tests for more information.

| improve this answer | |
  • nice answer, I wouuld simply correct that there is now an official project for contributing testcases here -- can you update? Since it's a project, it's a simple branch and merge request setup :-) code.launchpad.net/ubuntu-autopilot-tests – balloons Jan 3 '13 at 20:06
  • @balloons Thanks. Is the email option deprecated? Please feel free to edit my response, as I expect you to have a more authoritative perspective. – Kevin Bowen Jan 4 '13 at 7:47
  • will this work just for Unity or would it work in xubuntu or lubuntu ? – Dee May 14 '13 at 4:41
  • When in doubt, contact the test team either through the mailing list, or through IRC @balloons is a lead on testing and can point you in the correct direction if you join the team on IRC. – Kevin Bowen May 14 '13 at 5:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.