事物:通过事物可以查看服务器的响应时间以及事物通过/失败率
1、从开始到结束的过程,定义为事物;事物的成功率和响应时间是开始标记到结束标记
2、事物判断分为:自动判断和手段判断
自动判断:判断时状态码
手工判断:通过状态码判断;通过检查点判断
一、通过事物查看某个业务的响应时间
1、手工判断事物是否成功。
检查点函数:文本检查:web_find与web_reg_find
插入检查点步骤:点击插入,选择新建步骤,
添加步骤搜索框搜锁函数名:web_reg_find
检查点文本框;第一行:输入服务器返回的响应数据
搜索范围选择框:选择全部/ALL
保存计数:以变量名的形式保存参数
检查点函数代码如下:
if (atoi(lr_eval_string("{number}"))>0){
lr_end_transaction("开始登录",LR_PASS);
}else{
lr_end_transaction("开始登录",LR_FAIL);
}
检查点---->检查业务是否成功
web_reg_find()------>注册型检查点函数
web_find()----->普通检查点函数
web_image_check()----->图片检查点函数