📅  最后修改于: 2023-12-03 14:44:34.605000             🧑  作者: Mango
Newman Docs is a comprehensive documentation for Newman, a command-line tool that helps with running Postman collections. Newman allows you to run and test Postman collections directly from the command-line, integrate it with your build systems and automate your tests.
To install Newman, run:
npm install -g newman
This installs Newman globally on your machine.
To run a collection using Newman, you first need to export your collection from Postman as a JSON file. You can then run the collection using the following command:
newman run path/to/collection.json
This will run the collection and print the results to the console. Newman also supports a number of different command-line options, such as specifying environment variables, running tests on specific folders, and more.
Newman can easily be integrated into your build system or continuous integration platform. Newman can run collections in a CI environment and generate reports for you to view the test results.
Here is an example of how to integrate Newman with Jenkins:
Newman generates a comprehensive report of your test run. You can choose to output this report in different formats, including HTML and JSON.
To output an HTML report, run the following command:
newman run path/to/collection.json --reporter-html myreport.html
This will generate an HTML report of your test run, which you can view in a browser.
Newman Docs is a powerful tool that can help you automate your API testing workflows. It's easy to use, and makes it simple to integrate with your existing tools and workflows. Try it out today and see how it can benefit your team!