转载:loadrunner事务判断常用方法

//判断关联到的字符串是否为空

if (strlen(lr_eval_string("{param}")) == 0);
 
//判断关联的字符串是否跟期望的值相同
if(strcmp(lr_eval_string("{param}"), "expected") == 0);
 
//判断关联的字符数组count是否为0,这种情况适合 ORD=ALL
的关联方式
if(atoi(lr_eval_string("{param_count}")) == 0);
 
//根据返回的响应码是不是200
int HttpRetCode;
HttpRetCode = web_get_int_property(HTTP_INFO_RETURN_CODE);
if (HttpRetCode == 200)

 

posted on 2019-11-11 13:08  柳絮纷飞飞满天  阅读(258)  评论(0编辑  收藏  举报

导航