loadrunner截取变量的字符串+连接两个字符串
截取变量的字符串:
char * token;
token=lr_eval_string("{NewCookie}")+7;//从{NewCookie}的第7个字符后开始取值
lr_output_message("###the first occurrence of t :%s ",token);
连接两个字符串:
char mytoken[1024];
char *start="Bearer ";
web_reg_save_param("Token",//获取响应头中Token字段数据
"LB=token=",
"RB=\r\nContent-Length",
"Search=Headers",
LAST);
.........
strcpy(mytoken,start);
//或者strcpy(mytoken,"Bearer ");
strcat(mytoken,lr_eval_string("{Token}"));
lr_output_message("%s",mytoken);