可我不爱喝茶~~~

【20080911】 lr函数3

上一篇 / 下一篇  2008-12-10 20:00:30 / 个人分类:性能测试

 
【20080911】


1.lr_exit()

void lr_exit (int continuation_option, int exit_status);

Example

vuser_init() {
     int status = ftp_logon("FTP", "URL=ftp://user:pwd@ftp.merc-int.com",                "LocalAddr=ca_server:21", "ClientCert=/ca/pem/",
               "ClientKey=/ca/pem/key/", "ClientPassword=@3#$8800cvd",
               "CertificateAuthority=/ca/", "SSLVersion=SSL2", LAST);
     if (status == LR_FAIL) {
          lr_error_message ("ftp login failed");
          lr_exit(LR_EXIT_VUSER, LR_FAIL);
     }
     return(0);
}
This function does not return a value.


2.
char *lr_get_vuser_ip();
The lr_get_vuser_ip function returns the IP address of a Vuser. When performing IP spoofing, each Vuser can use a different address. This function allows you to determine the current Vuser's IP address.
char *ip;
ip = lr_get_vuser_ip();
if (ip)
     lr_output_message("The IP address is %s", ip);
else
     lr_output_message("IP spoofing disabled");
NOTE: 在CONTROLLER中才可以运行此函数操作,在编译环境下运行不会得到结果。
 
 
 
【20080912】

1、int lr_next_row ( const char *dat_file );

return: if right return the value of specifiyed string
else return “error”;

Function:

Advances to the next row in the parameter data file.

example:
int len;
lr_message("%s=HARRIC",lr_eval_string("{ID}"));
lr_next_row("ID.dat");
lr_message("Next ROW DATA IS:%s",lr_eval_string("{ID}"));
len=lr_paramarr_len("ID");
lr_message("%d",len);

TAG: 性能测试

 

评分:0

我来说两句

日历

« 2024-03-26  
     12
3456789
10111213141516
17181920212223
24252627282930
31      

数据统计

  • 访问量: 4574
  • 日志数: 6
  • 书签数: 1
  • 建立时间: 2006-12-29
  • 更新时间: 2009-04-03

RSS订阅

Open Toolbar