LR笔记



Action()
{


int a=1;
    web_set_max_html_param_len("10000000");
//获取portal地址
web_reg_save_param("server_url",
"LB=ServerUrl\":\"",
"RB=\",\"LoginName",
LAST);
//获取uniqueid
web_reg_save_param("unique_id",
"LB=UserToken\":\"",
"RB=\",\"ExpireSeconds",
LAST);


//认证接口测试
web_reg_find("Text=\"RetCode\":200",
LAST);
srand(time(0));
a=rand()%5;
lr_log_message("a====%d",a);
lr_rendezvous("auth");


lr_start_transaction("auth");
web_url("authTerminal",
"URL=http://www.sitvs.com/auth/terauth/authTerminal?sn=11111&terminalType=stb&mac=2323",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_end_transaction("auth", LR_AUTO);
lr_think_time(5);
/*
lr_log_message("unique_id=%s",lr_eval_string("{unique_id}"));
lr_log_message("server_url=%s",lr_eval_string("{server_url}"));




//获取contentId
web_reg_save_param("contentId",
"LB=contentId",
"RB=\",",
"ORD=1",
"SaveOffset=4",
LAST);


//推荐接口测试
web_reg_find("Text=status\": \"200",
LAST);



lr_start_transaction("BoxHome");
web_url("authTerminal",
"URL={server_url}/apiBoxHome/boxHome?uniqueId={unique_id}",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_end_transaction("BoxHome", LR_AUTO);
lr_log_message("contentId=%s",lr_eval_string("{contentId}"));




//详情接口测试


web_reg_find("Text=status\": \"200",
LAST);
lr_start_transaction("MovieInfo");
web_url("authTerminal",
"URL={server_url}/apiMovies/getMovies?uniqueId={unique_id}&moviesId={contentId}",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_end_transaction("MovieInfo", LR_AUTO);
*/


return 0;
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值