51Testing软件测试论坛

标题: flex性能测试 [打印本页]

作者: wangz2223    时间: 2009-10-19 18:32
标题: flex性能测试
Genneratio log 能够解析对象,但报Externalizable object type is not supported. "web_custom_request" is generated instead of "amf_call".
脚本中部分数据不可见,无法参数化;

loadrunner9.5,flex3.0

那位大侠解决过此类问题,请出手,谢谢!
作者: GeorgeWangLC    时间: 2009-10-20 11:40
没遇到
帮楼主顶

期待答案ing
作者: wangz2223    时间: 2009-10-20 16:21
问题已经解决,具体见附件。
[attach]57045[/attach]
前一份文档在引用JAR包的地方少说了flex的相关Jar包。

[ 本帖最后由 wangz2223 于 2009-10-23 11:47 编辑 ]
作者: wangz2223    时间: 2009-10-22 18:18
又渔岛新问题,脚本录制好后,想将其中的Dsid(服务端生成的)做个关联,可是怎么也关联不上,报错如下:
vuser_init.c(279): Error -26377: No match found for the requested parameter "DSId010". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 40960 bytes, use web_set_max_html_param_len to increase the parameter size          [MsgId: MERR-26377]
vuser_init.c(279): Notify: Saving Parameter "DSId010 = "
vuser_init.c(279): web_concurrent_end highest severity level was "ERROR", 90306 body bytes, 1824 header bytes          [MsgId: MMSG-26388]

部分脚本:
        char outFlightParam[512];

        web_reg_find("Text=????",
                LAST);

        web_url("index.htm",
                "URL=http://192.168.100.233:8991/trms/index.htm",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTTP",
                LAST);

        web_concurrent_start(NULL);

        web_url("history.css",
                "URL=http://192.168.100.233:8991/trms/common/js/flex/history.css",
                "Resource=1",
                "RecContentType=text/css",
                "Referer=http://192.168.100.233:8991/trms/index.htm",
                "Snapshot=t2.inf",
                LAST);

        web_url("AC_OETags.js",
                "URL=http://192.168.100.233:8991/trms/common/js/flex/AC_OETags.js",
                "Resource=1",
                "Referer=http://192.168.100.233:8991/trms/index.htm",
                "Snapshot=t3.inf",
                LAST);

        web_url("history.js",
                "URL=http://192.168.100.233:8991/trms/common/js/flex/history.js",
                "Resource=1",
                "Referer=http://192.168.100.233:8991/trms/index.htm",
                "Snapshot=t4.inf",
                LAST);

        web_url("trmsForFlex.js",
                "URL=http://192.168.100.233:8991/trms/common/js/rms/trmsForFlex.js",
                "Resource=1",
                "Referer=http://192.168.100.233:8991/trms/index.htm",
                "Snapshot=t5.inf",
                LAST);

        web_concurrent_end(NULL);

        web_add_header("x-flash-version",
                "10,0,32,18");

        web_set_max_html_param_len("40960");

        web_concurrent_start(NULL);

        web_url("trms.swf",
                "URL=http://192.168.100.233:8991/trms/trms.swf",
                "Resource=1",
                "Referer=http://192.168.100.233:8991/trms/index.htm",
                "Snapshot=t6.inf",
                LAST);

        web_add_header("x-flash-version",
                "10,0,32,18");

        web_url("mate-0.8.8.1.swf",
                "URL=http://192.168.100.233:8991/trms/flex/libs/mate-0.8.8.1.swf",
                "Resource=1",
                "Referer=http://192.168.100.233:8991/trms/trms.swf",
                "Snapshot=t7.inf",
                LAST);

        web_add_header("x-flash-version",
                "10,0,32,18");

        web_url("flexlib-bin-2.4.swf",
                "URL=http://192.168.100.233:8991/trms/flex/libs/flexlib-bin-2.4.swf",
                "Resource=1",
                "Referer=http://192.168.100.233:8991/trms/trms.swf",
                "Snapshot=t8.inf",
                LAST);

        web_add_header("x-flash-version",
                "10,0,32,18");

        web_url("flexmdi-1.1.swf",
                "URL=http://192.168.100.233:8991/trms/flex/libs/flexmdi-1.1.swf",
                "Resource=1",
                "Referer=http://192.168.100.233:8991/trms/trms.swf",
                "Snapshot=t9.inf",
                LAST);

        web_add_header("x-flash-version",
                "10,0,32,18");

        web_url("as3xls-1.0.swf",
                "URL=http://192.168.100.233:8991/trms/flex/libs/as3xls-1.0.swf",
                "Resource=1",
                "Referer=http://192.168.100.233:8991/trms/trms.swf",
                "Snapshot=t10.inf",
                LAST);

        web_add_header("x-flash-version",
                "10,0,32,18");

        web_url("osslib-6.5-SNAPSHOT.swf",
                "URL=http://192.168.100.233:8991/trms/flex/libs/osslib-6.5-SNAPSHOT.swf",
                "Resource=1",
                "Referer=http://192.168.100.233:8991/trms/trms.swf",
                "Snapshot=t11.inf",
                LAST);

        web_add_header("x-flash-version",
                "10,0,32,18");

        web_url("rmslib-6.5-20091012.062116-81.swf",
                "URL=http://192.168.100.233:8991/trms/flex/libs/rmslib-6.5-20091012.062116-81.swf",
                "Resource=1",
                "Referer=http://192.168.100.233:8991/trms/trms.swf",
                "Snapshot=t12.inf",
                LAST);

        web_add_header("x-flash-version",
                "10,0,32,18");

        web_url("gislib-6.5-20091012.061014-62.swf",
                "URL=http://192.168.100.233:8991/trms/flex/libs/gislib-6.5-20091012.061014-62.swf",
                "Resource=1",
                "Referer=http://192.168.100.233:8991/trms/trms.swf",
                "Snapshot=t13.inf",
                LAST);

        web_concurrent_end(NULL);

        lr_think_time(5);

