使用newman 生成测试postman的测试报告

newman

1、安装nodejs:

下载地址:https://nodejs.org/en/download/

选择自己系统相对应的版本内容进行下载,然后傻瓜式安装

查看是否安装成功,打开cmd输入node -v

2、安装newman:

npm install -g newman

3、安装html报告

npm install -g newman-reporter-html

postman生成测试报告

1、首先从postman中导出测试用例

 

2、newman执行测试

打开cmd,找到存放用例的路径,执行下面的一些命令:

  1.newman run 1.json -r html

  

  2.newman run 1.json --bail newman

 3.newman run 1.json --bail newman -n 3 

    迭代次数变为3次

4.newman run 1.json --reporter-html-export C:\Users\pc\Desktop\test_result.json

  指定报告生成的路径

 

猜你喜欢

转载自www.cnblogs.com/tengyun99/p/12889665.html
今日推荐