当前位置:网站首页>可能导致Loadrunner检查点中savecount为0的分析
可能导致Loadrunner检查点中savecount为0的分析
2022-08-09 07:56:00 【洛央虲】
在做检查点的时候,时常遇到savecount变量一直为0,既不是编码的问题,也不是次数显示等问题。以下做了可能导致Loadrunner检查点中savecount为0的简单的分析。
1、首先确定要检查的是页面还是submit后的返回数据
2、若是要检查的是页面的,将检查点函数放在要检查的页面的前面也就是web_url()前面
web_reg_find("SaveCount=loginst",
"Text=欢迎您",
LAST);
web_url("userpage",
"URL=http://www.100vr.com/100vr/index/userpage",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t7.inf",
"Mode=HTML",
LAST);
if(strlen(lr_eval_string("{loginst}"))>0)
{
lr_output_message("登陆成功!");
lr_end_transaction("login",LR_PASS);
}
else{
lr_output_message("登陆失败!");
lr_end_transaction("login",LR_FAIL);
}
F5运行,查看运行结果
vuser_init.c(110): Notify: Saving Parameter "loginst = 1".
vuser_init.c(110): web_url("userpage") was successful, 238370 body bytes, 4301 header bytes [MsgId: MMSG-26386]
vuser_init.c(122): 登陆成功!
vuser_init.c(123): Notify: Transaction "login" ended with "Pass" status (Duration: 1.8752 Wasted Time: 0.1710).
Ending action vuser_init.
Running Vuser...
3、如果检查的是submit提交的返回值,那么要把web_reg_find()放到submit()前面
web_reg_find("SaveCount=loginst",
"Text=a",
LAST);
web_submit_data("checkuser",
"Action=http://www.100vr.com/100vr/login/checkuser/",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://www.100vr.com/100vr/login",
"Snapshot=t6.inf",
"Mode=HTML",
ITEMDATA,
"Name=username", "Value=<user>", ENDITEM,
"Name=password", "Value=<pwd>", ENDITEM,
"Name=remember", "Value=undefined", ENDITEM,
"Name=ctfid", "Value=428314848", ENDITEM,
LAST);
web_url("userpage",
"URL=http://www.100vr.com/100vr/index/userpage",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t7.inf",
"Mode=HTML",
LAST);
if(strlen(lr_eval_string("{loginst}"))>0)
{
lr_output_message("登陆成功!");
lr_end_transaction("login",LR_PASS);
}
else{
lr_output_message("登陆失败!");
lr_end_transaction("login",LR_FAIL);
}
边栏推荐
猜你喜欢
随机推荐
软件测试的岗位会越来越少吗?
RAID配置实战
工信部等四部门推动绿色智能家居产品下乡
[STL]list
3D精彩案例,清软英泰建成综合轻量化显示平台!
C语言笔记 学习预处理 学习宏定义
PyTorch中 torch.nn与torch.nn.functional的区别
VRRP原理及配置
LeetCode·每日一题·761.特殊的二进制序列·分治
种子数据报错:liquibase.exception.ValidationFailedException: Validation Failed
C语言:打印菱形
EXCEL使用函数联调(find,mid,vlookup,xlookup)
SOLIDWORKS Simulation教程:计算物体的固有频率
Unity 3D模型展示框架篇之资源打包、加载、热更(二)
我的创作纪念日
IDEA文件UTF-8格式控制台输出中文乱码
交换机基本原理与配置
oracle存储过程问题解答
Kotlin Coroutines - Exception Handling
MYSQLWorkbench看数据库ER图