/*        web_reg_save_param("jsessionid",
                "LB/IC=JSESSIONID",
//                "RB/IC=!-",
                "Ord=1",
                "Search=All",
                "RelFrameId=1",
                "SaveLen=52",
                LAST);
*/
        web_reg_save_param("DSId010",
                "LB/IC=Dsid\x06I",
                "RB/IC=\x05",
                "Ord=1",
                "Search=Body",
                "RelFrameID=1",
                LAST);  

        web_add_auto_header("x-flash-version", "10,0,32,18");

        flex_amf_call("AMF3_call",
                "Gateway=http://192.168.100.233:8991/trms/messagebroker/amf",
                "Snapshot=t14.inf",
                MESSAGE,
                "Method=null",
                "TargetObjectId=/1",
                BEGIN_ARGUMENTS,
                "<AMF3><object-externalizable-custom>"
                "<flex.messaging.messages.CommandMessage>\n  <destination></destination"
                ">\n  <messageId>F8D09A99-217E-121E-85AA-751364F45D23</messageId>\n  "
                "<timestamp>0</timestamp>\n  <timeToLive>0</timeToLive>\n  <headers>\n "
                "   <entry>\n      <string>DSId</string>\n      <string>nil</string>\n "
                "   </entry>\n    <entry>\n      <string>DSMessagingVersion</string>\n "
                "     <int>1</int>\n    </entry>\n  </headers>\n  <body class=\""
                "flex.messaging.io.amf.ASObject\" serialization=\"custom\">\n    "
                "<unserializable-parents/>\n    <map>\n      <default>\n        "
                "<loadFactor>0.75</loadFactor>\n        <threshold>12</threshold>\n    "
                "  </default>\n      <int>16</int>\n      <int>0</int>\n    </map>\n   "
                " <flex.messaging.io.amf.ASObject>\n      <default>\n        "
                "<inHashCode>false</inHashCode>\n        <inToString>false</inToString"
                ">\n      </default>\n    </flex.messaging.io.amf.ASObject>\n  </body>"
                "\n  <correlationId></correlationId>\n  <operation>5</operation>\n</"
                "flex.messaging.messages.CommandMessage></object-externalizable-custom>"
                "</AMF3>",
                END_ARGUMENTS,
                LAST);

        flex_amf_call("AMF3_call_1",
                "Gateway=http://192.168.100.233:8991/trms/messagebroker/amf;jsessionid="
                "QTVMKp5CVfK8ydtDJ3TS8XL21nlfS7h2nXYMBmZGhcyYqNJc1yGs!-518624695",
                "Snapshot=t15.inf",
                MESSAGE,
                "Method=null",
                "TargetObjectId=/1",
                BEGIN_ARGUMENTS,
                "<AMF3><object-externalizable-custom>"
                "<flex.messaging.messages.RemotingMessage>\n  <destination"
                ">sysLocalCacheEventDest</destination>\n  <messageId"
                ">8473460E-7601-B09A-F2B8-751364D5B5D4</messageId>\n  <timestamp>0</"
                "timestamp>\n  <timeToLive>0</timeToLive>\n  <headers>\n    <entry>\n  "
                "    <string>DSId</string>\n      <string"
                ">{DSId010}</string>\n    </entry>\n  </"
                "headers>\n  <operation>invoke</operation>\n  <parameters>\n    <null/"
                ">\n    <string>findValidSysLocalCacheEvent</string>\n  </parameters>\n"
                "</flex.messaging.messages.RemotingMessage></"
                "object-externalizable-custom></AMF3>",
                END_ARGUMENTS,
                LAST);
