51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

查看: 4377|回复: 13

[原创] (已解决)请教高手 只有大神能解决的问题

[复制链接]

该用户从未签到

发表于 2010-8-3 16:39:33 | 显示全部楼层 |阅读模式
web_submit_data("HttpBox.do",
                "Action=http://192.168.1.105:8080/BlueBox/HttpBox.do",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=file:///C|/Documents%20and%20Settings/deee/妗岄潰/sfs%5Ftank%281%29.exe",
                "Snapshot=t1.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=sfsHttp", "Value=connect", ENDITEM,
                LAST);

        web_custom_request("HttpBox.do_2",
                "URL=http://192.168.1.105:8080/BlueBox/HttpBox.do",
                "Method=POST",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=file:///C|/Documents%20and%20Settings/deee/妗岄潰/sfs%5Ftank%281%29.exe",
                "Mode=HTML",
                "Body=sfsHttp=5dc6837e357b1353497f5daac6bd6331%3Cmsg%20t%3D%27sys%27%3E%3Cbody%20action%3D%27verChk%27%20r%3D%270%27%3E%3Cver%20v%3D%27158%27%20%2F%3E%3C%2Fbody%3E%3C%2Fmsg%3E",
                LAST);

        web_submit_data("HttpBox.do_3",
                "Action=http://192.168.1.105:8080/BlueBox/HttpBox.do",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=file:///C|/Documents%20and%20Settings/deee/妗岄潰/sfs%5Ftank%281%29.exe",
                "Snapshot=t2.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=sfsHttp", "Value=5dc6837e357b1353497f5daac6bd6331poll", ENDITEM,
                LAST);
下了一个坦克的小游戏做个试验,想模拟多人在线,发现每次登陆只有5dc6837e357b1353497f5daac6bd6331发生改变,其他代码没有变动,我想每次这段自动获取,如何做呢?是用关联吗?如何关联啊?非常感谢 d

[ 本帖最后由 cncnily 于 2010-8-5 11:22 编辑 ]
回复

使用道具 举报

该用户从未签到

发表于 2010-8-3 17:56:19 | 显示全部楼层
你用关联试试能不能解决问题。    关联我也不是很明白   多看看资料     祝你早日成功     我也在摸索中
回复 支持 反对

使用道具 举报

该用户从未签到

发表于 2010-8-3 17:59:51 | 显示全部楼层
用自动关联下。运行脚本,点击“find correlations”,选择需要关联的数值就可以关联了
回复 支持 反对

使用道具 举报

该用户从未签到

 楼主| 发表于 2010-8-3 18:03:19 | 显示全部楼层
关联也不能自动获取新的地址吧。。。
每个用户登录的地址不一样
回复 支持 反对

使用道具 举报

该用户从未签到

 楼主| 发表于 2010-8-4 09:10:07 | 显示全部楼层
高手帮我看看
回复 支持 反对

使用道具 举报

该用户从未签到

 楼主| 发表于 2010-8-4 11:19:05 | 显示全部楼层
如何关联啊 能说的具体点吗?qq联系也可以 谢谢大虾了
回复 支持 反对

使用道具 举报

该用户从未签到

发表于 2010-8-4 12:52:06 | 显示全部楼层
你先问清楚啥时候这个id发给你,然后你才可以关联,建议你先搞清楚啥事关联再来解决具体问题
回复 支持 反对

使用道具 举报

该用户从未签到

 楼主| 发表于 2010-8-4 13:10:35 | 显示全部楼层
链接登陆的时候就发送给我了 关联确实很模糊 看的都是网页的那些关联 貌似不是很一样 云老师帮帮忙
回复 支持 反对

使用道具 举报

该用户从未签到

发表于 2010-8-4 17:15:48 | 显示全部楼层
你的第一个请求是登录么?那么在这个前面写个关联,去找sessionid就可以了
回复 支持 反对

使用道具 举报

该用户从未签到

 楼主| 发表于 2010-8-5 10:22:00 | 显示全部楼层
