Introduction to tsscmd |
If an error occurs in a script, the script stops running and (ususally) TestManager generates an error file. However, for command line test scripts (including those containing tsscmd statements), TestManager does not log a Fail result for scripts that fail. Your script is responsible for error checking and handling.
All tsscmd statements return numeric status codes, which are documented with each statement. In addition, many return values as well. For example, when successful SharedVarWait
returns:
On failure, SharedVarWait
returns one of three integers (4, 5, 8) indicating the cause of the failure. The following fragment indicates how you could check for status return codes and obtain additional information about a failure in Perl.
$before = `tsscmd SharedVarWait -t 60000 svFoo 10 20'; $? = $? >> 8; if ($? == 0) { `tsscmd LogMessage timeout expired, value was $before`; } elsif ($? == 1) { `tsscmd LogMessage condition was met before timeout expired`; } else { `tsscmd LogMessage unexpected exit status $?`; $detail = `tsscmd ErrorDetail'; chomp ($detail); `tsscmd LogMessage $detail`; }
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 |