当前位置:网站首页>Postman data driven
Postman data driven
2022-07-07 09:13:00 【zhangyr0916】
One 、 What is data driven
The process of executing test cases , Essentially different data for execution , Different input and output processes . We can use preset data files , To execute test cases , Achieve coverage of test points .
Two 、postman Data driven steps
scene : Multiple users log in at the same time
Step one : Data preparation , The data to be entered is usr,expect
postman Can be used in the csv perhaps json Format
①csv The format is as follows :

②json The format is as follows :

Step two : Create test set

Step three : Create an interface , Fill in URL、 Parameter data ,username Request parameters to get the incoming data { {usr}}

Step three : stay Test Add assertion in , There are two assertions here , Status code and user name

perhaps :

// Verification status code
pm.test(" Status code for 200", function () {
pm.response.to.have.status(200);
});
// Verify the user name in the returned data
pm.test(" The user name is correct ", function () {
var jsonData = pm.response.json();
pm.expect(jsonData.username).to.eql(data.expect);// Verify that the returned data is consistent with that in the data file
});
Step four : Execute test set
Step five : View the run results

边栏推荐
- 寄存器地址名映射
- 面试题:高速PCB一般布局、布线原则
- Analysis of Hessian serialization principle
- Count the number of words in the string c language
- Digital triangle model acwing 275 Pass a note
- Original collection of hardware bear (updated on June 2022)
- Cmake command line use
- Simulation volume leetcode [general] 1706 Where does the ball meet
- What is the value of getting a PMP certificate?
- How long does the PMP usually need to prepare for the exam in advance?
猜你喜欢

What are the conditions for applying for NPDP?

【Istio Network CRD VirtualService、Envoyfilter】

STM32串口寄存器库函数配置方法

2022-06-30 unity core 8 - model import

Implementation of corner badge of Youmeng message push

Locust performance test 3 (high concurrency, parameter correlation, assembly point)

串口实验——简单数据收发

How long does the PMP usually need to prepare for the exam in advance?

C language pointer (exercises)

STM32的时钟系统
随机推荐
What is the value of getting a PMP certificate?
Goldbach conjecture C language
[chaosblade: delete pod according to the tag, pod domain name access exception scenario, pod file system i/o failure scenario]
Interview question: general layout and wiring principles of high-speed PCB
Several stages of PMP preparation study
Serializer & modelserializer of DRF serialization and deserialization
Led analog and digital dimming
OpenGL三维图形绘制
硬件大熊原创合集(2022/06更新)
OpenGL 3D graphics rendering
Output a spiral matrix C language
STM32串口寄存器库函数配置方法
C语言指针(习题篇)
模拟卷Leetcode【普通】1567. 乘积为正数的最长子数组长度
NVIC interrupt priority management
LeetCode 736. LISP syntax parsing
PMP experience learning and sharing process
STM32 serial port register library function configuration method
Locust performance test 5 (analysis)
2021 year end summary