lr直接點(diǎn)擊創(chuàng)建腳本,然后在action中編寫代碼,即可。
具體腳本如下所示:
Action()
{
int status;
lr_start_transaction("send");
web_reg_find("Search=All", //檢查點(diǎn)函數(shù)的設(shè)置
"SaveCount=ret_Count", //查找的參數(shù)保存的名字
"Text=ahbei",
LAST);
status=web_url("usermsg",
"URL= http://bubbler.labs.douban.com/j/user/ahbei", //要進(jìn)行測(cè)試的接口
"TargetFrame=Main",
"Resource=0",
"RecContentType=text/html",
"Mode=http",
LAST );
lr_output_message("Request Status:%d",status);
lr_output_message("查找到的返回值個(gè)數(shù):%d",atoi(lr_eval_string("{ret_Count}")));
if (atoi(lr_eval_string("{ret_Count}")) > 0){//這里判斷檢查到的個(gè)數(shù)
lr_output_message("Rec successful.");
lr_end_transaction("send", LR_PASS);
}
else{
lr_error_message("Rec failed");
lr_end_transaction("send", LR_FAIL);
}
return 0;
}
網(wǎng)頁(yè)題目:LRhttp接口測(cè)試模板-創(chuàng)新互聯(lián)
本文網(wǎng)址:http://jinyejixie.com/article36/eigpg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站導(dǎo)航、網(wǎng)站收錄、服務(wù)器托管、響應(yīng)式網(wǎng)站、關(guān)鍵詞優(yōu)化、網(wǎng)站建設(shè)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容