LoadRunner的Capture Level
作者:网络转载 发布时间:[ 2015/9/14 10:57:30 ] 推荐标签:性能测试工具
场景:录制loadrunner的web站点
问题:录制的过程中发现除了页面正常的请求外还有些看不懂的请求(包含乱码),脚本如下:
web_url("WebTours",
"URL=http://127.0.0.1:1080/WebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t14.inf",
"Mode=HTML",
EXTRARES,
"Url=http://act.cmcmcdn.com/upload/201507/8afc2fe48db9060fe1bdda2089e1d950.png", ENDITEM,
"Url=http://act.cmcmcdn.com/upload/201507/3b491068507d8f85ea7b35d756da7215.png", ENDITEM,
LAST);
web_url("config.xml",
"URL=http://bho.xl7.xunlei.com/platform/2.5.x.xxxx/config.xml",
"Resource=0",
"RecContentType=text/xml",
"Referer=",
"Snapshot=t15.inf",
"Mode=HTML",
LAST);
web_custom_request("q.cgi",
"URL=http://masterconn.qq.com/q.cgi",
"Method=POST",
"Resource=1",
"Referer=",
"Snapshot=t16.inf",
"EncType=",
"BodyBinary=\x00\x02\x01@\x00\x00\x00\x04\x00\x00\x00\xEA\x00\x00\x07\xDA\x19\x9E\x18\x08U\xB3\x13\xC8*?\x1F\xB47?\x14S?\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00 僬?鸯GT聍8T\x98'\x13绶?0?\x07?\xEC\x1Ey
\x13[\x9F\x1A忍Q??\x13谈]⒍剐ncj?\x04\xFFw#?G{\xA7\x1A??g:?绪l?\xFB\x7F\x101珥???=88bY?\xB1\x0B&_\x8F\x1F\x7F
泛|?|\xC1
"
"l?V3趔? K?X\x18???\x1F?\#弩\xFE\x16茎?S2,\xC6\x1C??uJp??bi曼\\\x08",
LAST);
return 0;
上面的脚本中出了第一个是期望内的,其他的出现的很莫名其妙,为此笔者查阅了相关资料,发现Record Options--NetWork--Port Mapping中的
Capture Level默认选中的为Socket level data,而关于Capture Level有这么一段解释:
1、Socket level data.
Capture data using trapping on the socket level only. Port mappings apply in this case (default).
2、WinINet level data.
Capture data using hooks on the WinINet.dll API used by certain HTTP applications. The most common application that uses these hooks is Internet Explorer. Port mappings are not relevant for this level.
3、Socket level and WinINet level data.
Captures data using both mechanisms. WinINet level sends information for applications that use WinINet.dll. Socket level sends data only if it determines that it did not originate from WinINet.dll. Port mapping applies to data that did not originate from WinINet.dll.
抱着试试看的心里,笔者把Capture Level修改成WinINet level data,发现脚本中莫名奇妙的内容果然不见了?( ̄? ̄)?
Action()
{
web_url("WebTours",
"URL=http://127.0.0.1:1080/WebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t13.inf",
"Mode=HTML",
EXTRARES,
"Url=../favicon.ico", "Referer=", ENDITEM,
"Url=https://ieonline.microsoft.com/favicon.ico", "Referer=", ENDITEM,
LAST);
return 0;
}
相关推荐
更新发布
功能测试和接口测试的区别
2023/3/23 14:23:39如何写好测试用例文档
2023/3/22 16:17:39常用的选择回归测试的方式有哪些?
2022/6/14 16:14:27测试流程中需要重点把关几个过程?
2021/10/18 15:37:44性能测试的七种方法
2021/9/17 15:19:29全链路压测优化思路
2021/9/14 15:42:25性能测试流程浅谈
2021/5/28 17:25:47常见的APP性能测试指标
2021/5/8 17:01:11