postman 分享

2021-02-08  本文已影响0人  微笑的AK47

主要以下内容

1.postman 接口关联

2.断言

3.输出报告


1.postman 接口关联

接口1 http://apis.juhe.cn/simpleWeather/query?city=南京&key=07b3b6dfb94c3f67d968c08a3eab356f

接口2 http://apis.juhe.cn/simpleWeather/query?city={{city}}&key=07b3b6dfb94c3f67d968c08a3eab356f

接口2需要从接口1中返回的值中取值 

接口2 使用接口1 返回的值作为参数 

2.断言

3.输出报告

1  下载安装node.js

2运行npm install -g newman 命令,再运行 newman -v 命令检查安装

3运行npm install newman-reporter-html命令安装html插件

4.导出接口

5.运行 newman run C:\Users\xxxx\Desktop\mall.json -r html --reporter-html-export C:\Users\winshang\Desktop\mall.html命令回车即可生成报告如下图

断言
上一篇下一篇

猜你喜欢

热点阅读