postman接口自动化

第一步安装node.js:

安装教程:

https://www.runoob.com/nodejs/nodejs-install-setup.html

查看是否安装成功:

node --version

 

第二步安装newman:

执行:npm install -g newman

第三步安装newman-reporter-html

执行:newman-reporter-html

成功截图

第四部从postman导出json文件:

 

第五步在命令执行脚本:

newman run D:\开发平台\审核.postman_collection.json --reporters cli,html,json,junit --reporter-json-export jsonOut.json --reporter-junit-export xmlOut.xml --reporter-html-export D:\开发平台\htmlOut.html

生成:html ,json,xml 的结果文件,打开html 可查看测试报告,后续可集成Jenkins进行接口自动化

 

posted @ 2019-05-20 11:31  mahaining  阅读(314)  评论(0编辑  收藏  举报