Stopping tests on timeout

You can set a timeout for the test case to ensure that the test execution does not take longer than it should.

Note:
Applies to TestArchitect 8.3 Update 4 and higher.

In other words, you can set time limits in which the execution of test cases will comply. You might need to do this when non-responsive test script happens. If a test case encounters a section of script that does not respond or the script falls into infinite loops, your use of the test case timeout allows that test case to finish, when the tests time out.

Setting time limits for test cases has the following effects:

Note:
In TA-TFS integration, Not Finished can be mapped to various TFS test statuses. (Learn more.)

Definitions of a test case timeout

A test case timeout occurs during runtime when run duration, accumulated from the beginning of a test case, exceeds a specific timeout. Run duration is calculated by accumulating total time spent on automated test activities. Non-automated test activities, such as, compiling tests, licensing checking or collecting results, etc. are not included.

Specifying a test case timeout period

The test case timeout built-in setting is used to set timeout period for individual test cases.

Note:

This built-in setting can be configured

Scope of the test case timeout’s built-in setting

The test case timeout setting, just like other built-in settings, once declared within a single test run, remains present throughout the execution of master test modules and subtest modules within the test run. If test case timeout is called twice in the master test module or the subtest modules, the second invocation merely assigns a new value to the existing timeout period.

How a test case timeout configured in a master test module affects subtest modules

A test run might include subtest modules or test suites, which are called by the run test built-in action. When a subtest module is defined in a master test module, it will be assigned a finite amount of timeout. We can express this as a formula that uses these terms:

The following applies for the subtest module’s timeout value:

D[s] = D[m] - D[r]

When the run duration of the subtest module exceeds the assigned timeout value D[s], the remaining lines of the timed-out subtest module will be skipped immediately.

For example:

How a test case timeout affects the amount of timeout value dedicated to lead and deputy machines in synchronous remote execution

Note:
It is recommended that you are familiar with the concept of synchronous remote execution. You may refer to this topic for details.

Handling a test case timeout event

If you do not handle the event when the test case timeout occurs, TestArchitect moves to the subsequent test case; otherwise, you can provide TestArchitect with specific instructions as what to do when the timeout occurs.

Well-written test procedures include timeout handling that allows them to recover gracefully from unexpected timeout. In many cases when a test case timeout occurs, it is necessary not to interrupt the normal flow of processing, but to take a specific action or set of actions. The following built-in action and built-in setting serve this purpose:

Related information

test case timeout

cleanup timeout

on timeout action


Copyright © 2024 LogiGear Corporation. All rights reserved. LogiGear is a registered trademark, and Action Based Testing and TestArchitect are trademarks of LogiGear Corporation. All other trademarks contained herein are the property of their respective owners.

LogiGear Corporation

1730 S. Amphlett Blvd. Suite 200, San Mateo, CA 94402

Tel: +1 (650) 572-1400