Tool Mentor: Creating an Automated Performance Test Script Using Rational Robot
var backPath = './../../../';
var imgPath = './../../../images/';
var nodeInfo=[{view: "view:_LVCagP5WEdmAzesbYywanQ", path: ["_LVCagP5WEdmAzesbYywanQ", "_AUv4MAIMEdq-_NKqZM1EhA", "_5ZuQsAIUEdqEutyfYo0quQ", "{1A26E508-8140-4241-865E-0A2A5BCAEFFF}", "{DEBC41D9-6B28-40CE-BD55-4888609A46FA}"]}, {view: "view:_LVCagP5WEdmAzesbYywanQ", path: ["_LVCagP5WEdmAzesbYywanQ", "_mp7z0DIDEdqwaNnSEheSAg", "_9U7IkDIEEdqwaNnSEheSAg", "{1A26E508-8140-4241-865E-0A2A5BCAEFFF}", "{DEBC41D9-6B28-40CE-BD55-4888609A46FA}"]}, {view: "view:_FCx1oN7CEdmsEI4YDGX2ag", path: ["_FCx1oN7CEdmsEI4YDGX2ag", "_jD8dUAIbEdqEutyfYo0quQ", "_F1OgYAIbEdqEutyfYo0quQ", "{1A26E508-8140-4241-865E-0A2A5BCAEFFF}", "{DEBC41D9-6B28-40CE-BD55-4888609A46FA}"]}];
contentPage.preload(imgPath, backPath, nodeInfo, '', false, false, false);
Tool Mentor: Creating an Automated Performance Test Script Using Rational Robot
This tool mentor describes how to use Rational Robot to record an automated performance test script for performance testing.
Tool: Rational Robot
Main Description
Overview
For performance testing, scripts are often created by recording them in Robot. When you record a virtual user script,
your interactions with the application under test cause protocol-specific communication between the client and the
server. Robot records this communication and abstracts it into VU language test scripts after session recording is
complete.
A performance test suite in TestManager then executes multiple instances of this script to apply a load to the system
under test.
This tool mentor applies to Windows 98/ME/XP/2000 and NT 4.0 platforms.
Tool Steps
To record a virtual user script using Robot:
Start recording the virtual user script
Insert timers, blocks, comments,
and synchronization points
Split script or end session recording
Edit the virtual user test script if
necessary
1. Start recording the
virtual user script
When you record a virtual user script, your interactions with the application under test cause protocol-specific
communication between the client and the server. Robot records this communication and uses it for script generation
after you end the recording session.
Prepare the test environment by setting the virtual user record options. See "Setting Recording Options" in the
manual Rational Robot User's Guide.
Click the Record VU Script button on the Robot toolbar.
Type a session name (40 characters maximum).
Click OK to start recording.
Robot is then minimized (default behavior), and the floating Session Record toolbar appears. Use this
toolbar to stop recording or split scripts and redisplay Robot. Use the Session Insert toolbar
to insert features like timers, blocks, comments, or synchronization points into a script. It can also be used
to start an application.
In the Start Application Dialog box, specify the executable to launch. This executable should be the executable of
your client application. For Web applications, use the browser to access the Web site.
Click OK to start the client application.
Begin interacting with the application under test as specified by your test case. Protocol traffic between the
client and server is recorded.
2. Insert timers, blocks, comments, and synchronization
points
You may insert timers, blocks, comments or synchronization points while recording a virtual user session. Click the
Display Session Insert toolbar button on the Session Record toolbar, and then click one of
these buttons:
Start Timer: The Start Timer dialog box appears and prompts you for the name of the timer you want to
start. Enter a name and click OK or use the Cancel button to exit the dialog box.
Stop Timer: The Stop Timer dialog box appears and prompts you for the name of the timer you want to
stop. Enter a name and click OK or use the Cancel button to exit the dialog box.
A timer is a "bracket" around a set of client-server interactions. After execution of a performance test suite in
TestManager, the times required for the executions of each timer are shown in the Performance and Response reports.
Comment: The Comment dialog box appears and prompts you for the comment you want to add to the script. Enter
a comment and click OK or use the Cancel button to exit the dialog box. Comments are text within
a script. They aid script readers in understanding the script but have no effect on the execution of the
script.
Sync Point: The Comment dialog box appears and prompts you for the name of the synchronization point
you want to add to the script. Enter a name and click OK or use the Cancel button to exit the
dialog box. A synchronization point is a script feature that, during script execution, allows for coordination
of actions among multiple virtual testers.
Start Block: The Start Block dialog box appears and prompts you for the block you want to start in the
script. Enter a name and click OK or use the Cancel button to exit the dialog box.
Stop Block: The Stop Block dialog box appears and shows the name of the current block.
Click OK or use the Cancel button to exit the dialog box.
Like a timer, a block is a bracket around a set of client-server interactions. Unlike a timer, initial user
think time is not included in a block. Additionally, all command identifiers within a block are prefixed with
the block name (whereas in a timer, all command identifiers are prefixed with the name of the script).
Refer to the following
topics in the Robot online Help:
Creating a new Suite
Inserting Comments into a Script
Inserting a Block into a Script
Inserting a Timer During Virtual User Recording
Inserting a Synchronization Point During Recording
(All dialog boxes for inserting a feature into a virtual user script contain a Help button to start Robot online
Help.)
Refer to the topic titled
Adding Features to Scripts in Rational Robot User's Guide.
3. Split script or end
session recording
After you have finished performing the test case or logical unit of user activity, you can split a script or end the
session recording.
Splitting a session signifies that everything you have recorded since the last session split (or beginning of the
session) represents a logical unit, such as login to a database or the modification of a particular record; for
example, updating a customer's information in a customer relationship management application.
To split a script:
Click the Split Script button on the Session Recording toolbar.
Type a virtual user script name (40 characters maximum) for the activity just recorded.
To stop session recording:
Click the Stop Recording button on the Session Recording toolbar.
Type a virtual user script name (40 characters maximum).
To change the recording options, click Options. When finished, click OK.
Depending on your previous settings for virtual user recordings, the generator either generates a script
(Automatic Filtering) or prompts you to select the client server communications and protocol (Manual
Filtering), which should be used for generating a virtual user script.
Refer to the chapter titled
Recording Sessions - Choosing the Protocols to Include in a Script in the Rational Robot User's Guide.
4. Edit
the virtual user test script, if necessary
You can edit existing scripts by manually changing the text of a script, as follows:
Edit the text of a script (delete a line, move text, and so forth).
Add a new user action to an existing script (add a shared variable or functionality).
Add a new feature to an existing script (add timers, blocks, comments, and so on).
Refer to the topic titled
VU Language Reference in the Robot online Help.
© Copyright IBM Corp. 1987, 2006. All Rights Reserved.
contentPage.onload();
Wyszukiwarka
Podobne podstrony:
generate test scriptsqEF254Etest script7C91758record test scriptsz61D605record test scriptsz61D605execute suite of test scripts?A12F07klucz test zawodowy Y6ZUUDOVTest dla kierowcy[1]candi self testpytania2009cz1 testMaturaSolutionsAdv Unit 4 Progress test BTest II III etap VIII OWoUEprzykładowy test AUnit 7 Progress test BTD 53x INPA Scriptwięcej podobnych podstron