Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Principle:Nightwatchjs Nightwatch Results And Reporting

From Leeroopedia
Knowledge Sources
Domains Testing, Reporting
Last Updated 2026-02-12 00:00 GMT

Overview

A test result aggregation and reporting pattern that collects execution outcomes and formats them for human review or CI/CD integration.

Description

After test execution completes, results must be collected, aggregated, and reported in consumable formats. Test reporting serves two audiences: developers reviewing test runs (console output, HTML reports) and CI/CD systems consuming machine-readable formats (JUnit XML). The reporting system supports a custom reporter hook that receives the complete results object, enabling user-defined processing such as sending notifications, writing custom formats, or integrating with external dashboards.

Usage

Use this principle to understand how test results are captured and reported. The built-in JUnit XML reporter writes to tests_output/ by default. Custom reporters can be defined in the globals module for additional processing.

Theoretical Basis

The reporting pipeline follows a collect-aggregate-format pattern:

  1. Collect individual test results (pass/fail/skip/error per assertion)
  2. Aggregate results by test suite, then by overall run
  3. Format via configured reporters (JUnit XML, HTML, custom)
  4. Invoke custom reporter hook with aggregated results
  5. Output to file system and/or console

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment