当前位置:网站首页>Postman核心功能解析-参数化和测试报告
Postman核心功能解析-参数化和测试报告
2022-07-05 22:16:00 【TEST_二 黑】
1.参数化处理
参数化:针对于某一个接口,有大量的的测试数据需要批量验证,一个一个的更改请求参数太耗时耗力,使用参数化批量处理数据会比较高效,常规通过文档参数化实现。
创建文件 格式CSV
文件内第一行信息 需要和参数变量匹配
批量执行
添加断言数据
2. Postman生成测试报告
Postman使用runner运行时,生成的报告只能在Postman内部查看,并不是很方便。所以可以生成一个HTML报告,通过浏览器打开即可
Postman需要生成HTML报告需要使用newman,借助newman工具生成。
2.1安装newman
newman是使用node.js开发,专门为postman做的生成测试报告的工具插件。我们需要安装node.js、newman、newman插件:newman-reporter-html
下载node.js:https://nodejs.org/en/ 建议安装15或者16版本
npm install -g cnpm –
registry=https://registry.npm.taobao.org安装newman:打开cmd,输入npm install -g newman
安装newman-reporter-html打开cmd,输入npm install -g newman-reporter-html
2.2newman命令运行用例
newman run 用例集.json -e 环境文件.json -d 数据文件.json -r html --repoter-html-export report.html
newman run 用例集.json运行用例集的意思
-e 环境文件.json 指定运行的环境
-d 数据文件.json 指定运行的数据
-r html 生成html报告
–reporter-html-export report.html 指定html报告名称是report.html
执行前需要导出脚本/数据文件/环境文件例如:
执行后目录生成报告文件
边栏推荐
- Comment développer un plug - in d'applet
- 多家呼吸机巨头产品近期被一级召回 呼吸机市场仍在增量竞争
- Sub total of Pico development
- Oracle hint understanding
- Technology cloud report: how many hurdles does the computing power network need to cross?
- PyGame practical project: write Snake games with 300 lines of code
- ICMP introduction
- The new content of the text component can be added through the tag_ Config set foreground and background colors
- 2022-07-05: given an array, you want to query the maximum value in any range at any time. If it is only established according to the initial array and has not been modified in the future, the RMQ meth
- The statistics of leetcode simple question is the public string that has appeared once
猜你喜欢
Database recovery strategy
Metaverse Ape上线倒计时,推荐活动火爆进行
科技云报道:算力网络,还需跨越几道坎?
【愚公系列】2022年7月 Go教学课程 004-Go代码注释
装饰器学习01
每日刷题记录 (十四)
The real situation of programmers
The American Championship is about to start. Are you ready?
Leetcode simple question ring and rod
Shell script, awk condition judgment and logic comparison &||
随机推荐
What about data leakage? " Watson k'7 moves to eliminate security threats
Livelocks and deadlocks of concurrency control
Implementing Lmax disruptor queue from scratch (IV) principle analysis of multithreaded producer multiproducersequencer
Shell script, awk condition judgment and logic comparison &||
Win11 runs CMD to prompt the solution of "the requested operation needs to be promoted"
Database tuning solution
DataGrid directly edits and saves "design defects"
Pl/sql basic syntax
Common interview questions of redis factory
Search: Future Vision (moving sword)
元宇宙中的三大“派系”
科技云报道:算力网络,还需跨越几道坎?
Serializability of concurrent scheduling
Win11运行cmd提示“请求的操作需要提升”的解决方法
boundary IoU 的计算方式
Character conversion PTA
Summary of concurrency control
K210学习笔记(四) K210同时运行多个模型
Text组件新增内容通过tag_config设置前景色、背景色
A number of ventilator giants' products have been recalled recently, and the ventilator market is still in incremental competition