background image
<< Functional Testing | Prepare to use Robot >>
Working with Test Scripts
<< Functional Testing | Prepare to use Robot >>
Chapter 10 - Functional Testing
TestManager opens the Webshop project and displays the Test Asset Workspace in
the left window pane. Make sure you can read the tabs at the bottom of the Test
Asset Workspace. Move your pointer over the symbol on each tab to see its name,
then expand the workspace using the vertical divider until you can clearly see the
tab names. You are now ready to work with the project.
What Is Functional Testing?
Functional testing helps you determine whether a system behaves as intended. The
most natural way to test a system's behavior is to use the application's GUI to validate
that the system responds appropriately to user input. Testing can focus on both the
operation and the appearance of GUI objects. TestManager provides built-in support
for implementing and running functional tests created in Robot.
Working with Test Scripts
During test planning, you write test cases, as described in Chapter 6, Test Planning. A
test case describes the extent to which you will test an area of the application. It can
list the preconditions for performing a test, the input to provide during testing, the
variables you will examine, and the expected results of each test.
To implement a test, you start with a test case and create test scripts. You then
associate the test case with a test script. A test script has the following components:
A set of properties, such as the name and purpose of the script.
A file containing scripting language commands. You generate a script file when
you record activities with Robot or other scripting languages and tools.
Scripts and Modularity
You can record a test script that starts an application and proceeds through several
steps to achieve a certain end result. If a particular activity must be performed in
many test scripts, it makes sense to create a script that performs only this common
Instead, you can create a set of test scripts that all start with the same steps and
conclude by testing different parts of the application. Using Robot, you can create
short modular test scripts, which you can then combine and sequence into a suite in
TestManager. With this technique, you can reuse the same script in different tests, or
run these suites repeatedly against successive builds of your product. Or, you can
reuse a test script that has already been recorded to get an application to an
appropriate starting place for recording a subsequent script.