Reports

Generate and interpret Restlyn HTML, PDF, and JSON reports, including CLI flags for CI pipelines.

Restlyn provides detailed test execution reports in HTML and, with optional Puppeteer installed, PDF formats.


πŸ“„ How Reports Are Generated

After running your tests using:

restlyn verify --report

Restlyn will:

  1. Run .test.js files using Mocha
  2. Collect results, logs, metadata
  3. Write a JSON summary to:

    generated/report/restlyn-report.json
    
  4. Create:

    • restlyn-report.html (interactive, collapsible view)
    • restlyn-report.pdf (flat printable version)

Both are saved to:

generated/report/

✨ What’s Included in the Report

Each scenario in the report includes:

  • βœ… Status (pass/fail)
  • βŒ› Duration (ms)
  • πŸ“ Feature, Scenario, and optional Title
  • πŸ”– Tags like @debug, @retry, @skip
  • πŸͺœ Steps from .feature
  • πŸ“‹ Full Log Output
  • 🧾 Schema validation errors (if any)

🧾 HTML Report

  • Auto-opens in browser after --report
  • Fully collapsible per test case
  • Log section expandable via <details>

πŸ“„ PDF Report

  • Requires optional Puppeteer and its matching browser installation; without it PDF export is skipped
  • Non-collapsible, always expanded for printing

πŸ•’ Timestamp

Each report includes the test run timestamp (e.g., 2025-08-03T21:45:00Z) under the header.


πŸ” Retry Insights

If scenarios include @retry(n) tags:

  • Retry count is visible in the test metadata
  • Mocha’s .retries() is applied

🧩 Behind the Scenes

  • Generated using custom verifyAllTests() + generateReport()
  • Uses open and puppeteer to open and export
  • Supports inline logs, schema diffs, token capture traces

Use restlyn verify --report after every test run to stay informed!

Optional PDF dependency

npm install --save-dev puppeteer

Allow its browser installation to complete. Re-run restlyn verify --report and check that restlyn-report.pdf actually exists. A PDF-related console message alone does not confirm successful export.

Migrated from the Restlyn documentation, with reviewed example and configuration corrections. Original Restlyn documentation.