Académique Documents
Professionnel Documents
Culture Documents
Sikuli Script
Document Revisions
Version
Number
Date
30/07/2014
0.1
Document Changes
Initial Draft - Matthew Chapman
What is Sikuli?
Until the 1980s, using a computer program meant memorizing a lot of commands
and typing them in a line at a time, only to get lines of text back. The graphical
user interface, or GUI, changed that. By representing programs, program
functions, and data as two-dimensional images like icons, buttons and
windows the GUI made intuitive and spatial what had been memory intensive and
laborious.
But while the GUI made things easier for computer users, it didnt make them any easier for
computer programmers. Underlying GUI components is a lot of computer code, and usually,
building or customizing a program, or getting different programs to work together, still
means manipulating that code. Researchers in MITs Computer Science and Artificial
Intelligence Lab hope to change that, with a system that allows people to write programs
using screen shots of GUIs. Ultimately, the system could allow casual computer users to
create their own programs without having to master a programming language.
Ezadspro is a GUI with a lot of computer code and is constantly updating with new features
and functionality on a daily basis. Due to this there is always a risk of the system not being
tested correctly before becoming live to its users. Using sikuli and creating a script we are
now able to test the GUI without going through thousands of lines of code.
In this guide will explain the process and steps we take to ensure each update is tested
thoroughly using Sikuli.
Process Overview
Sikuli runs from a dedicated machine which automatically starts a process of logging into
Ezadspro to test once a new update has been developed. It then moves on to run different
commands to test the software by clicking, selecting and making sure the screenshots match
the live screen. This is called Screenshot driven computing.
Below is a typical sequence of events Sikuli will run to test cropping of an image:
2 The Steps
Sikuli doesnt just test certain types of errors but creates an environment on how an agent
would use the system. It replicates how a client would use the software with stock and
adverts before testing complicated tasks. Once all tests have been completed it resets its
adverts and notifies the team that the test was successful. If it is not successful it will send
an error report relating to the task it failed. This will cause the build to not be applied to any
live servers.
3. assert exists("
",20) (Checks the PDF preview for the following: Quad,
Image, Text and Quality)
4. type("q", KeyModifier.CTRL) (Quits adobe ready to move onto the next task)
5. assert exists("
PDF)
This is one of the small processes Sikuli runs, within these 5 steps it has covered testing a
large amount of potential errors within the system.
Indicator
Log In
Change group
User preferences
Preferences
Add stock
Definition
Uploading an image
Image cropping
Previews the item to make sure text fields and images are
showing correctly
Quadding on PDF
Searches for different items in the stock list making sure only
the desired results are returned
Loading archive
Deleting an item
Duplicating stock
Clicking new ad
Entering full ad details
Creates a new advert and checks all fields and backings are
available
Enters full ad details including the date of the build test
Flows all previously created stock onto the advert and checks
they are correct
Clears all the stock from the advert and checks it is now blank
Drags items from the advert stock list onto a random box on
the page
Edits the item from the advert directly checking all fields are
still correct
Deselects stock from the advert window and checks they have
reappeared in the stock list
Zooming on the ad
preview
Dropping a filler onto
the page
Crops an image to a very low DPI and checks the low res image
flag appears
Approves the advert monitoring all processes including email
delivery
Downloads the high res advert and checks through both pages
Resending email
delivery
Deapproving an advert
Deleting an advert
Deletes all available adverts after its checks have been ran
Views the log making sure entries were creating from the
script
If you have any questions that are not addressed by this user guide, please contact
support@draganddrop.co.uk for additional information.