当前位置:网站首页>Postman core function analysis - parameterization and test report
Postman core function analysis - parameterization and test report
2022-07-05 22:19:00 【TEST_ Two black】
1. Parametric processing
A parameterized : For an interface , There are a large number of test data that need to be verified in batch , Changing request parameters one by one is too time-consuming and labor-consuming , It is more efficient to use parameterized batch data processing , The general implementation is through document parameterization .
create a file Format CSV
The first line of information in the file It needs to match the parameter variable
Batch execution
Add assertion data
2. Postman Generate test reports
Postman Use runner Runtime , The generated report can only be in Postman Inside view , It's not very convenient . So you can generate a HTML The report , Open it through the browser
Postman Need generation HTML Reports need to use newman, With the help of newman Tool generation .
2.1 install newman
newman It's using node.js Development , Specially for postman A tool plug-in for generating test reports . We need to install node.js、newman、newman plug-in unit :newman-reporter-html
download node.js:https://nodejs.org/en/ Proposed installation 15 perhaps 16 edition
npm install -g cnpm –
registry=https://registry.npm.taobao.org install newman: open cmd, Input npm install -g newman
install newman-reporter-html open cmd, Input npm install -g newman-reporter-html
2.2newman The command runs the use case
newman run Use case set .json -e Environmental documents .json -d Data files .json -r html --repoter-html-export report.html
newman run Use case set .json The meaning of running a use case set
-e Environmental documents .json Specify the running environment
-d Data files .json Specify the data to run
-r html Generate html The report
–reporter-html-export report.html Appoint html Report name is report.html
You need to export the script before execution / Data files / Environment files such as :
After execution, the directory generates a report file
边栏推荐
- QT creator 7-cmake update
- Leetcode simple question ring and rod
- How to reverse a string fromCharCode? - How to reverse String. fromCharCode?
- K210 learning notes (IV) k210 runs multiple models at the same time
- Storage optimization of performance tuning methodology
- database mirroring
- C language - structural basis
- A trip to Suzhou during the Dragon Boat Festival holiday
- A number of ventilator giants' products have been recalled recently, and the ventilator market is still in incremental competition
- Technology cloud report won the special contribution award for the 10th anniversary of 2013-2022 of the "cloud Ding Award" of the global cloud computing conference
猜你喜欢
Livelocks and deadlocks of concurrency control
Stored procedures and stored functions
Decorator learning 01
[error record] file search strategy in groovy project (src/main/groovy/script.groovy needs to be used in the main function | groovy script directly uses the relative path of code)
点到直线的距离直线的交点及夹角
Win11缺少dll文件怎么办?Win11系统找不到dll文件修复方法
Implementation technology of recovery
Calculation method of boundary IOU
The simple problem of leetcode is to split a string into several groups of length K
Overview of concurrency control
随机推荐
Business learning of mall commodity module
119. Pascal‘s Triangle II. Sol
Countdown to 92 days, the strategy for the provincial preparation of the Blue Bridge Cup is coming~
boundary IoU 的计算方式
Oracle views the data size of a table
GWT module may need to be (RE) compiled reduce - GWT module may need to be (RE) compiled reduce
MySQL disconnection reports an error MySQL ldb_ exceptions. OperationalError 4031, The client was disconnected by the server
Sentinel production environment practice (I)
Concurrency control of performance tuning methodology
Promql demo service
A substring with a length of three and different characters in the leetcode simple question
The American Championship is about to start. Are you ready?
[error record] groovy function parameter dynamic type error (guess: groovy.lang.missingmethodexception: no signature of method)
航海日答题小程序之航海知识竞赛初赛
"Chris Richardson microservices series" uses API gateway to build microservices
Livelocks and deadlocks of concurrency control
Wonderful review of the digital Expo | highlight scientific research strength, and Zhongchuang computing power won the digital influence enterprise award
Text组件新增内容通过tag_config设置前景色、背景色
Search: Future Vision (moving sword)
1.3 years of work experience, double non naked resignation agency face-to-face experience [already employed]