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:
- Use a computer with S.O. Windows 8.1
- Download and install Sikuli in your computer.
- Download and Install Project my Screen for Windows Phone available on microsoft page -> http://www.microsoft.com/en-us/download/details.aspx?id=42536.
- 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:
- Open the Project My Screen and plug your Mobile Phone Windows Phone 8.1 by USB port.
- The Mobile Phone' home screen must to appears ins your computer.
- Open Sikuli program in your computer.
- The Sikuli IDE must be opened as showed in Figure 1.
- The left bar shows the commands to be used in Sikuli.
- Click on command "Click()"
- 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).
- The sikuli will script the command with the image selected. Click (image)
- Now you tap on icon of your mobile application to open it.
- Then, back to Sikuli and choose the command Click() again.
- Select the application area, for example a button.
- Tap on button select in your mobile phone.
- In Sikuli, you can click on command Find()
- Select an image of your mobile application or a message for example.
- Go to your mobile initial state, for example home screen.
- 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.
Remarks:
- 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)
else print "Test Failed"
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?
ReplyDeleteHello Jeremy,
ReplyDeleteThe 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!!
Hi Eliane,
ReplyDeleteDo 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?
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.
ReplyDelete