一、 响应断言
定义:官网给出的定义是:The response assertion control panel lets you add pattern strings to be compared against various fields of the response.对服务器的响应进行断言校验
二、 应用范围
范围:
main sample and sub sample, main sample only , sub-sample only , jmeter variable
解释:
一般默认为main sample only,因为我们一个请求,实质上只有一个请求。但是当我们发一个请求时,可以触发多个服务器请求,类似于ajax,所以就有了main sample 和sub-sample之分。
官网给出的解释是:
Main sample only – assertion only applies to the main sample
Sub-samples only – assertion only applies to the sub-samples
Main sample and sub-samples – assertion applies to both.
JMeter Variable – assertion is to be applied to the contents of the named variable
三、 响应字段
对应字段:
响应文本,Document(Text),url样本,响应代码,响应信息,Response Header