51Testing软件测试论坛

标题: 录制脚本问题 [打印本页]

作者: zhuli19850304    时间: 2009-11-17 19:20
标题: 录制脚本问题
各位大哥大姐们,我做个了mail测试 网页为:mail.sohu.com
但是录制完以后,查看录制的时候 发现有些问题,我把图贴出来
录制的时候:[img][attach]57543[/attach][/img]
但是录制完以后,回放的时候却出来这个:[img][attach]57544[/attach][/img]
作者: zhuli19850304    时间: 2009-11-17 19:21
大家帮帮忙  对了 忘记说了 用的是vista系统  loadrunner9.5 ie7
作者: zhuli19850304    时间: 2009-11-17 19:48
大家帮帮忙啊  是本人录制问题还是设置问题呢
作者: 浪少    时间: 2009-11-18 10:59
现在的人怎么都喜欢用vista!测试性能建议用XP IE7与LR的兼容也不好,建议换成IE6!
作者: zhuli19850304    时间: 2009-11-18 12:47
原帖由 浪少 于 2009-11-18 10:59 发表
现在的人怎么都喜欢用vista!测试性能建议用XP IE7与LR的兼容也不好,建议换成IE6!

不是喜欢用vista  是笔记本只能支持vista  我改过xp 超频了 结果。。。还好在保修期内 所以没版本只能硬着头皮用vista vista真恶心
作者: 浪少    时间: 2009-11-18 13:27
你真厉害,怎么用笔记本搞!  笔记本行么?
作者: zhuli19850304    时间: 2009-11-18 14:01
原帖由 浪少 于 2009-11-18 13:27 发表
你真厉害,怎么用笔记本搞!  笔记本行么?

可以  ,但是现在问题好多 不知道怎么解决  我创建2个虚拟用户 发邮件  邮箱却收到10多份  不知道怎么回事  action循环也是1次  我用的loadrunner 9.5 现在不知道怎么回事
配置问题 还是 vista的问题  望有同样经历的大侠们解释下
作者: 浪少    时间: 2009-11-18 14:34
就是兼容问题,找个XP做控制机测就是了。你不断的回放,它当然生成邮件了
作者: zhuli19850304    时间: 2009-11-18 14:40
原帖由 浪少 于 2009-11-18 14:34 发表
就是兼容问题,找个XP做控制机测就是了。你不断的回放,它当然生成邮件了

没有一直回放 回放几次后 我发现问题 然后去删除邮箱的邮件 做压力测试  做了2个虚拟用户 此时邮箱没有邮件,然后测试,测试都没问题 然后去邮箱一看 [attach]57557[/attach]
我做了2个用户各自发各自的邮箱,但是效果都一样不知道怎么回事  请大侠指点
作者: 浪少    时间: 2009-11-18 14:50
标题: 回复 9# 的帖子
你做了压力测试,在‘我发现问题 然后去删除邮箱的邮件’之后?
LR跑用户会产生邮件的啊
作者: zhuli19850304    时间: 2009-11-18 15:04
原帖由 浪少 于 2009-11-18 14:50 发表
你做了压力测试,在‘我发现问题 然后去删除邮箱的邮件’之后?
LR跑用户会产生邮件的啊

我指的是回放的时候出现的邮件
大侠 为什么1个虚拟用户会发送那么多次邮件?
还有 我看视频上的aciton 里面 获取的 web_submit_data
而我里面只有web_custom_request
请问区别呢
作者: zhuli19850304    时间: 2009-11-18 15:08
结果
[attach]57559[/attach]
作者: 浪少    时间: 2009-11-18 15:11
http://bbs.51testing.com/thread-130853-1-1.html  这里有,那函数你可以去查查,论坛里也有的

你脚本里是否设置有迭代啊?  我估计你那里面有设置了迭代10次  所以才产生了20个邮件的  你看看
作者: zhuli19850304    时间: 2009-11-18 15:15
原帖由 浪少 于 2009-11-18 15:11 发表
http://bbs.51testing.com/thread-130853-1-1.html  这里有,那函数你可以去查查,论坛里也有的

你脚本里是否设置有迭代啊?  我估计你那里面有设置了迭代10次  所以才产生了20个邮件的  你看看

