Skip to content
Latchkey

Newman "could not find reporter" (junit/htmlextra) in CI

Newman reporters are separate npm packages. When you ask for -r junit or -r htmlextra without installing the reporter, Newman cannot load it and either warns or fails, and no report file is produced for CI to upload.

What this error means

Newman prints "could not find reporter \"htmlextra\"" or writes no JUnit XML, so the test-results upload step finds nothing to publish.

newman
newman: could not find "htmlextra" reporter
  ensure that the reporter is installed in the same directory as newman

Common causes

The reporter package is not installed

External reporters like newman-reporter-htmlextra must be installed separately; the JUnit reporter is built in but a custom one is not present.

The reporter is installed in a different location than Newman

A global Newman with a local reporter (or vice versa) cannot resolve the reporter module, so it is reported as missing.

How to fix it

Install the reporter alongside Newman

  1. Install Newman and the reporter in the same scope (both global or both local).
  2. Pass the reporter with -r and its output path.
  3. Upload the produced report as a CI artifact or test result.
.github/workflows/ci.yml
- run: npm install -g newman newman-reporter-htmlextra
- run: newman run collection.json -r cli,junit,htmlextra \
    --reporter-junit-export results/newman.xml

Use the built-in JUnit reporter for CI gating

The junit reporter ships with Newman and needs no extra install. Export the XML so the pipeline can parse pass/fail.

Terminal
newman run collection.json -r junit \
  --reporter-junit-export results/newman.xml

How to prevent it

  • Install external reporters in the same scope as Newman.
  • Export a JUnit XML so CI can gate on results.
  • Pin reporter versions with the Newman version.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →