可我不爱喝茶~~~
【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);
相关阅读:
- 性能测试的问题分析和总结 (fishy, 2008-12-03)
- LoadRunner性能测试应用(连载五) (fishy, 2008-12-03)
- LoadRunner性能测试应用(连载六) (caption, 2008-12-04)
- 性能测试调优过程 (fishy, 2008-12-05)
- 谈谈常用的性能测试方法(策略)和测试要点 (fishy, 2008-12-05)
- LoadRunner性能测试应用(连载七) (fishy, 2008-12-05)
- 一个性能测试的案例(转自51) (静澜, 2008-12-08)
- LoadRunner性能测试应用(连载八) (fishy, 2008-12-09)
- loadrunner学习笔记---与公司的技术论坛同步更新 (harric, 2008-12-10)
- 【08-09-10 lr的存储参数的方法】 (harric, 2008-12-10)
收藏
举报
TAG:
性能测试