虚拟用户脚本已启动
正在开始操作 vuser_init。
Web Turbo 重播 LoadRunner 8.1.0 for WINXP; Web 内部版本 4788          [MsgId: MMSG-27143]
运行时设置文件: "C:\Documents and Settings\deee\My Documents\CommandCenterUser4\\default.cfg"          [MsgId: MMSG-27141]
正在结束操作 vuser_init。
正在运行 Vuser...
正在开始迭代 1。
正在开始操作 Action。
Action.c(4): “http://192.168.1.105:8080/BlueBox/HttpBox.do”(RelFrameId=1)的 t=532ms: 110 个字节响应标头
Action.c(4):     HTTP/1.1 200 OK\r\n
Action.c(4):     Content-Type: text/html; charset=utf-8\r\n
Action.c(4):     Transfer-Encoding: chunked\r\n
Action.c(4):     Server: Jetty(6.1.16)\r\n
Action.c(4):     \r\n
Action.c(4): “http://192.168.1.105:8080/BlueBox/HttpBox.do”(RelFrameId=1)的 t=552ms: 4 个字节成块响应开销
Action.c(4):     23\r\n
Action.c(4): “http://192.168.1.105:8080/BlueBox/HttpBox.do”(RelFrameId=1)的 t=567ms: 35 个字节成块响应正文
Action.c(4):   #37f1c933ac99ecc6a1aa46b58c3402d0\r\n
Action.c(4): “http://192.168.1.105:8080/BlueBox/HttpBox.do”(RelFrameId=1)的 t=577ms: 7 个字节成块响应开销
Action.c(4):     \r\n
Action.c(4):     0\r\n
Action.c(4):     \r\n
Action.c(4): web_submit_data("HttpBox.do") 已成功,35 个正文字节,110 个标头字节,11 个成块开销字节          [MsgId: MMSG-26385]
Action.c(15): “http://192.168.1.105:8080/BlueBox/HttpBox.do”(RelFrameId=1)的 t=696ms: 110 个字节响应标头
Action.c(15):     HTTP/1.1 200 OK\r\n
Action.c(15):     Content-Type: text/html; charset=utf-8\r\n
Action.c(15):     Transfer-Encoding: chunked\r\n
Action.c(15):     Server: Jetty(6.1.16)\r\n
Action.c(15):     \r\n
Action.c(15): “http://192.168.1.105:8080/BlueBox/HttpBox.do”(RelFrameId=1)的 t=763ms: 3 个字节成块响应开销
Action.c(15):     8\r\n
Action.c(15): “http://192.168.1.105:8080/BlueBox/HttpBox.do”(RelFrameId=1)的 t=771ms: 8 个字节成块响应正文
Action.c(15):     ERR#01\r\n
Action.c(15): “http://192.168.1.105:8080/BlueBox/HttpBox.do”(RelFrameId=1)的 t=783ms: 7 个字节成块响应开销
Action.c(15):     \r\n
Action.c(15):     0\r\n
Action.c(15):     \r\n
Action.c(15): web_custom_request("HttpBox.do_2") 已成功,8 个正文字节,110 个标头字节,10 个成块开销字节          [MsgId: MMSG-26385]
Action.c(25): “http://192.168.1.105:8080/BlueBox/HttpBox.do”(RelFrameId=1)的 t=870ms: 110 个字节响应标头
Action.c(25):     HTTP/1.1 200 OK\r\n
Action.c(25):     Content-Type: text/html; charset=utf-8\r\n
Action.c(25):     Transfer-Encoding: chunked\r\n
Action.c(25):     Server: Jetty(6.1.16)\r\n
Action.c(25):     \r\n
Action.c(25): “http://192.168.1.105:8080/BlueBox/HttpBox.do”(RelFrameId=1)的 t=937ms: 3 个字节成块响应开销
Action.c(25):     8\r\n
Action.c(25): “http://192.168.1.105:8080/BlueBox/HttpBox.do”(RelFrameId=1)的 t=946ms: 8 个字节成块响应正文
Action.c(25):     ERR#01\r\n
Action.c(25): “http://192.168.1.105:8080/BlueBox/HttpBox.do”(RelFrameId=1)的 t=959ms: 2 个字节成块响应开销
Action.c(25):     \r\n
Action.c(25): “http://192.168.1.105:8080/BlueBox/HttpBox.do”(RelFrameId=1)的 t=972ms: 5 个字节成块响应开销
Action.c(25):     0\r\n
Action.c(25):     \r\n
Action.c(25): web_submit_data("HttpBox.do_3") 已成功,8 个正文字节,110 个标头字节,10 个成块开销字节          [MsgId: MMSG-26385]
Action.c(36): “http://192.168.1.105:8080/BlueBox/HttpBox.do”(RelFrameId=1)的 t=1059ms: 110 个字节响应标头
Action.c(36):     HTTP/1.1 200 OK\r\n
Action.c(36):     Content-Type: text/html; charset=utf-8\r\n
Action.c(36):     Transfer-Encoding: chunked\r\n
Action.c(36):     Server: Jetty(6.1.16)\r\n
Action.c(36):     \r\n
Action.c(36): “http://192.168.1.105:8080/BlueBox/HttpBox.do”(RelFrameId=1)的 t=1129ms: 3 个字节成块响应开销
Action.c(36):     8\r\n
Action.c(36): “http://192.168.1.105:8080/BlueBox/HttpBox.do”(RelFrameId=1)的 t=1142ms: 8 个字节成块响应正文
Action.c(36):     ERR#01\r\n
Action.c(36): “http://192.168.1.105:8080/BlueBox/HttpBox.do”(RelFrameId=1)的 t=1161ms: 7 个字节成块响应开销
Action.c(36):     \r\n
Action.c(36):     0\r\n
Action.c(36):     \r\n
这个是部分回放的日志,红色这行就是改变的数值,关联边界值我怎么写啊?我不知道具体哪个value是变化的。sessionid我没有找到

[ 本帖最后由 cncnily 于 2010-8-5 10:34 编辑 ]
回复 支持 反对

使用道具 举报

该用户从未签到

发表于 2010-8-5 10:37:18 | 显示全部楼层
你先把整个登陆后返回的数据包帖出来,我觉得你要先搞明白什么是关联,否则给你说了你也不知道为啥要这样做,函数怎么写
回复 支持 反对

使用道具 举报

该用户从未签到

 楼主| 发表于 2010-8-5 10:44:57 | 显示全部楼层
吼吼 自己解决咯 哈哈 谢谢大家咯
回复 支持 反对

使用道具 举报

该用户从未签到

发表于 2010-8-5 11:21:12 | 显示全部楼层
世界清静了
回复 支持 反对

使用道具 举报

该用户从未签到

 楼主| 发表于 2010-8-5 11:23:23 | 显示全部楼层
原帖由 云层 于 2010-8-5 11:21 发表
世界清静了

哈哈 辛苦云老师咯 有问题还要打扰您
LR如此神奇 有意思 上班无聊研究研究
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-3-29 15:20 , Processed in 0.076942 second(s), 28 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表