Sep 12, 2014

Using Sikuli to test Windows Phone 8.1 Application

Test automation tools for regression testing in mobile applications have been increasingly sought. For some platforms is very difficult to find good free tools such as Windows Phone 8.1 platform. To automate this platform effectively you need to invest in expensive testing tools. But if your company doesn't have budget to invest in the purchase of tools for test automation, It is possib;e to perform a feasible way to automate using a free tool called Sikuli.

Sikuli is a free tool picture driven developed by MIT using python programming language. This tool allow to automate regression tests, you can find the tutorials and presetations in the sikuli web site.

The requirements to use Sikuli to test windows phone are:

  1. Use a computer with S.O. Windows 8.1
  2. Download and install Sikuli in your computer.
  3. Download and Install Project my Screen for Windows Phone available on microsoft page ->
  4. Connect your mobile device Windows Phone 8.1 and project the screen on your computer. Example of how to project the screen here.
Steps to automate tests using Sikuli:

  1. Open the Project My Screen and plug your Mobile Phone Windows Phone 8.1 by USB port.
  2. The Mobile Phone' home screen must to appears ins your computer. 
  3. Open Sikuli program in your computer.
  4. The Sikuli IDE must be opened as showed in Figure 1.
  5. The left bar shows the commands to be used in Sikuli.
  6. Click on command "Click()"
  7. Now Select the area of the screen of your Mobile Phone . For example, select the icon of your application (To open the application to be tested).
  8. The sikuli will script the command with the image selected. Click (image)
  9. Now you tap on icon of your mobile application to open it.
  10. Then, back to Sikuli and choose the command Click() again.
  11. Select the application area, for example a button.
  12. Tap on button select in your mobile phone.
  13. In Sikuli, you can click on command Find() 
  14. Select an image of your mobile application or a message for example.
  15. Go to your mobile initial state, for example home screen.
  16. In Sikuli click on button Play to reproduce your steps and observe it executing.

Figure 1 - Sikuli IDE

The video attached will shows how the steps recorded can be reproduced using sikuli.

  • The Project my screen must be opened in the same size and position in your computer to be exactly reproduced.
  • The home screen of your mobile phone and localization of icons and image must be the same of the mobile recorded.
  • The Sikuli will recognize the application through the image and position.
  • You can use python language to improve your test script , example: 
if find(image)

    print "Test Passed"

else print "Test Failed"


  1. Thanks for sharing the great idea. As I know, every time the Project My Screen is opened on the PC side, we have to allow the projection MANUALLY on the phone side. I think that might be a roadblock to test automation. Do you have any idea about this?

  2. Hello Jeremy,
    The solution for this problem is to create basic libraries for basic instructions on windows phone, for example method to open application, method to type number, method to type a text, method to close application or back...It requires time but after perform these scripts the coding process is better. I am working on this and I will post my progress. Thank you!!

  3. Hi Eliane,

    Do you mean the application under test must be modified to support custom operations? Because I'm not familiar with WP development, I don't understand what "basic libraries" exactly means? Do you have any progress on this?

  4. Really awesome blog. Your blog is really useful for me. Thanks for sharing this informative blog. Keep update your blog. Recently I did Software Testing Training in Chennai at a reputed training institutes. If you are looking for best Software Testing Training Institutes in Chennai reach FITA located at Chennai, India.