on timeout action
Specify the action to be invoked in the event of a timeout event, which occurs in the
INITIAL
section, individual test cases, as well as the FINAL
section.Name | Description | Type | Modifier |
---|---|---|---|
action | Name of the action to be executed | String | None |
argument<index> | (Optional) Arguments to be passed to the action specified in the action argument. | String | None |
This action may be used within the following project items: test modules and user-defined actions.
Example - Case 1: Timeout handler with no arguments
Action lines
In TestArchitect, create a user-defined action named "timeout handler" with below sample script.
image location
capture screen D:\Images\timeout_handler.jpg
Input the user-defined action "timeout handler" for the "action" argument of the "on timeout action" action. In this way, the script will call the "timeout handler" action when the execution gets a timeout.
Initial
setting value
setting test case timeout 30
 
setting value
setting cleanup timeout 12
 
action
on timeout action timeout handler
Test case: TC 01, Invalid login
username password
login john doe
 
window message button
check message welcome Invalid username or password ok
Example - Case 2: Failure handler with arguments
Action lines
In TestArchitect, create a user-defined action named "timeout handler" with below sample script.
name
argument arg1
argument arg2
 
text
report #arg1
report #arg2
Input the user-defined action "timeout handler" for the "action" argument of the "on timeout action" action. In this way, the script will call the "timeout handler" action when the execution gets a timeout.
Initial
setting value
setting test case timeout 30
 
setting value
setting cleanup timeout 15
 
action arg1 arg2
on timeout action timeout handler first argument second argument
Test case: TC 01, Invalid login
username password
login john doe
 
window message button
check message welcome Invalid username or password ok
- Applies to TestArchitect 8.3 Update 4 and higher.
- The number of optional arguments depends on the requirements of the action specified in action. (See Examples below.)
- The invoked action has its own timeout period which is configured in the cleanup timeout built-in setting. Therefore, when the duration of the test case timeout’s action handler exceeds the timeout period, the remaining lines of the action handler will stop instantly.
- This action supports the <ignore> modifier. If the string
<ignore>
is present as the value of any of the arguments, or any argument contains an expression that evaluates to<ignore>
, the action is skipped during execution.