Allowed client errors
Summarize
Summary of Allowed client errors
ServiceNow's Automated Test Framework (ATF) allows customers to manage client-side JavaScript errors by adding known errors to an allowed client errors list. This feature enables tests and steps to continue running despite specific client errors, helping maintain test continuity and reduce false failures.
Show less
Key Features
- Allowing Client Errors: Test designers and developers can temporarily or permanently allow certain client errors based on scenarios such as timing constraints, legacy library issues, ongoing test design, or potential platform bugs.
- Report Levels: Customers can configure the report level for each allowed client error to either Warning or Ignored.
- Warning: The test step reports success with a warning and records the error in logs as a warning.
- Ignored: The test step reports success and the error is recorded as ignored in the logs.
- Error Matching: ATF uses a "contains" search to identify allowed errors, meaning any client error message containing the allowed error string is matched and treated accordingly.
- Automatic Updates: Changes to allowed client error entries are automatically updated in the Client Test Runner for immediate effect.
- Multiple Ways to Allow Errors: Errors can be allowed directly from test results, step results, test logs, or manually by creating entries in the Allowed Client Errors table.
Practical Guidance for ServiceNow Customers
- Use this feature to prevent known, non-critical client errors from blocking your test execution, especially when dealing with legacy issues or ongoing development.
- Always investigate client errors rather than ignoring them permanently, as they may indicate underlying business process or customization issues.
- Adjust report levels over time to reflect the evolving impact and relevance of specific client errors in your testing environment.
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.