当前位置:网站首页>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 .
边栏推荐
- Ribbon source code analysis @loadbalanced and loadbalancerclient
- C语言实现扫雷(简易版)
- 顺序栈遍历二叉树
- Predicate
- 等保备案是等保测评吗?两者是什么关系?
- 苹果不差钱,但做内容“没底气”
- Behind Tiantian Jianbao storm: tens of millions in arrears, APP shutdown, and the founder's premeditated plan to run away?
- Simulation lottery and probability statistics experiment of the top 16 Champions League
- The difference between RPC and restful
- Bridging mode -- law firm
猜你喜欢

Berkeley, MIT, Cambridge, deepmind and other industry leaders' online lectures: towards safe, reliable and controllable AI

Vant component used in wechat applet

Apple doesn't need money, but it has no confidence in its content

The Network Security Review Office launched a network security review on HowNet, saying that it "has a large amount of important data and sensitive information"

Responsibility chain mode -- through interview

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

Wechat applet custom tabbar

Map跟object 的区别

Interpreter mode -- formulas for dating

图像PANR
随机推荐
Stackoverflow annual report 2022: what are developers' favorite databases?
建立自己的网站(14)
等保备案是等保测评吗?两者是什么关系?
Agency mode -- Jiangnan leather shoes factory
C语言实现扫雷(简易版)
Byte and Tencent have also come to an end. How fragrant is this business of "making 30million yuan a month"?
微信小程序中使用vant组件
It is said that Tencent officially announced the establishment of "XR" department to bet on yuanuniverse; Former CEO of Google: the United States is about to lose the chip competition. We should let T
Tool composition in JMeter
红象云腾完成与龙蜥操作系统兼容适配,产品运行稳定
Leetcode(135)——分发糖果
2021-09-30
Popupwindow touch event transparent transmission scheme
Learn together and make progress together. Welcome to exchange
Stop using system Currenttimemillis() takes too long to count. It's too low. Stopwatch is easy to use!
基于SSM的物料管理系统(源码+文档+数据库)
用手机摄像头就能捕捉指纹?!准确度堪比签字画押,专家:你们在加剧歧视
主数据建设的背景
物聯網?快來看 Arduino 上雲啦
“拯救”直播带货,一个董宇辉还不够