To demonstrate the scripting language structure let's consider a simple
test
script example. This one opens the calculator application and
calculates the sum of 5+5. Be aware that this is a very simple script
which implements neither behaviour verification nor reporting of test
result except saving a screen shot.
Note the minor differences between the Windows and Linux scripts -
there's really just different calculator application name and the hot
key to open the Run box. We will show you in one of the following
topics how to separate such system dependent pieces of code in order to
create cross platform test scripts.
calculator.tpr
(Windows version) |
| calculator.tpr
(Linux/Gnome version)
|
# Generic procedure to start
an application on Windows.
#
Start calculator, type "5+5" followed by Enter and take a screenshot. startApp calc
| # Generic procedure to start
an application on Linux/GNOME.
#
Start calculator, type "5+5" followed by Enter and take a screenshot. startApp gnome-calculator
|
The language is based on the following principles:
12 December 2014 |
Copyright © T-Plan Ltd. |
Version 1.0 |