When running ATF tests that have client-side steps that will envoke the client test runner, test steps will return 'Success' but the test may timeout or return failure.
Steps to Reproduce
- Navigate to: System UI > UI Pages, and click on "New".
- Input any name. Copy the following in the "Client script" field:
for (var i = 0; i < 10000; i++)
- Click on "Submit".
- Navigate to: Automated Test Framework (ATF) > Tests and click on "New".
- Input any value for "Name" and click on "Save".
- Click on "Add Test Step", navigate to the "Form" category and select "Open an Existing Record".
- Set Table to "UI Page [sys_ui_page]" and Record to the UI page created in Steps 1-3 and click on"Submit".
- Click on"Add Test Step", navigate to "Form" category and select "Click a UI Action".
- Set Table to "UI Page [sys_ui_page]" and UI action to "Try It", then click on "Submit".
- Click on "Run Test", select "Start a new test runner" then click on "Run Test".
> Expected: Test should run to completion without issue.
> Observed: Test seems to run in the client test runner, but gets stuck with a full progress bar at "Finished test execution, reporting result".
In the browser console, the message "ReportUITestProgress.reportBatchResult: failed X time(s) to report batch result, http status 0, trying again" is reported repeatedly until the batch times out after 10 minutes
The test eventually ends in failure with output "The test timed out because the max execution time (600 seconds) was reached while executing steps 1 - 2"
Here is an example of the type of errors seen in the browser console:
Turning off debug mode will allow ATF tests to pass that are encountering this issue.
- Navigate to: Automated Test Framework -> Administration -> Properties
- Under "Test Debugging Properties" uncheck the "Yes" checkbox for "Enables additional debugging functionality..."
- Save the form.
This problem is currently under review. You can contact ServiceNow Technical Support or subscribe to this Known Error article by clicking the Subscribe button at the top right of this form to be notified when more information will become available.
Related Problem: PRB1378364