newman-reporter-clif
v1.0.5
Published
A Newman reporter that outputs to and file system
Readme
newman-reporter-clif
A Newman reporter that outputs CLI logs to a file for advanced automation, debugging, and audit needs.
Why Output CLI Logs to a File?
- Automation & CI/CD: Capture detailed run logs for automated pipelines, enabling easy review and troubleshooting of API test results.
- Audit & Compliance: Maintain persistent records of test executions for compliance, traceability, and historical analysis.
- Debugging: Share log files with teammates or support for faster issue resolution, even when running tests on remote servers or containers.
- Integration: Feed logs into monitoring tools, dashboards, or custom scripts for further analysis and reporting.
- Scalability: Run multiple Newman processes in parallel, each writing to its own log file for isolated, organized output.
Features
- Outputs all CLI reporter content to a specified log file.
- Supports custom log file paths via
--reporter-clif-logFilePath. - Optionally allows or strips ANSI color codes from log output for compatibility with plain-text viewers or rich terminals.
- Works seamlessly with Newman and Postman collections.
- Easy to integrate into CI/CD workflows and server environments.
Controlling ANSI Characters in Log Output
By default, ANSI color codes (used for colored/styled terminal output) are stripped from the log file for maximum compatibility with text editors and log processors.
To allow ANSI characters (preserve colors and formatting in the log file), use the allowAsni reporter option:
newman run <collection.json> -r clif --reporter-clif-logFilePath "./my-run.log" --reporter-clif-allowAsni trueTo strip ANSI characters (default behavior), omit the option or set it to false:
newman run <collection.json> -r clif --reporter-clif-logFilePath "./my-run.log"This lets you choose between plain-text logs (for easy parsing and sharing) or rich logs with color (for advanced terminal viewers).
Installation
npm install -g newman-reporter-clifLicense
ISC
