当前位置:网站首页>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
边栏推荐
- PMP Exam details after the release of the new exam outline
- 面板显示技术:LCD与OLED
- Unityshader introduction essentials personal summary -- Basic chapter (I)
- Serial port experiment - simple data sending and receiving
- Cmake command line use
- C language pointer (special article)
- ChaosBlade:混沌工程简介(一)
- Several stages of PMP preparation study
- Output a spiral matrix C language
- Panel display technology: LCD and OLED
猜你喜欢
Implementation of corner badge of Youmeng message push
Port multiplexing and re imaging
External interrupt to realize key experiment
Skill review of test engineer before interview
外部中断实现按键实验
[istio introduction, architecture, components]
Output a spiral matrix C language
Register address name mapping
Reading notes of pyramid principle
Troublesome problem of image resizing when using typora to edit markdown to upload CSDN
随机推荐
【Istio Network CRD VirtualService、Envoyfilter】
How can I apply for a PMP certificate?
Do you have any certificates with high gold content?
Reading notes of pyramid principle
What is the use of PMP certificate?
【ChaosBlade:节点 CPU 负载、节点网络延迟、节点网络丢包、节点域名访问异常】
Test Engineer Interview Questions 2022
Reflections on the way of enterprise IT architecture transformation (Alibaba's China Taiwan strategic thought and architecture practice)
Interview question: general layout and wiring principles of high-speed PCB
PMP Exam Preparation experience, seek common ground while reserving differences, and successfully pass the exam
How to pass the PMP Exam in a short time?
硬件大熊原创合集(2022/05更新)
OpenGL 3D graphics rendering
【ChaosBlade:节点磁盘填充、杀节点上指定进程、挂起节点上指定进程】
Cmake command line use
Original collection of hardware bear (updated on May 2022)
OpenGL frame buffer
Unityshader introduction essentials personal summary -- Basic chapter (I)
2020 year end summary
Led analog and digital dimming