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: could not find "htmlextra" reporter
ensure that the reporter is installed in the same directory as newmanCommon 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
- Install Newman and the reporter in the same scope (both global or both local).
- Pass the reporter with
-rand its output path. - Upload the produced report as a CI artifact or test result.
- run: npm install -g newman newman-reporter-htmlextra
- run: newman run collection.json -r cli,junit,htmlextra \
--reporter-junit-export results/newman.xmlUse 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.
newman run collection.json -r junit \
--reporter-junit-export results/newman.xmlHow 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.