当前位置:网站首页>JMeter response assertion
JMeter response assertion
2022-06-24 20:48:00 【m0_ sixty-two million four hundred and ninety-six thousand nine】
Assertions are also called checkpoints , You can write your expected results into the assertion , If the actual response data shows your expected results , that jmeter It is judged that the interface passes , If the actual results do not meet your expectations , that jmeter The interface fails .
1. Response assertion : Perform Assertion Verification on the response interface of the server , To judge whether the return value of the interface obtained from the interface test is correct

- Add assertions :
- apply to: Usually, only one request is triggered when a request is issued , So check “main sample only” Can ; If you send a request, you can trigger multiple server requests , There is main sample and sub-sample It's too late
2. Response fields to test :
(1.) General http Respond to , Check all “ The response text ”;
(2.)url The sample is right sample Of url To assert that
Response code :http Response code , Such as 101,200,302,404,501 etc. . When we want to verify 404,501 etc. http Response code , You need to check “ ignore status”. Because when http The response code is 400,500 when ,jmeter By default, this request fails ;
3、 Pattern matching :
(1) Include : The return result includes the content you specify
(2) matching : amount to equals . When the return value is fixed , You can return a value to make an assertion , Effect and equals identical ;
(3) SubString: And “ Include ” almost , All means that the returned result includes the content you specify
(4) no : It's equivalent to taking the opposite . If the assertion turns out to be true, Check “ no ” after , The final assertion result is false. If the assertion turns out to be false, Check “ no ” after , The final assertion result is true
4、 The pattern to test : Enter the expected value of the result

Does not match the entered expectations , It is judged that the task failed , View the result tree and mark the task result in red ;
Match the expectations entered , It is judged that the task is successful View the result tree and mark the task result in green .
边栏推荐
- Intermediary model -- collaboration among departments
- Builder mode -- Master asked me to refine pills
- 基于SSM的物料管理系统(源码+文档+数据库)
- Enjoy yuan mode -- a large number of flying dragons
- 图的基本概念以及相关定义
- Mapstacks: data normalization and layered color layer loading
- The difference between RPC and restful
- Haitai Advanced Technology | application of privacy computing technology in medical data protection
- Set up your own website (14)
- 开放可编程基础设施(OPI)项目,重新定义DPU/IPU
猜你喜欢

Berkeley, MIT, Cambridge, deepmind et d'autres grandes conférences en ligne: vers une IA sûre, fiable et contrôlable

顺序栈遍历二叉树

Background of master data construction

Dongyuhui is not enough to bring goods to "rescue" live broadcast

Difference between map and object

虚拟化是什么意思?包含哪些技术?与私有云有什么区别?

在Dialog中使用透明的【X】叉叉按钮图片

VMware virtual machine setting static IP

Vant component used in wechat applet

Combination mode -- stock speculation has been cut into leeks? Come and try this investment strategy!
随机推荐
实现基于Socket自定义的redis简单客户端
海泰前沿技术|隐私计算技术在医疗数据保护中的应用
微信小程序自定义tabBar
两位湖南老乡,联手干出一个百亿IPO
Coinbase will launch the first encryption derivative for individual investors
OpenVINO2022 Dev Tools安装与使用
Smooth live broadcast | analysis of key technologies for live broadcast pain points
The JS method parameter passed a number beginning with 0. A magical problem occurred and bothered me for a long time
Stackoverflow annual report 2022: what are developers' favorite databases?
Sequence stack version 1.0
The four stages of cloud computing development have finally been clarified
Implement the redis simple client customized based on socket
京东一面:Redis 如何实现库存扣减操作?如何防止商品被超卖?
Bean lifecycle flowchart
Openvino2022 dev tools installation and use
Intermediary model -- collaboration among departments
顺序表的基本操作
2021-09-30
Combination mode -- stock speculation has been cut into leeks? Come and try this investment strategy!
Popupwindow touch event transparent transmission scheme