loadrunner,虚拟用户使用线程和进程方式的区别??
本帖最后由 littlevine68 于 2015-4-18 09:23 编辑问题1:据说线程比进程省内存,是吗?一个虚拟用户如果线程是多少内存,进程呢?比如2G内存,分别可以运行多少个Vuser
问题2:调试脚本时,使用这两种方式来调试有什么不一样?因为调试脚本时是用默认的“Run user as a thread”,但在运行场景时,系统提示:“Error: The Vuser protocol or the current test settings do not support threads.”(我的系统是win7 64位 8G内存,足够内存运行,是什么导致了不支持线程?),脚本应没问题,因为使用进程是全部pass的
问题3:在运行场景时,Runtime-seting是不是要和Tools-Options-》General的模式一致?比如进程一致进程
脚本如下:
Action()
{
web_reg_save_param("temp",
"LB/IC=userSession value=",
"RB/IC=>",
LAST);
lr_start_transaction("init_title");
web_url("WebTours",
"URL=http://127.0.0.1:1080/WebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_end_transaction("init_title", LR_AUTO);
lr_think_time(6);
lr_start_transaction("login");
web_reg_find("Search=Body",
"SaveCount=count",
"Text=Welcome,",
LAST);
web_submit_data("login.pl",
"Action=http://127.0.0.1:1080/WebTours/login.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value={temp}", ENDITEM,
"Name=username", "Value={user_info}", ENDITEM,
"Name=password", "Value={user_pwd}", ENDITEM,
"Name=JSFormSubmit", "Value=on", ENDITEM,
"Name=login.x", "Value=68", ENDITEM,
"Name=login.y", "Value=13", ENDITEM,
LAST);
lr_output_message("count=%s",lr_eval_string("{count}"));
if(atoi(lr_eval_string("{count}"))>0)
lr_end_transaction("login", LR_PASS);
else
lr_end_transaction("login", LR_FAIL);
return 0;
}
页:
[1]