RSS

Xpresser: Easy visual tests with Python

16 Jul

Automating tests is an essential goal of any QA Engineer. It saves precious human resources and allows to maintain a healthy continuous integration. Unit and integration tests are closest to the developer’s work: libraries, classes and functions. However, when a project is GUI-intensive or use software with poor introspection/accessibility capabilities, visual tests are very helpful. In this regard, we at Canonical are developing some good QA tools and one of them is Xpresser.

So, what is Xpresser? It’s a Python framework to do visual tests. It was originally developed by Gustavo Niemeyer. Xpresser’s main feature is to find saved images in the desktop. For example, if we want to check whether the Messaging Menu is active, we first save the blue icon and then command Xpresser to find it: Xpresser checks the whole visible desktop, as a regular person would do with its eyes. Xpresser is not only able to find images, but also to click on them. So in the previous case, will could open the Messaging Menu when active to then check whether Thunderbird is open. Xpresser even allows to simulate the keyboard.

To illustrate this, watch this useful screencast done by Chris Wayne, who works with us at Canonical as QA Engineer in OEM.

Plain easy, isn’t it?

Xpresser is currently available in this PPA ppa:xpresser-team/ppa for Ubuntu Precise and Oneiric.

About these ads
 
4 Comments

Posted by on July 16, 2012 in Uncategorized

 

4 responses to “Xpresser: Easy visual tests with Python

  1. Laurence Rowe (@laurencerowe)

    July 17, 2012 at 9:41 pm

    It would be interesting to compare and contrast Xpresser to Sikuli (http://sikuli.org/), a Jython based GUI testing/automation tool.

     
  2. vrruiz

    July 18, 2012 at 2:13 am

    Hi Laurence! Thanks for the link, didn’t have that one under the radar. Seems very similar to Xpresser, especially the API, but multiplatform.

     
    • Jay

      August 21, 2012 at 2:44 am

      Lol Gustavo created Xpresser as an alternative to Sikuli, how could you not know about Sikuli?? But anyhowz great video! Was looking in to an alternative for Linux, and found Xpresser. That is how I found your video and it is a great intro to Xpresser. Thnx

       
  3. Enrique Reyes

    July 18, 2012 at 6:38 pm

    I’m doing this kind of thing in Windows with Autohotkey (open source http://www.autohotkey.com/) scripts for some time now. I think the model is totally different but it have that kind of funcionality.

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

%d bloggers like this: