Wednesday, July 3, 2013

Automated Testing Workshop: Day 1

A big thank you to everyone who made it to the first workshop for automated testing! For those of you who couldn't make it, let me remind you we have 3 more scheduled.

Friday July 5th at 1300 UTC
Tuesday July 9th at 1800 UTC
Thursday July 11th at 2200 UTC

But I also wanted to leave you with a quick log from the session introduction for you to peruse, as well as this list of questions from the session. I hope this helps those of you trying to learn the ropes and contribute new tests!

I'm including some of the questions below as a bit of an FAQ for those starting the journey. Read the workshop introduction and the FAQ below and go automate all the things! I'll see you at the next workshop.

What do I need to develop tests?
A raring or saucy installation (VM or real) and the autopilot and ubuntu-sdk packages installed. You will also need an understanding of how autopilot works (or be willing to learn :-) )

How do I run/install a core app?
Once you've branched your core app source code, you don't need to install it in order to run it. However there is a ppa with all the core apps you can install. To run the core app from source, run it like so in the root directory:
qmlscene APPNAME.qml, ie qmlscene dropping-letters.qml
In order to install from the ppa, follow the info here: https://wiki.ubuntu.com/Touch/CoreApps/PPA
You can install all the core apps run them as you would any other application. After installing from the ppa, simply run the application name, ie "dropping-letters"

I recieved an error installing from the ppa; qtdeclarative5-* missing, etc
You are missing the ubuntu-sdk and related packages. Install them using
sudo add-apt-repository ppa:canonical-qt5-edgers/qt5-proper && sudo add-apt-repository ppa:ubuntu-sdk-team/ppa && sudo apt-get update && sudo apt-get install ubuntu-sdk

Can we write tests for qml apps using autopilot using precise or quantal?
No, the ubuntu-sdk and the new version of autopilot we're utilizing both require raring and preferably saucy to work.

Where can I see an example of autopilot tests?
The tutorial on developer.ubuntu.com is an excellent first step for seeing an autopilot test in action and seeing an explanation of the test and how it works. In addition, the file manager, clock, weather, calendar and weather core apps already have some autopilot tests written as of this writing.

How much python does one need to know in order to write autopilot tests?
Not as much as you think :-) If you are familiar with programming and can understand and use the basic autopilot functions and the ubuntu sdk emulator, writing a test won't require you to learn any fancy python.

No comments:

Post a Comment