使用 newman 实现接口自动化
1、安装 newman
(1)先要安装好 node 和 npm
(2)使用 npm 安装 newman
npm install -g newman

将 collection 以json格式导出来保存到路径1

将 json格式的测试用例也保存到 路径1
使用命令:
newman run learn.postman_collection.json -d node_name.json -r "html,json,cli,junit"
即可运行 node_name.json提供的测试用例并生成 这四种形式的测试报告

网友评论