automation testing with sikuli
DESCRIPTION
TRANSCRIPT
Automation Testing with
May 13th, 2013 Panupan Sriautharawong
1Tuesday, May 21, 13
Current Issues
GUIs are difficult to test directly in code.
Our testing procedure consists of manually clicking through as many common tasks as possible.
We aren’t confident enough idea whether things are working or not before a release.
Bugs are sometimes hard to explain and reproduce.
No good automation tools available on OS X... until
2Tuesday, May 21, 13
Introducing Sikuli
Origins?
Intuitive open-source visual scripting tool.
Scripts are written in Python.
Screenshot driven.
Intuitive IDE.
3Tuesday, May 21, 13
What can we use it for?
Use it to demonstrate hard to reproduce bugs.
Use it to define and test critical features and common tasks.
Running automated tests before doing manual testing.
???
???
4Tuesday, May 21, 13
Overview: Global Functions
IDE Command List - exists, find, findAll, wait, click, doubleClick, dragDrop, type
switchApp(“App Name”)
keyDown(Key.SHIFT+”a”), keyUp(Key.SHIFT+”a”)
popup(“some message”)
userText = input(“some message”, “default”)
5Tuesday, May 21, 13
Overview: RegionsA rectangular area on the screen: Region(x, y, w, h)
Finding Regions:windowRegion = App.focusedWindow()buttonRegion = find(...)
Acting on Regions:region.highlight, click, find, type, etc..
Extending Regions:region.offset(x,y)
6Tuesday, May 21, 13
Demonstration
Determine what we’re testing.
Figure out what determines success.
Fire up the Sikuli IDE.
Walk through step-by-step simulating user actions.
Check success states at each step.
7Tuesday, May 21, 13
GoalsThink about how you can leverage automation.
Get comfortable writing and running test scripts.
Become experts in Sikuli, able to write modular and reusable scripts.
Use Sikuli scripts to demonstrate bugs.
Use Sikuli scripts as our official test specifications.
Develop better, more reliable software.
8Tuesday, May 21, 13