当前位置:网站首页>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

边栏推荐
- Bitbucket installation configuration
- 极狐公司官方澄清声明
- Sentinel production environment practice (I)
- Hcip day 16
- 344. Reverse String. Sol
- Win11缺少dll文件怎么办?Win11系统找不到dll文件修复方法
- When the industrial Internet era is truly mature, we will look at the emergence of a series of new industrial giants
- Leetcode simple question: the minimum cost of buying candy at a discount
- Daily question brushing record (XIV)
- 1.3 years of work experience, double non naked resignation agency face-to-face experience [already employed]
猜你喜欢

Implementation technology of recovery

Meituan dynamic thread pool practice ideas, open source

Stored procedures and stored functions

IIC bus realizes client device

MySQL连接断开报错MySQLdb._exceptions.OperationalError 4031, The client was disconnected by the server

Serializability of concurrent scheduling

Overview of concurrency control

Server optimization of performance tuning methodology

Metaverse Ape获Negentropy Capital种子轮融资350万美元

Three "factions" in the metauniverse
随机推荐
Type of fault
How to quickly experience oneos
Leetcode simple question check whether all characters appear the same number of times
Decorator learning 01
Performance monitoring of database tuning solutions
Countdown to 92 days, the strategy for the provincial preparation of the Blue Bridge Cup is coming~
ESP32 hosted
Meituan dynamic thread pool practice ideas, open source
C language - structural basis
How to reverse a string fromCharCode? - How to reverse String. fromCharCode?
Platformio create libopencm3 + FreeRTOS project
Analysis of the problem that the cookie value in PHP contains a plus sign (+) and becomes a space
Blocking protocol for concurrency control
Draw a red lantern with MATLAB
Learning of mall permission module
700. Search in a Binary Search Tree. Sol
K210 learning notes (IV) k210 runs multiple models at the same time
[error record] groovy function parameter dynamic type error (guess: groovy.lang.missingmethodexception: no signature of method)
A long's perception
Depth first DFS and breadth first BFS -- traversing adjacency tables