StSetExecutionTimeOut Function

Action

Sets the timeout for the execution of a testcase.

Include file

StAutomation.bdh

Syntax

StSetExecutionTimeOut( in nTimeOut : number );

Return value

  • true if successful

  • false otherwise

Parameter Description
nTimeOut Execution timeout in seconds. Null means unlimited timeout.

Example

transaction TMain
var
  sUser     : string;
  sPassword : string;
begin
  AttributeGetString("Username", sUser);
  AttributeGetString("Password", sPassword);
  if (StInitSession(sUser, sPassword)) then
    StLoadProject("package.stp");
    StSetExecutionTimeOut(50000);
    StSetOption(ST_OPTION_TRUELOG_OPTIONS, ST_TRUELOG_ALL);
    StExecuteTestcase("scriptFile.t", "testcase", "\" testdata\",10", "MyTimer1");
    StLogoffSession();
  end;
end TMain;