如何测填报页面的压力?
我把登录放在init里面,然后参数化登录的用户名,把里面填报页面的动作放在Action里面,回放时不成功,是否是填报页面的session未获取到啊?下面是我的脚本:
vuser_init()
{
web_set_max_html_param_len("1024");
/* Registering parameter(s) from source task id 2
// {Siebel_Analytic_ViewState2} = "/wEPDwUKLTI5ODM3NjExN2RkjUBcQcHncAZi/3rJKmAzIv61dPE="
// */
web_reg_save_param("Siebel_Analytic_ViewState2",
"LB/IC=ViewState\" value=\"",
"RB/IC=\"",
"Ord=1",
"Search=Body",
"RelFrameId=1",
LAST);
web_url("Login.aspx",
"URL=http://192.168.5.117:85/Authentication/Login.aspx",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=../WebResource.axd?d=CvzYHb4BTDj1AxWusb8TyA2&t=633698821951078750", ENDITEM,
LAST);
lr_think_time( 24 );
web_submit_data("Login.aspx_2",
"Action=http://192.168.5.117:85/Authentication/Login.aspx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.5.117:85/Authentication/Login.aspx",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=__EVENTTARGET", "Value=", ENDITEM,
"Name=__EVENTARGUMENT", "Value=", ENDITEM,
"Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState2}", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$tesc_username", "Value={orgCode}", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$tesc_userpassword", "Value=11111111", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$tesc_yanzhengma", "Value=vafezs", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$btnLogin", "Value=登录", ENDITEM,
"Name=ctl00$tbxTitleEventEntry", "Value=", ENDITEM,
"Name=__EVENTVALIDATION", "Value=/wEWBwLw8JPCAwLP4KMJAr2K9qkLArip+NgKAo7175EBAtDA964PAoeritsDR07aKI5AY7pT0neyqkks0wCtwyw=", ENDITEM,
EXTRARES,
"Url=../App_Themes/Default/images/DF1.jpg", "Referer=http://192.168.5.117:85/Stat/Default.aspx", ENDITEM,
LAST);
return 0;
}
Action()
{
web_url("StatServices.aspx",
"URL=http://192.168.5.117:85/Stat/StatServices.aspx",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.5.117:85/Stat/Default.aspx",
"Snapshot=t3.inf",
"Mode=HTML",
EXTRARES,
"Url=../App_Themes/Default/images/DF1.jpg", ENDITEM,
LAST);
lr_think_time( 5 );
/* Registering parameter(s) from source task id 57
// {Siebel_Analytic_ViewState6} = "/wEPDwULLTE2MzkyMzc2ODAPFgIeCUlzTmV3Rm9ybWgWAmYPZBYCAgMPZBYGAgMPDxYCHgRUZXh0BQUxMTExMWRkAgUPZBYCAgEPDxYCHwEFHDIwMDnlubQwNOaciDIz5pelIOasoui/juaCqCBkZAIHD2QWAgIBD2QWAmYPZBYYAgEPDxYCHwEFBDIwMDhkZAIDDw8WAh8BBQo2MDczMjIyMy0zZGQCBQ8PFgIfAWRkZAKLAg8QZBAVBAzor7fpgInmi6kuLi4G5rW35aSWEuWbveWGheWFtuS7luecgeW4ggbmnKzluIIVBAMwMDAGODg4ODg4Bjg2MDAwMAMzMTAUKwMEZ2dnZxYBAgNkAo0CDxBkEBUUDOivt+mAieaLqS4uLgnpu4TmtabljLoJ5Y2i5rm+5Yy6CeW+kOaxh+WMugnplb/lroHljLoJ6Z2Z5a6J5Yy6CeaZrumZgOWMugnpl7jljJfljLoJ6Jm55Y+j5Yy6CeadqOa1puWMugnpl7XooYzljLoJ5a6d5bGx5Yy6CeWYieWumuWMugzmtabkuJzmlrDljLoJ6YeR5bGx5Yy6CeWNl+axh+WMugnlpYnotKTljLoJ5p2+5rGf5Yy6Cemdkua1puWMugnltIfmmI7ljr8VFAQwMDAwBjMxMDEwMQYzMTAxMDMGMzEwMTA0BjMxMDEwNQYzMTAxMDYGMzEwMTA3BjMxMDEwOAYzMTAxMDkGMzEwMTEwBjMxMDExMgYzMTAxMTMGMzEwMTE0B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eadqOa1puWMugnpl7XooYzljLoJ5a6d5bGx5Yy6CeWYieWumuWMugzmtabkuJzmlrDljLoJ6YeR5bGx5Yy6CeWNl+axh+WMugnlpYnotKTljLoJ5p2+5rGf5Yy6Cemdkua1puWMugnltIfmmI7ljr8VFAQwMDAwBjMxMDEwMQYzMTAxMDMGMzEwMTA0BjMxMDEwNQYzMTAxMDYGMzEwMTA3BjMxMDEwOAYzMTAxMDkGMzEwMTEwBjMxMDExMgYzMTAxMTMGMzEwMTE0BjMxMDExNQYzMTAxMTYGMzEwMjI1BjMxMDIyNgYzMTAyMjcGMzEwMjI5BjMxMDIzMBQrAxRnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZxYBAgdkApsCDw8WAh8BBQYzMTAxMDhkZGR0pw1HbNeWvN9zD+HjhWzNvxeHew=="
// */
web_reg_save_param("Siebel_Analytic_ViewState6",
"LB/IC=ViewState\" value=\"",
"RB/IC=\"",
"Ord=1",
"Search=Body",
"RelFrameId=1",
LAST);
web_link("填报",
"Text=填报",
"Snapshot=t4.inf",
EXTRARES,
"Url=../App_Themes/Default/images/DF1.jpg", ENDITEM,
LAST);
web_set_max_html_param_len("2376");
web_submit_data("techsurvey.aspx",
"Action=http://192.168.5.117:85/Stat/techsurvey.aspx",
"Method=POST",
"RecContentType=text/plain",
"Referer=http://192.168.5.117:85/Stat/techsurvey.aspx",
"Mode=HTML",
ITEMDATA,
"Name=ctl00$ScriptManager1", "Value=ctl00$ContentPlaceHolder1$UpdatePanel1|ctl00$ContentPlaceHolder1$btnSave", ENDITEM,
"Name=__EVENTTARGET", "Value=", ENDITEM,
"Name=__EVENTARGUMENT", "Value=", ENDITEM,
"Name=__LASTFOCUS", "Value=", ENDITEM,
"Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState6}", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$tesc_01", "Value=1001", ENDITEM,
"Name=ctl00$tbxTitleEventEntry", "Value=", ENDITEM,
"Name=__SCROLLPOSITIONX", "Value=0", ENDITEM,
"Name=__SCROLLPOSITIONY", "Value=593", ENDITEM,
"Name=__EVENTVALIDATION", "Value=/wEWegL+zcbECwKWue+bAQK7upyIDALBurDjBAK8upyIDAKyurDjBAK9upyIDAK+upyIDAKzurDjBAK/upyIDAK6uvTRCgLAupyIDAK7uvTRCgK8uvTRCgLBupyIDAKyupyIDAK9uvTRCgKzupyIDAK+uvTRCgK6urDjBAK/uvTRCgK7urDjBALAuvTRCgK8urDjBALBuvTRCgK9urDjBAKyuvTRCgKzuvTRCgK+urDjBAK6uoitAwK/urDjBAK7uoitAwLAurDjBAK8uoitAwK7uvDfDQK6/o+sAwKQ0IKWCAKystb7DALi69+2CAKd0IaWCALpwrbsBALD7PvrBAKk0fquBgKk0eKuBgKk0fauBgKk0YquBgKk0f6uBgKk0fKuBgKk0YauBgKk0ZquBgKn0eauBgKn0e6uBgKn0eKuBgKn0fauBgKn0YquBgKn0f6uBgKi0Z6LDQKi0YKLDQKi0YaLDQKi0a6LDQKl0YqLDQK7/o+sAwKR0IKWCAKzstb7DALj69+2CAKc0IaWCALqwrbsBALA7PvrBAKn0fquBgKn0eKuBgKn0fauBgKn0YquBgKn0f6uBgKn0fKuBgKn0YauBgKn0ZquBgKk0eauBgKk0e6uBgKk0eKuBgKk0fauBgKk0YquBgKk0f6uBgKh0Z6LDQKh0YKLDQKh0YaLDQKh0a6LDQKm0YqLDQK8/o+sAwKW0IKWCAK0stb7DALk69+2CAKb0IaWCALrwrbsBALB7PvrBAKm0fquBgKm0eKuBgKm0fauBgKm0YquBgKm0f6uBgKm0fKuBgKm0YauBgKm0ZquBgKl0eauBgKl0e6uBgKl0eKuBgKl0fauBgKl0YquBgKl0f6uBgKg0Z6LDQKg0YKLDQKg0YaLDQKg0a6LDQKn0YqLDQKx8JKCCQKCrOzBBwLnws6sDQK4/qfsCwKokaLfCgKC6KGpBgL40JWiCgLQwPeuDwKHq4rbA/nkpIXnJOuC++0MvDcWIPsPwkcT", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$btnSave", "Value=保存", ENDITEM,
EXTRARES,
"Url=../ScriptResource.axd?d=5oF26sQQPE-WpL1ik1X6570z8dOTm4wJwEQs4eQkxIPcQNJRI1I6Ix8QOQsXNCu6E8YSZjhWfPdEGHc7qonIjQ2&t=633698821951078750", ENDITEM,
LAST);
return 0;
} 原因是否为登录的用户名参数化后,其填报页面的Siebel_Analytic_ViewState6每次都是不同的?该如何解决呢? 查看你的脚本关联存在问题 具体什么地方呀?上面两个viewstate关联是系统自动生成,请高手指教哦 help me~help you! Action()
{
// Maximum parameter length changed by Correlation Studio
web_set_max_html_param_len( "9999" );
web_url("StatServices.aspx",
"URL=http://192.168.5.117:85/Stat/StatServices.aspx",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.5.117:85/Stat/Default.aspx",
"Snapshot=t3.inf",
"Mode=HTML",
EXTRARES,
"Url=../App_Themes/Default/styleimages/btbj.jpg", ENDITEM,
LAST);
/* Registering parameter(s) from source task id 57
// {Siebel_Analytic_ViewState6} = "/wEPDwULLTEzMzY0NDE1NjMPFgIeCUlzTmV3Rm9ybWgWAmYPZBYCAgMPZBYGAgMPDxYCHgRUZXh0BQUxMTExMWRkAgUPZBYCAgEPDxYCHwFkZGQCBw9kFgICAQ9kFgJmD2QWGgIBDw8WAh8BBQQyMDA4ZGQCAw8PFgIfAQUO5rKq56eR5rCR6LCDMDFkZAIFDw8WAh8BBQo2MzIwNTEzMi00ZGQCBw8PFgIfAWRkZAKNAg8QZBAVBAzor7fpgInmi6kuLi4G5rW35aSWEuWbveWGheWFtuS7luecgeW4ggbmnKzluIIVBAMwMDAGODg4ODg4Bjg2MDAwMAMzMTAUKwMEZ2dnZxYBZmQCjwIPEA8WAh4HVmlzaWJsZWhkEBUAFQAUKwMAFgBkApECDw8WAh8BZGRkApMCDxBkEBUEDOivt+mAieaLqS4uLgbmtbflpJYS5Zu95YaF5YW25LuW55yB5biCBuacrOW4ghUEAzAwMAY4ODg4ODgGODYwMDAwAzMxMBQrAwRnZ2dnFgFmZAKVAg8QDxYCHwJoZBAVABUAFCsDABYAZAKXAg8PFgIfAWRkZAKZAg8QZBAVBAzor7fpgInmi6kuLi4G5rW35aSWEuWbveWGheWFtuS7luecgeW4ggbmnKzluIIVBAMwMDAGODg4ODg4Bjg2MDAwMAMzMTAUKwMEZ2dnZxYBZmQCmwIPEA8WAh8CaGQQFQAVABQrAwAWAGQCnQIPDxYCHwFkZGRkEGW/SeGseD4m792Z31k1olTR1so="
// */
web_reg_save_param("Siebel_Analytic_ViewState6",
"LB/IC=ViewState\" value=\"",
"RB/IC=\"",
"Ord=1",
"Search=Body",
"RelFrameId=1",
LAST);
// Parameter {WCSParam_Diff1} created by Correlation Studio
web_reg_save_param( "WCSParam_Diff1", "LB= value=\"", "RB=\"", "Ord=24", "Search=Body", "RelFrameId=1", LAST );
web_link("填报",
"Text=填报",
"Snapshot=t4.inf",
EXTRARES,
"Url=../App_Themes/Default/styleimages/btbj.jpg", ENDITEM,
LAST);
lr_start_transaction("tran1");
web_submit_data("techsurvey.aspx",
"Action=http://192.168.5.117:85/Stat/techsurvey.aspx",
"Method=POST",
"RecContentType=text/plain",
"Referer=http://192.168.5.117:85/Stat/techsurvey.aspx",
"Mode=HTML",
ITEMDATA,
"Name=ctl00$ScriptManager1", "Value=ctl00$ContentPlaceHolder1$UpdatePanel1|ctl00$ContentPlaceHolder1$tesc_a2_1", ENDITEM,
"Name=__EVENTTARGET", "Value=ctl00$ContentPlaceHolder1$tesc_a2_1", ENDITEM,
"Name=__EVENTARGUMENT", "Value=", ENDITEM,
"Name=__LASTFOCUS", "Value=", ENDITEM,
"Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState6}", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$tesc_01", "Value=1001", ENDITEM,
"Name=ctl00$tbxTitleEventEntry", "Value=", ENDITEM,
"Name=__SCROLLPOSITIONX", "Value=0", ENDITEM,
"Name=__SCROLLPOSITIONY", "Value=595", ENDITEM,
"Name=__EVENTVALIDATION", "Value=/wEWegKcjKXmBQK7upyIDALBurDjBAK8upyIDAKyurDjBAK9upyIDAK+upyIDAKzurDjBAK/upyIDAK6uvTRCgLAupyIDAK7uvTRCgK8uvTRCgLBupyIDAKyupyIDAK9uvTRCgKzupyIDAK+uvTRCgK6urDjBAK/uvTRCgK7urDjBALAuvTRCgK8urDjBALBuvTRCgK9urDjBAKyuvTRCgKzuvTRCgK+urDjBAK6uoitAwK/urDjBAK7uoitAwLAurDjBAK8uoitAwK7uvDfDQK6/o+sAwKQ0IKWCAKystb7DALi69+2CAKd0IaWCALpwrbsBALD7PvrBAKk0fquBgKk0eKuBgKk0fauBgKk0YquBgKk0f6uBgKk0fKuBgKk0YauBgKk0ZquBgKn0eauBgKn0e6uBgKn0eKuBgKn0fauBgKn0YquBgKn0f6uBgKi0Z6LDQKi0YKLDQKi0YaLDQKi0a6LDQKl0YqLDQK7/o+sAwKR0IKWCAKzstb7DALj69+2CAKc0IaWCALqwrbsBALA7PvrBAKn0fquBgKn0eKuBgKn0fauBgKn0YquBgKn0f6uBgKn0fKuBgKn0YauBgKn0ZquBgKk0eauBgKk0e6uBgKk0eKuBgKk0fauBgKk0YquBgKk0f6uBgKh0Z6LDQKh0YKLDQKh0YaLDQKh0a6LDQKm0YqLDQK8/o+sAwKW0IKWCAK0stb7DALk69+2CAKb0IaWCALrwrbsBALB7PvrBAKm0fquBgKm0eKuBgKm0fauBgKm0YquBgKm0f6uBgKm0fKuBgKm0YauBgKm0ZquBgKl0eauBgKl0e6uBgKl0eKuBgKl0fauBgKl0YquBgKl0f6uBgKg0Z6LDQKg0YKLDQKg0YaLDQKg0a6LDQKn0YqLDQKx8JKCCQKCrOzBBwLnws6sDQK4/qfsCwKokaLfCgKC6KGpBgL40JWiCgKWue+bAQLQwPeuDwKHq4rbA3Zy/LIgVE/asrAbkc3vs0WfxsVF", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$btnSave", "Value=保存", ENDITEM,
EXTRARES,
"Url=../ScriptResource.axd?d=5oF26sQQPE-WpL1ik1X6570z8dOTm4wJwEQs4eQkxIPcQNJRI1I6Ix8QOQsXNCu6E8YSZjhWfPdEGHc7qonIjQ2&t=633698821951078750", ENDITEM,
LAST);
lr_end_transaction("tran1", LR_AUTO);
return 0;
} Action变成这样后回放成功,不过运行场景经常报错
一.Action.c(38): Error -26377: No match found for the requested parameter "Siebel_Analytic_ViewState6". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 9999 bytes, use web_set_max_html_param_len to increase the parameter size
二.Action.c(365): Error -26612: HTTP Status-Code=500 (Internal Server Error) for "http://192.168.5.117:85/Stat/techsurvey.aspx"
大侠们指点下是什么原因啊 只有自己先抗起来了
页:
[1]