Overview
A test case containing a loop may stop executing prematurely, even when settings like 'Continue on Verification Failure' and 'Continue on Error' are enabled. This can occur when the loop is designed to run for many iterations. While it may seem like the failure handling settings are being ignored, the issue is typically related to the total number of steps executed in the test run.
How It Works
The platform has a built-in limit on the maximum number of steps a single test case can execute in one run. This limit is in place to ensure stability and prevent excessive resource usage. When a test contains a loop, the steps inside that loop are executed for each iteration, and each execution counts toward the total step count.
For example, if a loop contains 45 steps and is set to iterate many times, the total number of steps can quickly accumulate. Once the total executed step count for the entire test reaches the platform's maximum limit (approximately 1,000 steps), the test will be terminated. This termination is a hard stop imposed by the system and is independent of the 'Continue on Failure' settings.
Limitations
To ensure optimal performance and reliability, it is important to be aware of the following execution limits:
- Maximum Step Limit: A single test execution will stop after approximately 1,000 steps.
- Best Practice: For best results, design test cases to be around 600 steps or fewer.
If your test is exceeding this limit, consider the following solutions:
- Optimize the Loop: Review the steps inside the loop and remove or consolidate any unnecessary actions. Reducing even a few steps within the loop can significantly lower the total step count across all iterations.
- Split the Test Case: Divide the workflow into multiple smaller test cases. You can then run these tests sequentially as part of an orchestration to achieve the complete workflow.