When executing the test LoadView can abort test sessions and mark them with the Uncompleted status. In the most cases, this type of sessions does not present any statics that can be meaningful for the test result analysis. Thus, by default, we DO NOT consider uncompleted sessions as sessions with failures and DO NOT include uncompleted session data into the error statistics and test reports. However, in some cases, you may need to use uncompleted session details for more in-depth analysis and troubleshooting.
There are two types of uncompleted sessions depending on their effect on the test results.
The first type is the most common and includes sessions that were started at the very end of a test and aborted due to the test duration time was over. Once the test duration time is up, LoadView waits 30 more seconds after the actual test end time and aborts all uncompleted test sessions automatically. If some test sessions were started at the end of the test run and not completed within these extra 30 seconds, they will be aborted. To sum up, sessions of this type do not have data that can affect the test statistics and can be omitted while interpreting the test results.
The second type includes sessions with script replay issues. In these cases, some or all test sessions will be aborted during the test run. While you may still have the test results presented in the Load Test Summary report, the test sessions log may contain statistics on fewer sessions than you expect or no statistics at all (if all test sessions were aborted). To troubleshoot tests with this type of uncompleted sessions, you need to resolve the issues occurred on script replay.
There are two main issues that lead to the abortion of the script execution:
- Persistent errors that occurred in the beginning of the script execution and significantly increase the script duration. This type of sessions will be aborted on the script completion timeout (15 minutes).
- Inconsistency between the script duration and test duration, when the test duration is shorter than the actual script duration. In this case, there will be no time enough to complete the script replay and all test sessions will be aborted upon completion of the test.
In this article, we will have a closer look at each type of uncompleted sessions and provide recommendations on how to avoid the related issues.
Sessions with Script Errors
Errors that occurred while replaying a script at the very beginning of the script execution are the second common reason for uncompleted sessions. For example, errors can occur due to slowdown under the load or script errors (e.g., not valid input data, validation failures). If LoadView failed to replay an action from the script, it waits for the action completion timeout (from 50 sec to 2 min depending on the action type) and moves forward to the next action in the script. Usually, the errors that occurred in the beginning of a script lead to the failure in subsequent actions. More failed actions you have in the script, more waiting time will be added to the script duration. Thus, when you have a long script, the script duration can increase significantly and exceed the script completion timeout (15 minutes). In this case, LoadView will automatically abort the session.
If the issue persists during the test run, all sessions will be aborted and the test results won’t be correct. To troubleshoot issues like these, review uncompleted sessions details and performance reports, and fix the corresponding script errors.
Long Sessions Uncompleted Due to Short Test Duration
One more reason for test sessions being aborted is a long test script, while a test duration is being too short to replay the whole script. To avoid this type of uncompleted sessions in your test, make sure that your test duration is enough to complete the script replay. To do this, configure the test execution plan to have the Test Duration value at least 5 times bigger than the actual script duration:
Test Duration = Script Duration * 5
Sometimes the actual duration of your script may be unclear since some steps such as keyword validation or delays between steps can increase it. Moreover, LoadView automatically adds user delays to simulate real user behavior. To find the actual duration of your script, check your test device validation results.
Uncompleted Sessions and Load Test Error Statistics
Uncompleted sessions do not affect test error statistics. However, you can include them into load test reports if it is necessary.