Previous Topic: TFTP TestsNext Topic: Keywords for Tests


Virtual User Tests

The Virtual User test plays back a recorded WinTask script. This test web site enables you to obtain continuous availability and response time data for real user transactions.

Before you create Virtual User tests, you must do the following:

Consider the following items when you run Virtual User tests:

Options and Arguments

Virtual User tests require the following specific options and arguments:

Specify these options and arguments when you create or modify tests.

Example

Use this example to create a test that monitors the amount of time required to run a script (C:\myScripts\playback_script.rob) on the port 8080 of mySystem every 120 seconds. This script must run as the user myVUser with a password of VUser123. The test waits up to 10 seconds for a successful response and calculates response time and availability statistics over the last 3600 seconds (1 hour).

To create a new test in a policy

  1. Click + (New) on the Test Monitors toolbar.

    The New test pane appears.

  2. From the Test Type list, select Virtual User.
  3. In the Description field, specify vuser_test.
  4. In the Test Name field, specify VUser Test.
  5. In the Test Interval field, specify 120.
  6. In the Test Timeout field, specify 10.
  7. In the Samples Per Interval field, specify 1.
  8. In the Statistics Window field, specify 3600.
  9. In the Script Path field, specify C:\wintask\bin\wintask.exe C:\myScripts\playback_script.rob.
  10. In the Target Host field, specify mySystem.
  11. In the Target Port field, specify 8080.
  12. In the Run as User field, specify myVUser.
  13. In the Password field, specify VUser123.
  14. Accept defaults for all other fields.
  15. Click Save Test.

When you commit your changes, SRM adds an entry similar to the following to the svcrsp.cf file:

{ 
index=21 
type=vuser
desc="vuser_test" 
dest="C:\WinTask\bin\taskexec.exe C:\WinTask\Scripts\notepad.rob" 
args="" 
interval=60 
samples=1 
timeout=15 
window=300 
tos=0 
limit=0 
status=active 
name="VUserTest"
class=""
context=""
flags="1"
loglevel=1
}

Errors and Availability Measurements

SRM records information about Virtual User test errors in two fields: Results Field and Error Code to help you differentiate between SRM errors and errors that the WinTask application is encountering.

The following table explains how the error codes affect availability measurements. The Results Field provides the value that WinTask returns, and the Error Code field provides the Service Availability error code.

Note: When the Error Code column is 2, the Results Field column displays the error code that was returned by the taskexec.exe application.

Results Field

Error Code

Effect on Availability

Description of Error

0

0

No effect

No errors.

Any number in the range of 300 to 400

2

Negative

SRM could not log in as the user-specified in the Run as User field.

Any number between 600,000 and 700,000

61

No effect

Possible error with the WinTask script that is running.

-1

2

Negative

System error.

Any other number

2

Negative

Possible error with the WinTask script that is running.

For information about errors you may encounter when running Virtual User tests, see Virtual User Test Error Codes.