loadrunner问题

上一篇 / 下一篇  2011-10-08 17:31:06

 

Action()
{
 int httpcode;
 char POSTURL[2000];
 long length;
 
 
 web_set_max_html_param_len("1024");
  
 web_reg_save_param("resultCode",
  "LB=result resultCode=\"",
  "RB=\"",
  "NotFound=ERROR",
  LAST);
 

 web_create_html_param("GETURL","<url>","</url>");
  
 web_custom_request("web_custom_request",
  "URL=http://10.137.35.244:35051/SOE/devapp/IUploadAndDownload",
  "Method=POST",
  "TargetFrame=",
  "Resource=0",
  "Referer=",
  "Body=<?xml version='1.0' encoding='UTF-8'?><uploadFile> <accnt>353000001</accnt> <ctnLst length='1'> <upldContent> <name>bug56</name> <fileName>sano.jpg</fileName> <size>1</size> <desc>pretty</desc> <openType>1</openType> </upldContent> </ctnLst> <ctlgID>0</ctlgID></uploadFile></uploadFile>",
  LAST);

 if(strncmp(lr_eval_string ("{resultCode}"),"0",1) ==0)
  lr_output_message("The action is success");
     else
      lr_error_message(lr_eval_string ("{resultCode}"));
 
 lr_output_message(lr_eval_string("{GETURL}"));
  
 length = strlen(lr_eval_string("{GETURL}"));
 lr_output_message("length=%d", length);

 strcpy(POSTURL,"URL=");
 strcat(POSTURL,lr_eval_string("{GETURL}"));
 

 lr_output_message("the string is %s",POSTURL);

 return 0;
}

{
  web_custom_request("web_custom_request",
   POSTURL,
  "Method=POST",
  "TargetFrame=",
  "Resource=0",
  "Referer=",
  "Body=a",
  LAST);

  
 return 0;
}

 


TAG:

 

评分:0

我来说两句

日历

« 2024-05-07  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 4461
  • 日志数: 7
  • 文件数: 1
  • 书签数: 1
  • 建立时间: 2011-10-08
  • 更新时间: 2011-11-18

RSS订阅

Open Toolbar