Automation Testing with Sikuli

  • View
    4.766

  • Download
    6

Embed Size (px)

DESCRIPTION

 

Text of Automation Testing with Sikuli

  • 1. Automation TestingwithMay 13th, 2013Panupan Sriautharawong1Tuesday, May 21, 13
  • 2. Current IssuesGUIs are difcult to test directly in code.Our testing procedure consists of manually clickingthrough as many common tasks as possible.We arent condent enough idea whether things areworking or not before a release.Bugs are sometimes hard to explain and reproduce.No good automation tools available on OS X... until2Tuesday, May 21, 13
  • 3. Introducing SikuliOrigins?Intuitive open-source visual scripting tool.Scripts are written in Python.Screenshot driven.Intuitive IDE.3Tuesday, May 21, 13
  • 4. What can we use it for?Use it to demonstrate hard to reproduce bugs.Use it to dene and test critical features and commontasks.Running automated tests before doing manual testing.??????4Tuesday, May 21, 13
  • 5. Overview: Global FunctionsIDE Command List - exists, nd, ndAll, wait, click,doubleClick, dragDrop, typeswitchApp(App Name)keyDown(Key.SHIFT+a), keyUp(Key.SHIFT+a)popup(some message)userText = input(some message, default)5Tuesday, May 21, 13
  • 6. Overview: RegionsA rectangular area on the screen: Region(x, y, w, h)Finding Regions:windowRegion = App.focusedWindow()buttonRegion = nd(...)Acting on Regions:region.highlight, click, nd, type, etc..Extending Regions:region.offset(x,y)6Tuesday, May 21, 13
  • 7. DemonstrationDetermine what were 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
  • 8. GoalsThink about how you can leverage automation.Get comfortable writing and running test scripts.Become experts in Sikuli, able to write modular andreusable scripts.Use Sikuli scripts to demonstrate bugs.Use Sikuli scripts as our ofcial test specications.Develop better, more reliable software.8Tuesday, May 21, 13