批量执行数据




安装node.js
验证:node.js是否安装成功
安装newman:npm install -g newman
配置newman环境:
验证:newman是否安装成功
newman的命令
常见的参数
-e: 使用环境变量
-g: 使用全局变量
-d: 使用csv,text,json数据驱动
-n:循环次数
-r :cli,html,json,junit --reporter-html-export
命令:
newman run C:\Users\jack\Desktop\postman_collection.json
生成测试报告
首先下载html:npm install -g newman-reporter-html
newman run C:\Users\23788\Desktop\2021.12.3.postman_collection.json -r html --reporter-html-export report123.html
这篇博客介绍了如何利用node.js和newman工具进行批量数据执行。首先,需要安装node.js并验证其安装成功。接着,通过npm全局安装newman,并确认安装状态。newman的主要命令包括设置环境变量、全局变量、数据驱动和循环次数等选项。文章还提到了newman运行Postman集合的命令,并指导如何生成HTML测试报告。



826

被折叠的 条评论
为什么被折叠?



