人的差别在于业余时间,而一个人的命运决定于晚上8点到10点之间。 北京安全测试精英QQ群:164265622 北京白盒测试精英QQ群:164265999 北京性能测试精英QQ群:164266156 北京自动化测试精英群:212723528 北京软件测试精英QQ群:86920845

(转载)今天写了一个webservice的loadrunner脚步和大家分享一下

上一篇 / 下一篇  2012-03-19 09:47:01 / 个人分类:性能测试

原文:http://blog.csdn.net/gzh0222/article/details/6887708
 
 
Action()
{
    int msgcount=0;
char next_message_id[32]="";


lr_start_transaction("心跳");


web_service_call( "StepName=getSysMessageCount_101",
"SOAPMethod=DCMessageWS|DCMessageWSSoap|getSysMessageCount",
"ResponseParam=response",
"Service=DCMessageWS",
"ExpectedResponse=SoapResult",
"Snapshot=t1318991539.inf",
BEGIN_ARGUMENTS,
"userId={userID}",
"companyId=1",
"imei=000000000000000",
END_ARGUMENTS,
BEGIN_RESULT,
"getSysMessageCountResult=Param_getSysMessageCountResult",
END_RESULT,
LAST);


lr_end_transaction("心跳", LR_AUTO);


    msgcount=atoi(lr_eval_string("{Param_getSysMessageCountResult}"));


    if (msgcount>=100){


do {


        lr_save_string(next_message_id,"msgID");


lr_start_transaction("查看所有系统消息");


web_service_call( "StepName=GetSysMessDetailBytime_101",
"SOAPMethod=DCMessageWS|DCMessageWSSoap|GetSysMessDetailBytime",
"ResponseParam=response",
"Service=DCMessageWS",
"ExpectedResponse=SoapResult",
"Snapshot=t1318992631.inf",
BEGIN_ARGUMENTS,
"msgID={msgID}",
"userId={userID}",
"imei=000000000000000",
"companyId=1",
END_ARGUMENTS,
BEGIN_RESULT,
"GetSysMessDetailBytimeResult=Param_GetSysMessDetailBytimeResult",
"nextmsgID=Param_nextmsgID",
END_RESULT,
LAST);


lr_end_transaction("查看所有系统消息", LR_AUTO);


strcpy(next_message_id,"");


strcpy(next_message_id,lr_eval_string("{Param_nextmsgID}"));


}while(strcmp(lr_eval_string("{Param_nextmsgID}"),"")!=0);


    }


return 0;
}

TAG:

 

评分:0

我来说两句

Open Toolbar