8
Automation Testing with May 13th, 2013 Panupan Sriautharawong 1 Tuesday, May 21, 13

Automation Testing with Sikuli

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Automation Testing with Sikuli

Automation Testing with

May 13th, 2013 Panupan Sriautharawong

1Tuesday, May 21, 13

Page 2: Automation Testing with Sikuli

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

Page 3: Automation Testing with Sikuli

Introducing Sikuli

Origins?

Intuitive open-source visual scripting tool.

Scripts are written in Python.

Screenshot driven.

Intuitive IDE.

3Tuesday, May 21, 13

Page 4: Automation Testing with Sikuli

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

Page 5: Automation Testing with Sikuli

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

Page 6: Automation Testing with Sikuli

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

Page 7: Automation Testing with Sikuli

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

Page 8: Automation Testing with Sikuli

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