runtime setting :
[attach]57560[/attach]
作者: zhuli19850304    时间: 2009-11-18 15:17
我感觉是我录制的Action有问题 但是我是新手不知道是不是我把代码贴出来 大侠指点下:
Action()
{

        lr_start_transaction("写邮件");

        lr_think_time(21);

        web_url("pv.gif",
                "URL=http://pv.sohu.com/pv.gif?t?_1258522952611?r?=http://mail.sohu.com/bapp/95/composemail",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://mail.sohu.com/bapp/95/main",
                LAST);

        web_url("icon_top1.gif",
                "URL=http://js.sohu.com/mail/webapp.200909/skin/all/icon_top1.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://mail.sohu.com/bapp/95/main",
                "Snapshot=t12.inf",
                LAST);

        web_add_cookie("ppmdig=-127322141368dba3799d272348957ecc97c40f9888; DOMAIN=mail.sohu.com");

        web_add_cookie("ppmdig=-12232550858820d86104b6483d723f715f8e4c32b1; DOMAIN=mail.sohu.com");

        lr_think_time(8);

        web_custom_request("mail",
                "URL=http://mail.sohu.com/bapp/95/mail",
                "Method=POST",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://mail.sohu.com/bapp/95/main#writeMail",
                "Snapshot=t13.inf",
                "Mode=HTML",
                "EncType=application/x-www-form-urlencoded; charset=UTF-8",
                "Body=id=0&stationery=&is_send=1&is_html=1&subject=this%20is%20mail%20test&from={userId}%40sohu.com&fullname=&to={userId}%40sohu.com&cc=&bcc=&html=%3CBR%3Ethis%20is%20a%20test&text=this%20is%20a%20test&addressbook_use_flag=0&addressbook_use_list=0&env="
                "%7B%22attach%22%3A%20%5B%5D%2C%20%22original_id%22%3A%200%2C%20%22draft_type%22%3A%200%2C%20%22message_id%22%3A%20%22%22%2C%20%22references%22%3A%20%5B%5D%2C%20%22reply_to%22%3A%20%5B%5D%2C%20%22in_reply_to%22%3A%20%5B%5D%2C%20%22mail_followup_to%22%3A%20%5B%5D%2C%20%22save_after_send%22%3A%201%2C%20%22save_to_addressbook%22%3A%201%2C%20%22thread%22%3A%200%7D&securityCode="
                "UPJPCLALHCPLCLHCUPCLALYCUPCLHCACPLAPUCSCUPCLYLHCUPCLYPCLYPULHLYCAPNLYCAPNLYPLCSLYCAPNLYPULALYCAPNLYPLCALYPECACPLAPCPLCPLCPUCUPCLHCACPLAPUCSLYCAPELYLALSCPLCPUCUPCLHLSLYCALSLYPULHLYPLCPLYPLPELYPLCPLYPULHLYPULHLYPLCSLYLAPULYLAPULYCAPNLYCAPNLYPLPC&single=0&sendtime=1258522977003&_method=put",
                EXTRARES,
                "Url=/score/getscoreinfo", "Referer=http://mail.sohu.com/bapp/95/main#writeMail", ENDITEM,
                LAST);

        web_add_cookie("ppmdig=-1223021235b2aa4f9f883f077daeb9b0347f001068; DOMAIN=mail.sohu.com");

        web_url("success.htm",
                "URL=http://ad.mail.sohu.com/mail/success.htm?1258522924826",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://mail.sohu.com/bapp/95/main",
                "Snapshot=t14.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=http://mail.sohu.com/jsoplog/log?uc=|mailwrite&r=825599", "Referer=http://mail.sohu.com/bapp/95/main", ENDITEM,
                LAST);

        lr_end_transaction("写邮件",LR_AUTO);

        return 0;
}
作者: zhuli19850304    时间: 2009-11-18 15:21
我这里是web_custom_request,但是我看视频里面是web_submit_data(...),不知道怎么回事:
web_custom_request("mail",
                "URL=http://mail.sohu.com/bapp/95/mail",
                "Method=POST",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://mail.sohu.com/bapp/95/main#writeMail",
                "Snapshot=t13.inf",
                "Mode=HTML",
                "EncType=application/x-www-form-urlencoded; charset=UTF-8",
                "Body=id=0&stationery=&is_send=1&is_html=1&subject=this%20is%20mail%20test&from={userId}%40sohu.com&fullname=&to={userId}%40sohu.com&cc=&bcc=&html=%3CBR%3Ethis%20is%20a%20test&text=this%20is%20a%20test&addressbook_use_flag=0&addressbook_use_list=0&env="
                "%7B%22attach%22%3A%20%5B%5D%2C%20%22original_id%22%3A%200%2C%20%22draft_type%22%3A%200%2C%20%22message_id%22%3A%20%22%22%2C%20%22references%22%3A%20%5B%5D%2C%20%22reply_to%22%3A%20%5B%5D%2C%20%22in_reply_to%22%3A%20%5B%5D%2C%20%22mail_followup_to%22%3A%20%5B%5D%2C%20%22save_after_send%22%3A%201%2C%20%22save_to_addressbook%22%3A%201%2C%20%22thread%22%3A%200%7D&securityCode="
                "UPJPCLALHCPLCLHCUPCLALYCUPCLHCACPLAPUCSCUPCLYLHCUPCLYPCLYPULHLYCAPNLYCAPNLYPLCSLYCAPNLYPULALYCAPNLYPLCALYPECACPLAPCPLCPLCPUCUPCLHCACPLAPUCSLYCAPELYLALSCPLCPUCUPCLHLSLYCALSLYPULHLYPLCPLYPLPELYPLCPLYPULHLYPULHLYPLCSLYLAPULYLAPULYCAPNLYCAPNLYPLPC&single=0&sendtime=1258522977003&_method=put",
                EXTRARES,
                "Url=/score/getscoreinfo", "Referer=http://mail.sohu.com/bapp/95/main#writeMail", ENDITEM,
                LAST);

