Allowed client errors
Summarize
Summary of Allowed Client Errors
ServiceNow allows you to manage client-side errors during testing by adding known client errors to an allowed list. This enables the Automated Test Framework to continue running tests despite specific errors, which is crucial for maintaining test integrity and minimizing disruptions caused by known issues.
Show less
Key Features
- Scenarios for Allowing Client Errors:
- Timing Constraints: Temporarily allow errors for unresolved issues in legacy code.
- Minimizing Impact: Ignore non-critical errors from outdated libraries.
- Test Design Time: Permit errors while completing test development.
- Possible Platform Bugs: Allow errors until they can be reported and addressed.
- Report Levels: Specify how the test framework handles errors:
- Warning: Reports the error but continues tests, displaying a warning status.
- Ignored: Continues tests without reporting the error.
- Matching Process: Errors are identified through a "contains" search, allowing flexibility in error message matching.
Key Outcomes
By adding client errors to the allowed list, you can ensure that your tests remain functional even in the presence of known issues. However, it is essential to investigate these errors to maintain business process integrity. Additionally, the ability to adjust report levels allows you to manage the visibility of these errors in test results effectively.
Add known client errors to the allowed client errors list to allow tests and steps to continue running when a specific error occurs. Set the report level to specify what the Automated Test Framework does when the error occurs in future tests.
Scenarios for allowing client errors
Test designers and developers typically allow client-side JavaScript errors to prevent certain types of known failures from impacting test design and results. Scenarios to allow client errors include:
- Timing constraints
- Temporarily allow a client error until your developers have time to investigate and resolve the issue. For example, when testing an old form containing a longstanding bug.
- Minimizing the impact of old libraries
- Ignore client errors that cannot be fixed or are unimportant to your operations to eliminate their impact on future test runs. For example, when you find a bug in an old library.
- Test design time
- Temporarily allow client errors until you finish writing tests and have time to investigate the error. For example, one of your developers modifies a UI policy and the change generates an error.
- Possible platform bug
- Temporarily allow client errors until a fix is available. Prior to reporting a platform bug to ServiceNow Technical Support, investigate the error, verify it is not a customization error, and identify the type of platform bug involved. For example, a UI policy generates an error during a test. Your investigation verifies that the issue is not a customization error and identifies a platform issue with the UI policy.
Report levels for allowed client errors
The report level indicates whether the test framework reports future occurrences of the error as a warning or ignores them altogether. You can change the report level of an allowed error at any time. For example, if you originally add an error as a warning, you can later change the report level to ignored.
| Report level | Description |
|---|---|
| Warning | Test steps containing the allowed client error report a status of Success with warning(s). The error message appears in the test result output, and is recorded in the test logs with the status Warning. |
| Ignored | Test steps containing the allowed client error report a status of Success. The error is recorded in the test logs with an Ignored status. |
Matching process
Identifying and resolving client errors
When client errors occur, the Automated Test Framework fails the test on the step that was executing when the error occurred.