Test Script Services Reference

prevnext

Monitor Commands


When a suite of test cases or test scripts is played back, TestManager monitors execution progress and provides a number of monitoring options. The monitoring commands support the TestManager monitoring options.


Summary

The following table lists the monitoring commands.

Command Description
Display Sets a message to be displayed by the monitor.
PositionGet Gets the script source file name or line number position.
PositionSet Sets the script source file name or line number position.
ReportCommandStatus Gets the runtime status of a command.
RunStateGet Gets the run state.
RunStateSet Sets the run state.


Display

Sets a message to be displayed by the monitor.


Syntax

tsscmd Display message

Element Description
message The message to be displayed by the progress monitor.


Return Value

This command exits with one of the following results:


Comments

This message is displayed until overwritten by another call to Display.


Example

This example sets the monitor display to Beginning transaction. The quotes are optional.

tsscmd Display "Beginning transaction"

PositionGet

Gets the test script file name or line number position.


Syntax

LineAndFile=`tsscmd PositionGet`

Return Value

On success, this command returns the name of the source file in use and the current line position. The command exits with one of the following results:


Comments

TestManager monitoring options include Script View, causing test script lines to be displayed as they are executed. PositionSet and PositionGet partially support this monitoring option for TSS scripts: if line numbers are reported, they are displayed during playback but not the contents of the lines.

The line number returned by this function is the most recent value that was set by PositionSet. A return value of 0 for line number indicates that line numbers are not being maintained.


Example

This example gets the name of the current script file and the number of the line to be accessed next.

LineAndFile = `tsscmd PositionGet`

See Also

PositionSet


PositionSet

Sets the test script file name or line number position.


Syntax

tsscmd PositionSet [-source srcfile] lineno

Element Description
srcFile The name of the test script, or NULL for the current test script.
lineNumber The number of the line in srcFile to set the cursor to, or 0 for the current line.


Return Value

This command exits with one of the following results:


Comments

TestManager monitoring options include Script View, causing test script lines to be displayed as they are executed. PositionSet and PositionGet partially support this monitoring option for TSS scripts: if line numbers are reported, they are displayed during playback but not the contents of the lines.


Example

This example sets access to the beginning of test script checkLogin.

tsscmd PositionSet -s checkLogin 0

See Also

PositionSet


ReportCommandStatus

Reports the runtime status of a command.


Syntax

tsscmd ReportCommandStatus status

Element Description
status The status of a command. Can be one of the following:
  • FAIL

  • PASS

  • WARN

  • INFO


Return Value

This command exits with one of the following results:


Example

This example reports a failure command status.

tsscmd ReportCommandStatus FAIL

RunStateGet

Gets the run state.


Syntax

state=`tsscmd RunStateGet`

Return Value

On success, this command returns one of the run state values listed in the run state table starting on page76. The command exits with one of the following results:


Comments

This call is useful for storing the current run state so you can change the state and then subsequently do a reset to the original run state.


Example

This example gets the current run state.

orig = `tsscmd RunStateGet`

See Also

RunStateSet


RunStateSet

Sets the run state.


Syntax

tsscmd RunStateSet state

Element Description
state The run state to set. Enter one of the run state values listed in the run state table starting on page76.


Return Value

This command exits with one of the following results:


Comments

TestManager includes the option to monitor script progress individually for different virtual testers. The run states are the mechanism used by test scripts to communicate their progress to TestManager. Run states can also be logged and can contribute to performance analysis reports.

The following table lists the TestManager run states.

Run State Meaning
BIND iiop_bind in progress
BUTTON X button action
CLEANUP cleaning up
CPUDLY cpu delay
DELAY user-requested delay
DSPLYRESP displaying response
EXITED exited
EXITSQABASIC exited SQABasic code
EXTERN_C executing external C code
FIND find_text find_point
GETTASK waiting for task assignment
HTTPCONN waiting for http connection
HTTPDISC waiting for http disconnect
IIOP_INVOKE iiop_invoke in progress
INCL mask including above basic states
INIT doing startup initialization
INITTASK initializing task
ITDLY intertask delay
MOTION X motion
PMATCH matching response (precv)
RECV_DELAY line_speed delay in recv
SATEXEC executing satellite script
SEND httpsocket send
SEND_DELAY line_speed delay in send
SHVBLCK blocked from shv access
SHVREAD V_VP: reading shared variable
SHVWAIT user requested shv wait
SOCKCONN waiting for socket connection
SOCKDISC waiting for socket disconnect
SQABASIC_CODE running SQABasic code
SQLCONN waiting for SQL client connection
SQLDISC waiting for SQL client disconnect
SQLEXEC executing SQL statements
STARTAPP SQABasic: starting app
SUSPENDED suspended
TEST test case, emulate
THINK thinking
TRN_PACING transactor pacing delay
TUXEDO Tuxedo execution
TYPE typing
UNDEF user's micro_state is undefined
USERCODE SQAVu user code
WAITOBJ SQABasic: waiting for object
WAITRESP waiting for response
WATCH interactive -W watch record
XCLNTCONN waiting for http connection
XCLNTCONN waiting for socket connection
XCLNTCONN waiting for SQL client connection
XCLNTCONN waiting for X client connection
XCLNTDISC waiting for http disconnect
XCLNTDISC waiting for socket disconnect
XCLNTDISC waiting for SQL client disconnect
XCLNTDISC waiting for X client disconnect
XMOVEWIN X move window
XQUERY X query function
XSYNC X sync state during X query
XWINCMP xwindow_diff comparing windows
XWINDUMP xwindow_diff dumping window
N_INCL number of above states


Example

This example sets the run state to WAITRESP.

tsscmd RunStateSet WAITRESP

See Also

RunStateGet

prevnext


The Command Line Interface to Rational Test Script Services Rational Software Corporation
Copyright (c) 2003, Rational Software Corporation http://www.rational.com
support@rational.com
info@rational.com