|
网上找的帖子,通过Mobile Application - HTTP/HTML 协议调用android模拟器AVD中手机操作的通信数据;录制成功后无法并发增压,提示脚本无效;
以下是录制的脚本,(打开浏览器,进入谷歌首页)求大大指点以下如何增压或者如何使者脚本可用或者最好有更好的方法模拟手机应用客户端并发测试:
Action()
{
web_add_cookie("NID=67=P91hA_LMmDlBZOM8jywUSheKgByVJMZItonA1qyfJyx8nZ344YARVh48MQGc_oI4iPq4twLoV_iyhaddhjwZ5-UyPHTFhzAnPN8J6Z8F0GJ4hDLd08VZ78WsQx9cZFOm; DOMAIN=www.google.com.hk");
web_url("m",
"URL=http://www.google.com/m?client=ms-android-google&source=android-home",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=http://www.google.com.hk/webhp?client=ms-android-google&source=android-home&mnfst=1", "Referer=", ENDITEM,
"Url=http://www.google.com.hk/images/nav_logo123.png", "Referer=", ENDITEM,
"Url=http://www.google.com.hk/xjs/_/js/k=-a-Y2-EB9_w.en_US./m=c,sb_mob,cdos,jp,rcs,owm,tbui,mbsk,mb,wob,cfm,dvl,nmns,tiu,ivf,mld,lu,nvm,mbsf,cirosm,tnt,amcl,bct,kpm,lc,mad,mlr,ob,r,rsn,sf,sfa,tbpr,hsm,pcc,csi/am=YA/rt=j/d=1/sv=1/rs=AItRSTP6yrgiB25bw4J23IjjeaWuml7ahg", "Referer=http://www.google.com.hk/m?client=ms-android-google&source=android-home", ENDITEM,
"Url=http://www.google.com.hk/mbd?newwindow=1&safe=strict&client=ms-android-google&source=android-home&output=search&mbtype=56", "Referer=http://www.google.com.hk/m?client=ms-android-google&source=android-home", ENDITEM,
LAST);
web_add_cookie("REF=ID=a3137a6d8c10653b:FF=0:NW=1:TM=1369209121M=1369209121:S=XbLceJzPTVU-z1TC; DOMAIN=www.google.com");
web_url("m_2",
"URL=http://www.google.com.hk/m?client=ms-android-google&source=android-home",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTML",
EXTRARES,
"Url=http://www.google.com/images/nycli1.gif", "Referer=", ENDITEM,
"Url=/xjs/_/js/k=-a-Y2-EB9_w.en_US./m=c,sb_mob,cdos,jp,rcs,owm,tbui,mbsk,mb,wob,cfm,dvl,nmns,tiu,ivf,mld,lu,nvm,mbsf,cirosm,tnt,amcl,bct,kpm,lc,mad,mlr,ob,r,rsn,sf,sfa,tbpr,hsm,pcc,csi/am=YA/rt=j/d=1/sv=1/rs=AItRSTP6yrgiB25bw4J23IjjeaWuml7ahg", "Referer=http://www.google.com.hk/m?client=ms-android-google&source=android-home", ENDITEM,
"Url=http://www.google.com/images/srpr/logo3w.png", "Referer=", ENDITEM,
"Url=/xjs/_/js/k=-a-Y2-EB9_w.en_US./m=gf,adp,sy31,sy32,sy34,sy36,sy40,sy35,sy41,sy37,sy43,sy45,sy42,sy28,sy61,sy38,sy44,sy74,sy60,sy18,sy39,sy59,sy62,sy75,sy78,sy79,sy80,sy83,sy24,llc,df,dob,vs/am=YA/rt=j/d=0/sv=1/rs=AItRSTP6yrgiB25bw4J23IjjeaWuml7ahg", "Referer=http://www.google.com.hk/m?client=ms-android-google&source=android-home", ENDITEM,
LAST);
lr_think_time(4);
web_url("gen_204",
"URL=http://www.google.com.hk/gen_204?v=3&s=mobilewebhp&action=&conn=CELL_3G&e=17259,140438,4000116,4001350,4001947,4002693,4003242,4003714,4003881,4003921,4004204,4004319,4004334,4004788,4004844,4004897,4004939,4004949,4004972,4005031,4005154,4005198,4005335,4005817,4006192,4006374,4006442,4006448,4006449,4006541,4006578,4006609,4006727,4006779,4006806,4007007,4007009,4007020,4007055,4007060,4007066,4007073,4007077,4007117,4007118,4007131,4007140,4007158,4007217&ei=&imc=2&imn=2&imp=2&atyp=csi&adh="
"&rt=xjsls.378,prt.489,ol.26374,iml.1538,xjses.30950,xjsee.35279,xjs.35744",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.google.com.hk/m?client=ms-android-google&source=android-home",
"Mode=HTML",
LAST);
lr_think_time(13);
web_url("search",
"URL=http://www.google.com.hk/search?newwindow=1&safe=strict&client=ms-android-google&source=android-home&site=webhp&source=hp&ei=cI-dUYGlKYaMkwXX74D4Dg&q=5812&oq=&gs_l=mobile-gws-hp.1.0.41.0.0.0.14968.2.0.0.2.2.0.0.0..0.0...0.0...1c..14.mobile-gws-hp.",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.google.com.hk/m?client=ms-android-google&source=android-home",
"Snapshot=t3.inf",
"Mode=HTML",
EXTRARES,
"Url=/xjs/_/js/k=-a-Y2-EB9_w.en_US./m=c,sb_mob,cdos,jp,rcs,owm,tbui,mbsk,mb,wob,cfm,dvl,tiu,ivf,mld,lu,nvm,mbsf,cirosm,tnt,amcl,bct,kpm,lc,mad,mlr,ob,r,rsn,sf,sfa,tbpr,hsm,pcc,csi/am=YA/rt=j/d=1/sv=1/rs=AItRSTP6yrgiB25bw4J23IjjeaWuml7ahg", "Referer=http://www.google.com.hk/search?newwindow=1&safe=strict&client=ms-android-google&source=android-home&site=webhp&source=hp&ei=cI-dUYGlKYaMkwXX74D4Dg&q=5812&oq=&gs_l=mobile-gws-hp.1.0.41.0.0.0.14968.2.0.0.2.2.0.0.0..0.0...0.0...1c..14.mobile-gws-hp.", ENDITEM,
LAST);
web_add_cookie("BAIDUID=758EF9C76FF4E39E5B2CA70B19E4D1BC:FG=1; DOMAIN=wapbaike.baidu.com");
web_add_cookie("BAIDUID=758EF9C76FF4E39E5B2CA70B19E4D1BC:FG=1; DOMAIN=nsclick.baidu.com");
web_add_cookie("BAIDUID=758EF9C76FF4E39E5B2CA70B19E4D1BC:FG=1; DOMAIN=img.baidu.com");
web_url("url",
"URL=http://www.google.com.hk/url?sa=t&source=web&cd=2&ved=0CDAQFjAB&url=http%3A%2F%2Fbaike.baidu.cn%2Fview%2F5812.htm&ei=o4-dUcb6L5CvkgWgyoGYCQ&usg=AFQjCNGxW2RpV7CRET7UlQTMBgLwsceJ6g",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.google.com.hk/search?newwindow=1&safe=strict&client=ms-android-google&source=android-home&site=webhp&source=hp&ei=cI-dUYGlKYaMkwXX74D4Dg&q=5812&oq=&gs_l=mobile-gws-hp.1.0.41.0.0.0.14968.2.0.0.2.2.0.0.0..0.0...0.0...1c..14.mobile-gws-hp.",
"Snapshot=t4.inf",
"Mode=HTML",
EXTRARES,
"Url=http://nsclick.baidu.com/v.gif?pid=103&url=http%3A%2F%2Fwapbaike.baidu.com%2Fview%2F5812.htm&type=6014&t=1369280379381", "Referer=http://wapbaike.baidu.com/view/5812.htm", ENDITEM,
"Url=http://nsclick.baidu.com/v.gif?pid=103&url=http%3A%2F%2Fwapbaike.baidu.com%2Fview%2F5812.htm&type=7506&t=1369280379398", "Referer=http://wapbaike.baidu.com/view/5812.htm", ENDITEM,
"Url=http://img.baidu.com/hunter/m/baike.js?st=-15849", "Referer=http://wapbaike.baidu.com/view/5812.htm", ENDITEM,
"Url=http://nsclick.baidu.com/u.gif?ts=k&pid=241&sid=hh1e6o07fqfbo&hid=9487&page=bkm-view&ver=5&p=102&px=320*401&ref=http%3A%2F%2Fwww.google.com.hk%2Fsearch%3Fnewwindow%3D1%26safe%3Dstrict%26client%3Dms-android-google%26source%3Dandroid-home%26site%3Dwebhp%26source%3Dhp%26ei%3DcI-dUYGlKYaMkwXX74D4Dg%26q%3D5812%26oq%3D%26gs_l%3Dmobile-gws-hp.1.0.41.0.0.0.14968.2.0.0.2.2.0.0.0..0.0...0.0...1c..14.mobile-gws-hp.&vquery=%E4%B8%89%E4%BA%9A&cmd=open", "Referer=http://wapbaike.baidu.com/view/5812.htm", ENDITEM,
"Url=/xjs/_/js/k=-a-Y2-EB9_w.en_US./m=gf,adp,wta,sy31,sy32,sy34,sy36,sy40,sy35,sy41,sy37,sy43,sy45,sy42,sy28,sy61,sy38,sy44,sy74,sy60,sy18,sy39,sy59,sy62,sy75,sy78,sy79,sy80,sy83,sy24,llc,df,dob,sy95,kptm,vs/am=YA/rt=j/d=0/sv=1/rs=AItRSTP6yrgiB25bw4J23IjjeaWuml7ahg", "Referer=http://www.google.com.hk/search?newwindow=1&safe=strict&client=ms-android-google&source=android-home&site=webhp&source=hp&ei=cI-dUYGlKYaMkwXX74D4Dg&q=5812&oq=&gs_l="
"mobile-gws-hp.1.0.41.0.0.0.14968.2.0.0.2.2.0.0.0..0.0...0.0...1c..14.mobile-gws-hp.", ENDITEM,
LAST);
lr_think_time(4);
web_url("gen_204_2",
"URL=http://www.google.com.hk/gen_204?atyp=i&ct=&cad=&mrto=88&ei=o4-dUcb6L5CvkgWgyoGYCQ&zx=1369280394569",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.google.com.hk/search?newwindow=1&safe=strict&client=ms-android-google&source=android-home&site=webhp&source=hp&ei=cI-dUYGlKYaMkwXX74D4Dg&q=5812&oq=&gs_l=mobile-gws-hp.1.0.41.0.0.0.14968.2.0.0.2.2.0.0.0..0.0...0.0...1c..14.mobile-gws-hp.",
"Mode=HTML",
LAST);
web_url("gen_204_3",
"URL=http://www.google.com.hk/gen_204?v=3&s=web&action=&conn=CELL_3G&e=17259,140438,4000116,4001350,4001947,4002693,4003242,4003714,4003881,4003921,4004204,4004319,4004334,4004788,4004844,4004897,4004939,4004949,4004972,4005031,4005154,4005198,4005335,4005763,4005766,4005817,4005878,4006192,4006374,4006442,4006448,4006449,4006453,4006454,4006497,4006541,4006578,4006609,4006695,4006727,4006779,4006806,4007007,4007009,4007020,4007055,4007060,4007066,4007073,4007077,4007117,4007118,4007131,4007140,"
"4007158,4007217&ei=o4-dUcb6L5CvkgWgyoGYCQ&imc=2&imn=2&imp=2&atyp=csi&adh=&rt=xjsls.1297,prt.1326,ol.26147,iml.2295,xjses.30407,xjsee.35151,xjs.35558",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.google.com.hk/search?newwindow=1&safe=strict&client=ms-android-google&source=android-home&site=webhp&source=hp&ei=cI-dUYGlKYaMkwXX74D4Dg&q=5812&oq=&gs_l=mobile-gws-hp.1.0.41.0.0.0.14968.2.0.0.2.2.0.0.0..0.0...0.0...1c..14.mobile-gws-hp.",
"Mode=HTML",
EXTRARES,
"Url=/webhp?client=ms-android-google&source=android-home&mnfst=1", "Referer=", ENDITEM,
"Url=/images/nav_logo123.png", "Referer=", ENDITEM,
LAST);
web_url("m_3",
"URL=http://www.google.com.hk/m?client=ms-android-google&source=android-home",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t5.inf",
"Mode=HTML",
EXTRARES,
"Url=http://www.google.com/images/nycli1.gif", "Referer=", ENDITEM,
"Url=http://www.google.com/images/srpr/logo3w.png", "Referer=", ENDITEM,
LAST);
return 0;
} |
|