Reporters show test results in different ways. They help you understand what passed or failed easily.
Reporter options (CLI, HTML, JUnit) in Postman
newman run collection.json --reporters cli,html,junit --reporter-html-export report.html --reporter-junit-export report.xml
Use --reporters to specify one or more reporters separated by commas.
Use --reporter- to save the report to a file.
newman run mycollection.json --reporters cli
results.html.newman run mycollection.json --reporters html --reporter-html-export results.html
newman run mycollection.json --reporters junit --reporter-junit-export results.xml
newman run mycollection.json --reporters cli,html,junit --reporter-html-export report.html --reporter-junit-export report.xml
This command runs a Postman collection from a URL using Newman. It shows results in the terminal, creates an HTML report saved as test-report.html, and creates a JUnit XML report saved as test-report.xml.
newman run https://api.getpostman.com/collections/12345678-1234-1234-1234-123456789abc?apikey=your_api_key --reporters cli,html,junit --reporter-html-export test-report.html --reporter-junit-export test-report.xml
CLI reporter is the default and shows results in your terminal.
HTML reporter creates a colorful, easy-to-read report you can open in a browser.
JUnit reporter creates XML files useful for CI/CD tools like Jenkins or GitLab.
Reporter options let you choose how to see your test results.
Use CLI for quick terminal output, HTML for detailed reports, and JUnit for tool integration.
You can use multiple reporters at once to get different views of your test results.