google搜索 站内搜索                 软件测试门户 | 软件测试培训 | 文章资料精选 | 软件测试论坛 | 测试解决方案 | 软件测试博客 | 测试招聘求职 
打印

[求助] 紧急求助 loadrunner

紧急求助 loadrunner


紧急求助 loadrunner 我现在要测试一个类似与 MSN的通信系统的性能,数据库采用的是MySQL ,连接方式为MySql的动态链接库,首先协议应该怎么选择啊,我选择了winSocket协议,也能录制,但我想加入参数,因为至少要模拟10个用户并发操作嘛,提供不用的用户名和密码,我录的登陆脚本如下: #include "lrs.h" vuser_init() { lrs_startup(257); lr_think_time(32); lrs_create_socket("socket0", "TCP", "LocalHost=0", "RemoteHost=202.101.165.141:5222", LrsLastArg); lrs_send("socket0", "buf0", LrsLastArg); lrs_create_socket("socket1", "UDP", "LocalHost=5224", LrsLastArg); lrs_receive("socket0", "buf1", LrsLastArg); lrs_send("socket1", "buf2", "TargetSocket=202.101.165.141:5225", LrsLastArg); lrs_send("socket0", "buf3", LrsLastArg); lrs_receive("socket1", "buf4", LrsLastArg); lrs_receive("socket0", "buf5", LrsLastArg); lrs_send("socket0", "buf6", LrsLastArg); lrs_receive("socket0", "buf7", LrsLastArg); lrs_send("socket0", "buf8", LrsLastArg); lrs_receive("socket0", "buf9", LrsLastArg); lrs_send("socket0", "buf10", LrsLastArg); lrs_receive("socket0", "buf11", LrsLastArg); return 0; } 我应该在哪里填加参数啊,实在摸索不错来,网高手给予帮助,谢谢啦

TOP

去data.ws里面参数化 至于要关联的数据,看帮助:
复制内容到剪贴板
代码:
In the following example, a user performed a Telnet session. The user used a ps command to determine a process ID (PID), and killed the application based on its PID. Repeating the exact steps during replay will not work-during replay the PID will be different (UNIX assigns a new PID). Killing the PID that was recorded in the script will be ineffective. To overcome this problem, lr_save_param saves the value of the PID to a parameter during replay. This parameter is referenced in the Send buffer which contains the kill command. The following code was recorded. The script would not perform the kill command during replay. To correct this, the following steps were performed: The recorded value of the PID, 28597 was located along with the socket and buffer descriptors. The offset and length of the data was determined. The buffer shown below, buf47, was received after the ps command. The offset of the PID within the buffer data is 67, and its length is 5. recv buf47 188 "\r" "\x0" "\r\n""PID TT STAT TIME COMMAND\r\n" "28469 q2 S 0:01 -tcsh (tcsh)\r\n" "28597 q2 T 0:00 vi log1.txt\r\n" "28602 q2 R 0:00 ps\r\n" "tears:/tmp_mnt/u/jay>" The PID also appeared in the Send buffer, buf48, when the user performed a kill operation to the process. send buf48 "kill -9 28597" An lrs_save_param function was placed in the Actions section, before the lrs_send statement, in this instance buffer "buf48". NULL was specified in place of a buffer descriptor, indicating that VuGen should use the last received buffer, "buf47". During each subsequent replay, the PID is saved to a parameter called param1. The parameter was evaluated and printed in the Output window using lr_output_message. lrs_receive("socket2", "buf47", LrsLastArg); lrs_save_param("socket2", NULL, "param1", 67, 5); lr_output_message ("param1: %s", lr_eval_string("<param1>")); lr_think_time(10); lrs_send("socket2", "buf48", LrsLastArg); The parameter was referenced in the Send buffer in place of the original PID constant. In this example angle brackets were used, but you can define the delimiters from VuGen's Option menu. send buf48 "kill -9 <param1>"
写得很清楚 [ 本帖最后由 tacy_lee 于 2006-8-10 16:11 编辑 ]
兴趣广泛的家伙 ^_^
我的blog:http://tacy.blogjava.net
性能测试群:18299231,如果你对性能,优化,开发,系统,数据库其中的一个有深入了解,欢迎一起来探讨

TOP

奇怪 格式都没了
兴趣广泛的家伙 ^_^
我的blog:http://tacy.blogjava.net
性能测试群:18299231,如果你对性能,优化,开发,系统,数据库其中的一个有深入了解,欢迎一起来探讨

TOP

 
当前时区 GMT+8, 现在时间是 2008-12-5 08:27Copyright(C)上海博为峰软件技术有限公司 2001-2007 电话:021-64471599-8017
当您在访问网站、论坛及博客过程中遇到问题时可发送email:webmaster@51testing.com或发送论坛短信至管理员风在吹