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

边栏推荐
- 2020 year end summary
- Test Engineer Interview Questions 2022
- 2022-07-06 Unity核心9——3D动画
- Leetcode刷题记录(数组)组合总和、组合总和 II
- Count the number of words C language
- External interrupt to realize key experiment
- Hard core sharing: a common toolkit for hardware engineers
- H3C vxlan configuration
- Recommended by Alibaba P8, the test coverage tool - Jacobo is very practical
- Why is access to the external network prohibited for internal services of the company?
猜你喜欢

2022-07-06 unity core 9 - 3D animation

端口复用和重映像

PMP certificate preparation experience sharing

MySQL master-slave delay solution

Confitest of fixture py

Hard core sharing: a common toolkit for hardware engineers

H3C VXLAN配置

Postman interface test (I. installation and use)

What are the conditions for applying for NPDP?

面板显示技术:LCD与OLED
随机推荐
LeetCode 736. LISP syntax parsing
Original collection of hardware bear (updated on June 2022)
Selenium mouse sliding operation event
2021 year end summary
Two schemes of unit test
[chaosblade: node disk filling, killing the specified process on the node, suspending the specified process on the node]
外部中断实现按键实验
模拟卷Leetcode【普通】1705. 吃苹果的最大数目
Personal deduction topic classification record
MySQL master-slave delay solution
C language for calculating the product of two matrices
Goldbach conjecture C language
Calculation s=1+12+123+1234+12345 C language
Full link voltage test of the e-commerce campaign Guide
What is the value of getting a PMP certificate?
Three updates to build applications for different types of devices | 2022 i/o key review
Interview question: general layout and wiring principles of high-speed PCB
面试题:高速PCB一般布局、布线原则
Simulation volume leetcode [general] 1557 The minimum number of points that can reach all points
STM32 serial port register library function configuration method