Middle
What do you know about Newman?
sobes.tech AI
Answer from AI
Newman is a command-line tool for running Postman collections. It allows automating the execution of tests and integration with CI/CD systems.
Main features and capabilities of Newman:
- Running Postman collections from the terminal.
- Support for all types of HTTP requests (GET, POST, PUT, DELETE, etc.).
- Handling environment variables.
- Executing pre-request scripts and test scripts.
- Generating reports in various formats (HTML, JSON, JUnit).
- Support for parallel test execution.
- Integration with CI/CD tools like Jenkins, GitLab CI, Travis CI.
Example of running a collection using Newman:
newman run my_collection.json -e my_environment.json -r cli,html --reporter-html-export report.html
In this example:
my_collection.json- Postman collection export file.-e my_environment.json- Postman environment variables file.-r cli,html- specifies two report formats: CLI (console output) and HTML.--reporter-html-export report.html- sets the filename for the HTML report.
Advantages of using Newman:
- Automation: Allows automating API tests.
- Integration: Easily integrates with CI/CD pipelines.
- Reports: Provides convenient reports on test execution.
- Flexibility: Supports various configuration options.
Newman is an indispensable tool for automating API testing developed with Postman.