作者: wangz2223    时间: 2009-10-22 18:21
部分Generation Log:
****** Start Log Message ******

Start Frames Hierarchy Tree Dump
/trms/index.htm
End Frames Hierarchy Tree Dump

$$$$$$ End Log Message $$$$$$

****** Add Event For Transaction With Id 22 ****** (Location Flag : tFlagInsertAfter, Location ID : 21)
        web_url("gislib-6.5-20091012.061014-62.swf",
                "URL=http://192.168.100.233:8991/trms/flex/libs/gislib-6.5-20091012.061014-62.swf",
                "Resource=1",
                "Referer=http://192.168.100.233:8991/trms/trms.swf",
                "Snapshot=t13.inf",
                LAST);


$$$$$$ Add Event For Transaction With Id 22 Ended $$$$$$

****** Add Event For Transaction With Id 0 ****** (Location Flag : tFlagInsertBefore, Location ID : 22)
        web_add_header("x-flash-version",
                "10,0,32,18");


$$$$$$ Add Event For Transaction With Id 0 Ended $$$$$$

****** Request Header For Transaction With Id 23 ******
POST /trms/messagebroker/amf HTTP/1.1
Accept: */*
Accept-Language: zh-CN
Referer: http://192.168.100.233:8991/trms/trms.swf/[[DYNAMIC]]/2
x-flash-version: 10,0,32,18
Content-Type: application/x-amf
Content-Length: 244
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)
Host: 192.168.100.233:8991
Connection: Keep-Alive
Cache-Control: no-cache


$$$$$$ Request Header For Transaction With Id 23 Ended $$$$$$

****** Request Body For Transaction With Id 23 ******
\x00\x03\x00\x00\x00\x01\x00\x04null\x00\x02/1\x00\x00\x00\xE0
\x00\x00\x00\x01\x11
\x81\x13Mflex.messaging.messages.CommandMessage\x13operation\x1BcorrelationId\x13messageId\x11clientId\x15timeToLive\x13timestamp\x0Fheaders\x17destination        body\x04\x05\x06\x01\x06IF8D09A99-217E-121E-85AA-751364F45D23\x01\x04\x00\x04\x00
\x0B\x01%DSMessagingVersion\x04\x01        DSId\x06\x07nil\x01\x06\x01
\x05\x01
$$$$$$ Request Body For Transaction With Id 23 Ended $$$$$$

****** Response Header For Transaction With Id 23 ******
HTTP/1.1 200 OK
Cache-Control: no-cache
Cache-Control: no-cache="set-cookie"
Date: Wed, 21 Oct 2009 03:01:54 GMT
Pragma: no-cache
Content-Length: 276
Content-Type: application/x-amf
Expires: Sat, 25 Dec 1999 00:00:00 GMT
Set-Cookie: JSESSIONID=QTVMKp5CVfK8ydtDJ3TS8XL21nlfS7h2nXYMBmZGhcyYqNJc1yGs!-518624695; path=/
X-Powered-By: Servlet/2.4 JSP/2.0


$$$$$$ Response Header For Transaction With Id 23 Ended $$$$$$

****** Response Body For Transaction With Id 23 ******
\x00\x03\x00\x01\x00\x12AppendToGatewayUrl\x01\xFF\xFF\xFF\xFF\x02\x00K;jsessionid=QTVMKp5CVfK8ydtDJ3TS8XL21nlfS7h2nXYMBmZGhcyYqNJc1yGs!-518624695\x00\x01\x00\x0B/1/onResult\x00\x00\xFF\xFF\xFF\xFF\x11
\x07\x07DSK\xA8\x03        \x01        DSId\x06I1C02C03B-F1ED-EAA1-6111-D2FBDB3436C0%DSMessagingVersion\x05?\xF0\x00\x00\x00\x00\x00\x00\x01\x05BrGP\xB2\x13\x00\x00\x0C!\x1C\x02纁\x00櫊计暨_p鷘5\x0C!\x1C\x02纁\x01\x979\\\x03a鳺爕鈢\x02\x0C!殭!~\x12\x1E叒u\x13d鬩#\x00
$$$$$$ Response Body For Transaction With Id 23 Ended $$$$$$
作者: wangz2223    时间: 2009-10-23 10:31
没人能帮忙吗?自己顶下!!!!!!
作者: skyloves    时间: 2009-10-23 11:18
你好的你的LR9.5的系列号可以录FLEX脚本么?
作者: qzzqzj    时间: 2009-11-24 18:41
标题: 回复 2# 的帖子
jar包是只要flex相关就可以了?几个?通用的?应用程序的不要吧?
作者: zy_huangli    时间: 2010-5-19 10:00
标题: 怎样才算成功录制flex3呢
我用loadrunner9.5录制flex3的脚本,选择的协议是:flex+web,但flex_web_request这部分是看不懂的报文,如果要进行参数据化之类的找不到数据的位置,具体代码如下:
        flex_amf_call("AMF3_call",
                "Gateway=http://localhost:8080/itsm/spring/messagebroker/amf",
                "Snapshot=t9.inf",
                MESSAGE,
                "Method=null",
                "TargetObjectId=/1",
                BEGIN_ARGUMENTS,
                "<AMF3><object-externalizable-custom>"
                "<flex.messaging.messages.CommandMessage>\n  <destination></destination"
                ">\n  <messageId>DBDD707E-45E0-4CAB-7469-957539FF3276</messageId>\n  "
                "<timestamp>0</timestamp>\n  <timeToLive>0</timeToLive>\n  <headers>\n "
                "   <entry>\n      <string>DSId</string>\n      <string>nil</string>\n "
                "   </entry>\n    <entry>\n      <string>DSMessagingVersion</string>\n "
                "     <int>1</int>\n    </entry>\n  </headers>\n  <body class=\""
                "flex.messaging.io.amf.ASObject\" serialization=\"custom\">\n    "
                "<unserializable-parents/>\n    <map>\n      <default>\n        "
                "<loadFactor>0.75</loadFactor>\n        <threshold>12</threshold>\n    "
                "  </default>\n      <int>16</int>\n      <int>0</int>\n    </map>\n   "
                " <flex.messaging.io.amf.ASObject>\n      <default>\n        "
                "<inHashCode>false</inHashCode>\n        <inToString>false</inToString"
                ">\n      </default>\n    </flex.messaging.io.amf.ASObject>\n  </body>"
                "\n  <correlationId></correlationId>\n  <operation>5</operation>\n</"
                "flex.messaging.messages.CommandMessage></object-externalizable-custom>"
                "</AMF3>",
                END_ARGUMENTS,
                LAST);

        flex_amf_call("AMF3_call_1",
                "Gateway=http://localhost:8080/itsm/spring/messagebroker/amf",
                "Snapshot=t10.inf",
                MESSAGE,
                "Method=null",
                "TargetObjectId=/2",
                BEGIN_ARGUMENTS,
                "<AMF3><object-externalizable-custom>"
                "<flex.messaging.messages.RemotingMessage>\n  <destination"
                ">incidentManagementAction</destination>\n  <messageId"
                ">7E0B56D0-829D-4D40-CF69-95753982DAD0</messageId>\n  <timestamp>0</"
                "timestamp>\n  <timeToLive>0</timeToLive>\n  <headers>\n    <entry>\n  "
                "    <string>DSEndpoint</string>\n      <string>my-amf</string>\n    </"
                "entry>\n    <entry>\n      <string>DSId</string>\n      <string"
                ">14E3381A-B10F-CA4A-11E0-4AC97314A4BC</string>\n    </entry>\n  </"
                "headers>\n  <operation>getIncicode</operation>\n  <parameters/>\n</"
                "flex.messaging.messages.RemotingMessage></object-externalizable-custom"
                "></AMF3>",
                END_ARGUMENTS,
                LAST);

        web_revert_auto_header("x-flash-version");

        web_add_cookie("uin=o0892746252; DOMAIN=wing.toolbar.soso.com");

        web_add_cookie("skey=@qOCMGQTL8; DOMAIN=wing.toolbar.soso.com");

        web_add_cookie("gid=JWCNSQI2SQCAyHmkpBHC4z4E2w83sP4G; DOMAIN=wing.toolbar.soso.com");

        web_add_cookie("mkey=878c703100e04dfa6544630f66335028; DOMAIN=wing.toolbar.soso.com");

        web_add_cookie("pt2gguin=o0892746252; DOMAIN=wing.toolbar.soso.com");

        web_add_cookie("ptcz=963326a653dad3db199f3e9c78ea0a39e9101857caacc4fd2e81733b4480051a; DOMAIN=wing.toolbar.soso.com");

        web_add_cookie("suid=4257098794; DOMAIN=wing.toolbar.soso.com");

        web_add_cookie("pgv_pvid=5134184000; DOMAIN=wing.toolbar.soso.com");

        web_add_cookie("pgv_flv=10.0; DOMAIN=wing.toolbar.soso.com");

        web_add_cookie("TB=3; DOMAIN=wing.toolbar.soso.com");

        web_add_cookie("TBV=1; DOMAIN=wing.toolbar.soso.com");

        web_url("security_session2.q",
                "URL=http://wing.toolbar.soso.com/session/security_session2.q",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t11.inf",
                "Mode=HTTP",
                LAST);

        flex_web_request("amf_3",
                "URL=http://localhost:8080/itsm/spring/messagebroker/amf",
                "Method=POST",
                "Resource=0",
                "RecContentType=application/x-amf",
                "Referer=http://localhost:8080/itsm/flex/index.swf",
                "Snapshot=t12.inf",
                "Mode=HTTP",
                "EncType=application/x-amf",
                "BodyBinary=\\x00\\x03\\x00\\x00\\x00\\x01\\x00\\x04null\\x00\\x02/"
                "3\\x00\\x00\\x01B\n\\x00\\x00\\x00\\x01\\x11\n"
                "\\x81\\x13Oflex.messaging.messages.RemotingMessage\r"
                "source\\x13operation\\x11clientId\t"
                "body\\x17destination\\x13messageId\\x15timeToLive\\x13timestamp\\x0Fhe"
                "aders\\x01\\x06\\x1BfindCustomers\\x06I14E33A31-5C0C-05A4-120F-B219028"
                "D717D\t"
                "\\x01\\x01\\x061incidentManagementAction\\x06IC08FF183-0AC6-A5A9-B663-"
                "957539823FD4\\x04\\x00\\x04\\x00\n\\x0B\\x01\t"
                "DSId\\x06I14E3381A-B10F-CA4A-11E0-4AC97314A4BC\\x15DSEndpoint\\x06\r"
                "my-amf\\x01",
                LAST);
作者: QQHao    时间: 2010-5-19 11:41
我的脚本是正常的,但就是回放的时候快照出不来,是一些类似代码的东西。也没报错。
俺用的是lr9.52  recording options---flex里面没有像lz提供的附件所说的情况,没有提供jar包路径。
作者: zy_huangli    时间: 2010-5-19 14:11
你有lr9.52吗,能发给我一份吗?我正需要呢,邮箱:zy_huangli@163.com,非常感谢!
作者: anling    时间: 2011-5-7 15:44
遇到了相同的问题。无法关联DSId。
你这个还好,至少能够录全消息,关联Dsid用lr_get_xml_value这个函数。
留个联系方式吧。告诉我如何才能路道AMF_call.

纠结2天了。急于解决啊。
qq:103185546
加我要注明一下。谢谢
作者: anling    时间: 2011-5-7 16:28
留言告诉我方法也成。
作者: shuihan    时间: 2011-11-23 17:53
楼主后面是怎么解决的?
作者: lishuoyiyu    时间: 2014-6-9 15:28
哪位大神指导怎么使用LoadRunner测试Flex中的接口吗




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