Test logs record

  • Release version: Xanadu
  • Updated August 1, 2024
  • 2 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Test logs record

    The Test Logs record captures detailed information about test execution within ServiceNow's Automated Test Framework (ATF). It stores console logs, test results, and error messages generated during test runs, providing visibility into each test step's performance and issues encountered. These records are maintained in thesysatftestresultitemtable and can be accessed via the Test Log related list on the Test Results form.

    Show full answer Show less

    Key Features

    • Status Tracking: Test logs indicate the outcome of each test step or suite, including statuses like Success, Failure, Warning, Ignored, Running, Skipped, Error, or Cancelled. This helps quickly identify the state and health of tests.
    • Test Log Types: Entries are categorized as Step Result, Client Log, or Client Error. Client Errors can be managed by adding them to Allowed Client Errors to prevent repeated failures.
    • Detailed Output: For step results, logs include console outputs and explanations for failures or skips. Client logs capture log entry text, and client errors show error details encountered in the browser environment.
    • Execution Metadata: Each log records information such as the executed step name, associated test result reference, test step description, browser type and version, start and end times, duration, and the timestamp of the log entry.
    • Integration with Allowed Client Errors: Client errors can be linked to Allowed Client Error records, enabling suppression or warning levels to control test execution impact.

    Practical Benefits for ServiceNow Customers

    • Improved Test Visibility: Easily track and diagnose test execution issues with comprehensive logs and status indicators.
    • Error Management: Manage recurring client errors proactively by using the Allowed Client Errors feature, reducing false negatives during automated testing.
    • Efficient Troubleshooting: Access detailed step-level information and error messages to quickly understand and resolve test failures or environment issues.
    • Enhanced Test Reporting: Correlate test logs with test results for clear insights into test suite performance and client-side behavior across browser types and versions.

    The Test Results Item (test log) record contains console logging and test execution information.

    During test execution, any information reported to the environment is recorded in the Test Log (sys_atf_test_result_item) table. This information can include browser console logging, results, and error messages recorded by step environments. You access specific test logs from the Test Log related list in the Test Results form.

    Field Description
    Status The result of the test log:
    Success
    Test step run passed.
    Failure
    Test step run failed.
    Success with warning(s)
    Test step passed but encountered client error(s) that were allowed as warnings in the Allowed Client Error table.
    Ignored
    Client error that has been allowed with a report level of Ignored.
    Warning
    Client error that has been allowed with a report level of Warning.
    Waiting
    Test or suite waiting to start.
    Running
    Test or suite is running.
    Skipped
    Occurs if an earlier test in the suite failed and Abort on failure is set to true.
    Error
    An error occurred in the test framework. For example, the test runner halted or the server encountered an unintended scenario. The error message appears in the Summary field of the Steps Results record for the step that threw the error.
    Cancelled
    User canceled the test or suite.
    Type Type of test log:
    • Step Result
    • Client Log
    • Client Error
    Note:
    If a Client Error, you can optionally add it as an ignored or warning entry in the Allowed Client Errors. Doing so prevents the allowed client errors from affecting ATF test executions when they recur in future test runs. For more details, refer to Allowed client errors.
    Output Output generated for the test log.
    • For a step result, the console logging and test execution outputs from the step, including any explanation why a step failed or was skipped.
    • For a client log, the log entry text.
    • For a client error, the actual client error is displayed.
    Step Name of the step executed. This field may be blank for a client log.
    Test Result Reference to the test result associated with this step result. Click Reference field icon to view detailed test result information.
    Description For a step result, the actions performed in this test step.

    For a client log, blank.

    For a client, this message displays: This client error occurred on the page in Browser Type Browser Version (for example, Chrome 62.0.3202.62).

    Start time Time at which this test step started executing.
    End time Time at which this test step finished executing.
    Duration Time duration it took to execute this test step.
    Recorded at Time at which this step or log entry was recorded.
    Allow listed client error Reference to the Allowed Client Error record (if any). Click Reference field icon to view the Allowed Client Error record for this client error.