Mercury Interactive's WinRunner is an automated testing tool that:
1. Records user interactions to generate test scripts in a programming language.
2. Plays back tests to emulate user interactions and compare results to expectations.
3. Provides reports on test runs and tools to debug and maintain tests for evolving applications.
3. check the
Testing Process behavior of the
application
Creating Tests: being tested,
• Recording (checkpoints )
where u want to.
1. Context Sensitive Recording
1. Analog Recording
Programming
generates a test in a C-like Test Script Language (TSL).
Running Tests:
Emulates a user by entering mouse and
keyboard input into your application.
It compares the current response of your
application to its expected response.
1) Analyzing Test Results:
Lists all the major events that occurred during
the run, such as checkpoints, errors, or messag
4.
5. Recording
I. Context Sensitive Recording…
Identifies each GUI object you select
(such as a window, a button, or an edit
field) an
• The type of operation
d
performed (such as
type, click, or select).
For example:
6. Programming
To create an entire test.
or
To add logic to your recorded test.
Adding elements such as
conditional statements,
loops, and
arithmetic operators
enables you to create a more powerful and complex test.
For example:
7. Checkpoints
You can add four types of checkpoints to your tests:
1. GUI checkpoints: Check information about GUI objects.
For example:
button is enabled or not
which item is selected in a list
1. Database checkpoints:
Check the data content in a database.
1. Text checkpoints: Read text in GUI objects and in bitmaps
and enable you to check their contents.
1. Bitmap checkpoints: ompare a "snapshot" of a window or
C
an area in your application to an image
captured in an earlier version.
8. Data-Driven Tests
To check how your application performs the same operations
with different sets of data.
Data table is created by …
1. inserting variable values in a
table or
• importing data from an external file
For example:
9.
10.
11. • Interprets your test line by line.
provides three run modes:
• Verify mode: to check your application
• Debug mode: to debug your test
• Update mode: to update the expected results
12.
13. Reports:
List the events that occurred during the test run,
including errors and checkpoints.
Test results are color coded and marked as passed or failed
14. Maintaining Tests
Making sure you can reuse these tests ensures that your
Investment in creating tests will pay off as your application evolves.
Tools to help you maintain your tests:
A. GUI Map Editor: Enables you to quickly update how
WinRunner recognizes objects in your
application
A. Function Generator:
Enables you to easily add TSL functions
and user defined functions to your tests.
A. Debugging tools: Help you identify and eliminate problems
in your tests.
15. GUI Map Editor
When you record a test
WinRunner creates a GUI map.
A GUI map lists all the objects in your application
that were learned by WinRunner.
The objects in the GUI map are organized
according to the window in which they appear.
The GUI map lists the minimum set of
properties that uniquely identify an object.
you can open your GUI map in the
GUI Map Editor to add, delete, and modify
object definitions.
16. Function Generator
A visual tool that presents a quick and error-free
way to program your tests.
You can add TSL statements to your tests using
the Function Generator in two ways:
by pointing to a GUI object.
by choosing a function from a list.
17. Debugging Tools
If a test stops running because it encountered
an error in syntax or logic,
Tools can help you to identify and isolate the problem.
• Step commands: a single line or a selected section of a te
Run
A. Breakpoints:Pause a test run at pre-determined points,
enabling you to identify flaws in your
test.
A. Watch List: monitors variables, expressions and array
elements in your test. During a test run, you
can view the values at each break in the
test run such as
after a Step command,
at a breakpoint, or
at the end of a test
18. Supported Environments
Support for testing applications developed with
PowerBuilder
Visual Basic
ActiveX
MFC
also provides testing solutions for other leading application
development and deployment environments such as the
We
bav
J
a
Enterprise Resource Planning (ERP) applications
Wireless Application Protocol (WAP),
Oracle
Delphi
Siebel
19.
20. Benefits of Automated Testing
Manual testing is
2. time-consuming and tedious,
3. requiring a heavy investment in human resources.
4. Worst of all, time constraints often make it impossible
to manually test every feature thoroughly
Automated testing (with WinRunner answers these problems.)
speeds up the testing process.
You can create test scripts that check all aspects of your
application, and then run these tests on each new build.
As WinRunner runs tests,
it simulates a human user by moving the mouse cursor
over the application, clicking Graphical User Interface
(GUI) objects, and entering keyboard input—but
WinRunner does this faster than any human user.
21. Benefits of Automated Testing
Fast WinRunner runs tests significantly faster than human
users.
Reliable Tests perform precisely the same operations each time
they are run, thereby eliminating human error.
Repeatable You can test how the software reacts under repeated
execution of the same operations.
Programmable You can program sophisticated tests that bring out
hidden information from the application.
Comprehensive You can build a suite of tests that covers every feature
in your application.
Reusable You can reuse tests on different versions of an
application, even if the user interface changes.
24. Record/Run Engine icon appears in the status area of the
Windows taskbar.
This engine establishes and maintains the connection between
WinRunner and the application being tested.
32. add descriptions of individual objects to the GUI map by
clicking objects while recording a test , programming, or
a combination of both.
How Does WinRunner Identify GUI Objects?
Spying on GUI Objects
RapidTest Script Wizard
The User Interface test determines whether the application
complies with the Microsoft user interface standards.
It checks that:
GUI objects do not overlap
GUI objects are aligned in windows
text labels on GUI objects begin with capital letters
text labels on GUI objects are clearly visible
OK and Cancel buttons appear in every window
a system menu is available in every window
33. WinRunner Testing Modes
Context Sensitive Analog
Context Sensitive mode records your actions on the application
being tested in terms of the GUI objects you select , while
ignoring the physical location of the object on the screen.
Every time you perform an operation on the application being
tested, a TSL statement describing the object selected and the
action performed is generated in the test script.
To run a test, you simply play back the test script.
It can locate objects in a window even if their placement has
changed.
34. Analog mode records mouse clicks, keyboard input, and the exact
x- and y-coordinates traveled by the mouse.
Use Analog mode when exact mouse coordinates are
important to your test, such as when testing a drawing application.
When choosing a record mode, consider the following points:
Choose Context Sensitive if... Choose Analog if...
The application contains GUI objects. The application contains bitmap
areas (such as a drawing area).
Exact mouse movements are not required. Exact mouse movements are
required.
You plan to reuse the test in different
versions of the application.
Note:
If you are testing an application that contains both GUI objects and
bitmap areas, you can switch between modes as you record.