作者: 浪少    时间: 2009-11-18 15:22
标题: 回复 15# 的帖子
我看你脚本里也没做什么啊,回放可以通过的话 应该就是没有问题的啊
我看你邮件中有13:50的2封还有6个分别是2个同时间的,是不是LR反复运行了的原因啊

真不行你把邮件都删了,用2个用户跑下LR 看会产生几个邮件就可以了。
作者: zhuli19850304    时间: 2009-11-18 16:02
邮箱都是空的:
[attach]57562[/attach]
[attach]57563[/attach]
运行:
[attach]57564[/attach]
结果:
[attach]57565[/attach]
[attach]57566[/attach]
作者: zhuli19850304    时间: 2009-11-18 16:03
这次更夸张 86... 我晕 是否要看下脚本?
作者: zhuli19850304    时间: 2009-11-18 16:06
Starting iteration 1.
Warning -27077: The "vuser_init" section contains web function(s) when the "Simulate a new user on each iteration" Run-Time Setting is ON.  This may produce unpredictable results with multiple iterations          [MsgId: MWAR-27077]
Starting action Action.
Action.c(4): Notify: Transaction "写邮件" started.
Action.c(8): web_url("pv.gif") was successful, 0 body bytes, 146 header bytes          [MsgId: MMSG-26386]
Action.c(15): web_url("icon_top1.gif") was successful, 491 body bytes, 487 header bytes          [MsgId: MMSG-26386]
Action.c(23): web_add_cookie was successful          [MsgId: MMSG-26392]
Action.c(25): web_add_cookie was successful          [MsgId: MMSG-26392]
Action.c(29): Downloading resource "http://mail.sohu.com/score/getscoreinfo" (specified by argument number 12)          [MsgId: MMSG-26577]
Action.c(29): web_custom_request("mail") was successful, 681 body bytes, 597 header bytes, 24 chunking overhead bytes          [MsgId: MMSG-26385]
Action.c(45): web_add_cookie was successful          [MsgId: MMSG-26392]
Action.c(47): Resource "http://www.sohu.com/sohuflash_1.js" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(47): Found resource "http://images.sohu.com/freemail/2009mailad/091027wap/590X105.jpg" in HTML "http://ad.mail.sohu.com/mail/success.htm?1258528321576"          [MsgId: MMSG-26659]
Action.c(47): Downloading resource "http://mail.sohu.com/jsoplog/log?uc=|mailwrite&r=847949" (specified by argument number 9)          [MsgId: MMSG-26577]
Action.c(47): web_url("success.htm") was successful, 25656 body bytes, 1052 header bytes          [MsgId: MMSG-26386]
Action.c(58): Notify: Transaction "写邮件" ended with "Pass" status (Duration: 2.0661).
Ending action Action.
Ending iteration 1.
Ending Vuser...
Starting action vuser_end.
vuser_end.c(4): web_add_cookie was successful          [MsgId: MMSG-26392]
vuser_end.c(6): web_add_cookie was successful          [MsgId: MMSG-26392]
vuser_end.c(8): web_add_cookie was successful          [MsgId: MMSG-26392]
vuser_end.c(10): web_add_cookie was successful          [MsgId: MMSG-26392]
vuser_end.c(12): web_add_cookie was successful          [MsgId: MMSG-26392]
vuser_end.c(14): web_add_cookie was successful          [MsgId: MMSG-26392]
vuser_end.c(18): Downloading resource "http://mail.sohu.com/jsoplog/log?exit=&uc=|mailexit|logout&r=129098" (specified by argument number 9)          [MsgId: MMSG-26577]
vuser_end.c(18): web_url("logout.jsp") was successful, 27 body bytes, 1150 header bytes, 11 chunking overhead bytes          [MsgId: MMSG-26385]
vuser_end.c(29): web_add_cookie was successful          [MsgId: MMSG-26392]
vuser_end.c(31): Resource "http://images.sohu.com/bill/s2009/gates/all/adm2008.js" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
vuser_end.c(31): Resource "http://images.sohu.com/bill/s2009/gates/mail/mailflya.js" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
vuser_end.c(31): Downloading resource "http://pv.sohu.com/pv.gif?t?=1258528399060052_1280_800?r?=" (specified by argument number 13)          [MsgId: MMSG-26577]
vuser_end.c(31): Downloading resource "http://images.chinaren.com/product/webim/libs/cr.core.0.3.1.js" (specified by argument number 15)          [MsgId: MMSG-26577]
vuser_end.c(31): Resource "http://images.sohu.com/bill/s2009/chenliu/qitian/1001001113.swf" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
vuser_end.c(31): Redirecting "http://mail.sohu.com/" (redirection depth is 0)          [MsgId: MMSG-26694]
vuser_end.c(31): To location "http://login.mail.sohu.com/servlet/LoginServlet?appid=0000"          [MsgId: MMSG-26693]
vuser_end.c(31): Redirecting "http://login.mail.sohu.com/servlet/LoginServlet?appid=0000" (redirection depth is 1)          [MsgId: MMSG-26694]
vuser_end.c(31): To location "http://mail.sohu.com/bapp/95/main"          [MsgId: MMSG-26693]
vuser_end.c(31): Resource "http://js.sohu.com/mail/webapp.200909/skin/all/all.110518.css" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
vuser_end.c(31): Resource "http://js.sohu.com/mail/webapp.200909/skin/default/webmail.1111.css" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
vuser_end.c(31): Resource "http://js.sohu.com/mail/webapp.200909/skin/all/spacer.gif" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
vuser_end.c(31): Resource "http://js.sohu.com/mail/webapp.200909/skin/all/new.gif" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
vuser_end.c(31): web_url("mail.sohu.com_2") was successful, 14554 body bytes, 1884 header bytes, 60 chunking overhead bytes          [MsgId: MMSG-26385]
vuser_end.c(46): web_add_cookie was successful          [MsgId: MMSG-26392]
vuser_end.c(48): Found resource "http://passport.sohu.com/sso/crossdomain.jsp?action=logout&domain=chinaren.com&s=1258529299816" in HTML "http://passport.sohu.com/sso/crossdomain_all.jsp?action=logout"          [MsgId: MMSG-26659]
vuser_end.c(48): Found resource "http://passport.sohu.com/sso/crossdomain.jsp?action=logout&domain=sogou.com&s=1258529299816" in HTML "http://passport.sohu.com/sso/crossdomain_all.jsp?action=logout"          [MsgId: MMSG-26659]
vuser_end.c(48): Found resource "http://passport.sohu.com/sso/crossdomain.jsp?action=logout&domain=focus.cn" in HTML "http://passport.sohu.com/sso/crossdomain_all.jsp?action=logout"          [MsgId: MMSG-26659]
vuser_end.c(48): Found resource "http://passport.sohu.com/sso/crossdomain.jsp?action=logout&domain=17173.com" in HTML "http://passport.sohu.com/sso/crossdomain_all.jsp?action=logout"          [MsgId: MMSG-26659]
vuser_end.c(48): Found resource "http://passport.sohu.com/sso/crossdomain.jsp?action=logout&domain=changyou.com" in HTML "http://passport.sohu.com/sso/crossdomain_all.jsp?action=logout"          [MsgId: MMSG-26659]
vuser_end.c(48): Redirecting "http://passport.sohu.com/sso/crossdomain.jsp?action=logout&domain=sogou.com&s=1258529299816" (redirection depth is 0)          [MsgId: MMSG-26694]
vuser_end.c(48): To location "http://passport.sogou.com/sso/clearcookie.jsp"          [MsgId: MMSG-26693]
vuser_end.c(48): Redirecting "http://passport.sohu.com/sso/crossdomain.jsp?action=logout&domain=chinaren.com&s=1258529299816" (redirection depth is 0)          [MsgId: MMSG-26694]
vuser_end.c(48): To location "http://passport.chinaren.com/sso/clearcookie.jsp"          [MsgId: MMSG-26693]
vuser_end.c(48): Redirecting "http://passport.sohu.com/sso/crossdomain.jsp?action=logout&domain=focus.cn" (redirection depth is 0)          [MsgId: MMSG-26694]
vuser_end.c(48): To location "http://pass.focus.cn/sso/clearcookie.jsp"          [MsgId: MMSG-26693]
vuser_end.c(48): Redirecting "http://passport.sohu.com/sso/crossdomain.jsp?action=logout&domain=17173.com" (redirection depth is 0)          [MsgId: MMSG-26694]
vuser_end.c(48): To location "http://pass.17173.com/sso/clearcookie.jsp"          [MsgId: MMSG-26693]
vuser_end.c(48): Redirecting "http://passport.sohu.com/sso/crossdomain.jsp?action=logout&domain=changyou.com" (redirection depth is 0)          [MsgId: MMSG-26694]
vuser_end.c(48): To location "http://passport.changyou.com/sso/clearcookie.jsp"          [MsgId: MMSG-26693]
vuser_end.c(48): Resource "http://images.sohu.com/bill/s2009/fenfenliu/fanke/1117/760100.swf" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
vuser_end.c(48): Downloading resource "http://imp.ad-plus.cn/200911/a96c6e939e55ddee9172bdd92383a8fd.php?99" (specified by argument number 12)          [MsgId: MMSG-26577]
vuser_end.c(48): web_url("crossdomain_all.jsp_2") was successful, 1275 body bytes, 5409 header bytes, 12 chunking overhead bytes          [MsgId: MMSG-26385]
Ending action vuser_end.
Vuser Terminated.
作者: zhuli19850304    时间: 2009-11-18 16:34
大侠们。。。。。。。。。。。。。。。。。。。。。。。。
作者: jj_ljw    时间: 2009-11-18 17:30
回放时是几个邮件啊,单用户有问题没
作者: zhuli19850304    时间: 2009-11-18 18:19
原帖由 jj_ljw 于 2009-11-18 17:30 发表
回放时是几个邮件啊,单用户有问题没

回放的时候1个邮件 没有错  
单用户的时候也是这样 10多个-100多个邮件  我runtime setting 的action 1次迭代
Parameter type 设置 select next row :Unique
update value on:Once
但是不知道为什么总是发很多邮件
请大侠指点
作者: SealL    时间: 2009-11-19 18:40
标题: 回复 5# 的帖子
你可以装个虚拟机嘛 搞个xp系统 就可以了
作者: huzhiliang    时间: 2009-11-27 11:28

作者: huzhiliang    时间: 2009-11-27 11:30
兼容性问题,我碰到过,搞个虚拟机试试!




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2