Test Script Services Reference

prevnext

Session Commands


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.


Summary

Applications can use the session commands listed in the following table to manage proxy TSS servers and sessions on behalf of test scripts. commands.

Command Description
Context Passes context information to a TSS server.
ServerStart Starts a TSS proxy server.
ServerStop Stops a TSS proxy server.


Context

Passes context information to a TSS server.


Syntax

tsscmd Context ctx value

Element Description
ctx The type of context information to pass: Can be one of the following:
  • workingDir

  • datapoolDir

  • timeZero

  • todZero

  • logDir

  • logFile

  • logData

  • testScript

  • style

  • sourceUID

value The information of type ctx to pass.


Return Value

This commandexits with one of the following results:


Comments

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.


Example

This example passes a working directory to the current proxy TSS server.

tsscmd Context workingDir "C:\temp"

ServerStart

Starts a TSS proxy server.


Syntax

p=`tsscmd ServerStart [port]`

Element Description
port The listening port for the TSS server. If omitted (recommended), the system chooses the port and returns its number to p.


Return Value

This command exits with one of the following results:


Comments

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.


Example

This example starts a proxy TSS server on a system-designated port, whose number is returned to port.

port = `tsscmd ServerStart`

See Also

ServerStop


ServerStop

Stops a TSS proxy server.


Syntax

tsscmd ServerStop port

Element Description
port The port number that the TSS server to be stopped is listening on.


Return Value

This commandexits with one of the following results:


Comments

In a test suite with multiple scripts, only the last executed script should make this call.


Example

This example stops a proxy TSS server listening on port 3825.

tsscmd ServerStop 3825

See Also

ServerStart

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