webservices02-随机码登陆

/*工作需要-上网管家项目接口压力测试脚本*/

Action()
{

 lr_start_transaction("key");
 lr_start_transaction("resultcode");
 lr_start_transaction("resultmessage");

 web_service_call( "StepName=login_101",
  "SOAPMethod=PortalService|PortalServiceHttpPort|login",
  "ResponseParam=response",
  "Service=PortalService",
  "ExpectedResponse=SoapResult",
  "Snapshot=t1389335132.inf",
  BEGIN_ARGUMENTS,
  "in0=toRandomCode",
  "in1=32432874328787",                                             /*手机imei号*/
  "in2={\"usertel\":\"13598058621\",\"randomcode\":\"999999\"}",   /*请求json事件:使用\\进行转义(登录号和随机码)此次的随机码暂时是固定的*/
  END_ARGUMENTS,
  BEGIN_RESULT,
  "out/key=Param_key",
  "out/resultcode=Param_resultcode",
  "out/resultmessage=Param_resultmessage",
  END_RESULT,
  LAST);

 if (strstr(lr_eval_string("{Param_key}"),"000000")){                   /*本段if语句,用于接收接口返回值,呈现在回访日志中*/

 lr_end_transaction("key",LR_AUTO);
 lr_output_message("11-------:%s",lr_eval_string("{Param_key}"));
 }
 else{
  lr_end_transaction("key",LR_AUTO);
  lr_output_message("22-------:%s",lr_eval_string("{Param_key}"));
 }
 lr_think_time(3);

  if (strstr(lr_eval_string("{Param_resultcode}"),"000000")){

 lr_end_transaction("resultcode",LR_AUTO);
 lr_output_message("11-------:%s",lr_eval_string("{Param_resultcode}"));
 }
 else{
  lr_end_transaction("resultcode",LR_AUTO);
  lr_output_message("22-------:%s",lr_eval_string("{Param_resultcode}"));
 }
 lr_think_time(3);

  if (strstr(lr_eval_string("{Param_resultmessage}"),"000000")){

 lr_end_transaction("resultmessage",LR_AUTO);
 lr_output_message("11-------:%s",lr_eval_string("{Param_resultmessage}"));
 }
 else{
  lr_end_transaction("resultmessage",LR_AUTO);
  lr_output_message("22-------:%s",lr_eval_string("{Param_resultmessage}"));
 }
 lr_think_time(3);


 return 0;
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值