当前位置:网站首页>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 .
边栏推荐
- Undo log and redo log must be clear this time
- IDEA Dashboard
- Haitai Advanced Technology | application of privacy computing technology in medical data protection
- The Google File System (GFS) learning notes
- Responsibility chain mode -- through interview
- Where is 5g really powerful? What is the difference with 4G?
- What does virtualization mean? What technologies are included? What is the difference with private cloud?
- Procedural life: a few things you should know when entering the workplace
- Berkeley, MIT, Cambridge, deepmind and other industry leaders' online lectures: towards safe, reliable and controllable AI
- Material management system based on SSM (source code + document + database)
猜你喜欢
宅男救不了元宇宙
Byte and Tencent have also come to an end. How fragrant is this business of "making 30million yuan a month"?
Background of master data construction
伯克利、MIT、剑桥、DeepMind等业内大佬线上讲座:迈向安全可靠可控的AI
虚拟化是什么意思?包含哪些技术?与私有云有什么区别?
Intermediary model -- collaboration among departments
When querying the database with Gorm, reflect: reflect flag. mustBeAssignable using unaddressable value
Freshman girls' nonsense programming is popular! Those who understand programming are tied with Q after reading
图的基本概念以及相关定义
Bridging mode -- law firm
随机推荐
Is the waiting insurance record a waiting insurance evaluation? What is the relationship between the two?
Leetcode(146)——LRU 缓存
Selenium crawl notes
苹果、微软、谷歌不再掐架,今年要合力干一件大事
With its own cells as raw materials, the first 3D printing ear transplantation was successful! More complex organs can be printed in the future
Jd.com: how does redis implement inventory deduction? How to prevent oversold?
伯克利、MIT、劍橋、DeepMind等業內大佬線上講座:邁向安全可靠可控的AI
The largest DPU manufacturer in history (Part 1)
2022年最新四川建筑八大员(电气施工员)模拟题库及答案
VMware virtual machine setting static IP
Camera rental management system based on qt+mysql
Leetcode(135)——分发糖果
Vant component used in wechat applet
字节、腾讯也下场,这门「月赚3000万」的生意有多香?
Ribbon source code analysis @loadbalanced and loadbalancerclient
opds sql组件能不能将流程参数通过上下文传给下一个组件
Compressed list of redis data structures
Stackoverflow annual report 2022: what are developers' favorite databases?
When querying the database with Gorm, reflect: reflect flag. mustBeAssignable using unaddressable value
IDEA Dashboard