Test Script Services Reference |
This section documents functions that may be required by applications. They are not typically used by test scripts.
A suite can contain multiple test scripts of different types. When TestManager executes a suite, a separate session is started for each type of script in the suite. Each session lasts until all scripts of the type have finished executing. Thus, if a suite contains three Visual Basic test scripts and six VU test scripts, two sessions are started and each remains active until all scripts of the respective types finish.
tsscmd statements are executed outside TestManager, by a proxy TSS server process. If TestManager (or rttsee) encounters a tsscmd statement and no proxy server process is running, one is started. Each tsscmd statement connects to this process, and then disconnects after the service completes.
Applications can use the session commands listed in the following table to manage proxy TSS servers and sessions on behalf of test scripts. commands.
Context
Passes context information to a TSS server.
ServerStart
Starts a TSS proxy server.
ServerStop
Stops a TSS proxy server.
Passes context information to a TSS server.
tsscmdContext
ctx
value
ctx
The type of context information to pass: Can be one of the following:
value
The information of type
ctx
to pass.
This commandexits with one of the following results:
ctx
is invalid.
This command passes information, such as the log file name, that would be passed through shared memory if the script were executed by TestManager. Where used in a script, it should be used first, before any other tsscmd command. Otherwise, inconsistent results can occur.
This example passes a working directory to the current proxy TSS server.
tsscmd Context
workingDir "C:\temp"
p
=`tsscmdServerStart
[port
]`
port
The listening port for the TSS server. If omitted (recommended), the system chooses the port and returns its number to
p
.
This command exits with one of the following results:
port
.
ErrorDetail
for information.
ErrorDetail
for information.
No TSS server is started if one is already running. A test script that is to be executed by a proxy server and that might be the first to execute should make this call.
This example starts a proxy TSS server on a system-designated port, whose number is returned to port
.
port = `tsscmd ServerStart
`
tsscmdServerStop
port
port
The port number that the TSS server to be stopped is listening on.
This commandexits with one of the following results:
port
.
ErrorDetail
for information.
In a test suite with multiple scripts, only the last executed script should make this call.
This example stops a proxy TSS server listening on port 3825.
tsscmd ServerStop
3825
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 |