Postman + Newman generate test reports

1. Install Node.js 

Download:  https://nodejs.org/download/

 

2. Install Newman

1) Open cmd, enter: npm install -g newman

2) install the support assembly Newman report generated html

npm install -g newman-reporter-html
 

3.postman export test suite

Note: The postman need to export test suite

 If the environment variable, you need to export the environment variable data

 

 Implementation of test cases in 4.newman

newman run f:\esearch.json -r html --reporter-html -export f:\result.html
Note: f: \ esearch.json is derived test suite postman, f: \ result.html for the exported test report
 
If there is an environment variable, execute
newman run f:\esearch.json -e f:\es.json -k -r html --reporter-html -export f:\result.html
Note: f: \ es.json as environment variables exported file
 
The following test report generation result.html
 

 

 

 

 

Guess you like

Origin www.cnblogs.com/wakey/p/11598874.html