51Testing软件测试论坛
标题:
LR的函数web_concurrent_start,回放报错,求助
[打印本页]
作者:
lansanniu
时间:
2015-4-14 17:43
标题:
LR的函数web_concurrent_start,回放报错,求助
我现在要实现多个web_custom_request的同时提交
于是用到了并发执行的函数web_concurrent_start,web_concurrent_end,这个函数可以把他们之间的请求一次性提交。
这也是论坛里的朋友告诉我的,先感谢。可是回放调试代码的时候报了错,不知道什么原因。
代码如下,我要同时提交两个请求
web_concurrent_start(NULL);
web_add_header("USER", "ADMIN");
web_custom_request("baseoper_1",
... ...
LAST);
web_custom_request("baseoper_2",
... ...
LAST);
web_concurrent_end(NULL);
错误信息如下:
Action.c(26): Error -27221: Invalid value for the "HTML" argument (number 8) [MsgId: MERR-27221]
Action.c(26): Registering web_custom_request("baseoper_{C_PORT_CODE}") highest severity level was "ERROR" [MsgId: MMSG-26389]
作者:
saharaqs
时间:
2015-4-14 18:47
你的web_custom_request函数里第8个参数不对。
作者:
saharaqs
时间:
2015-4-14 18:50
web_custom_request("baseoper_{C_PORT_CODE}“函数里边第8个参数不对,看看你脚本里那个参数写的是什么啊
作者:
lansanniu
时间:
2015-4-15 10:23
楼上的,第8个参数 我数了一下,应该是这个 "EncType=application/x-java-serialized-object", 原文是这样的:
web_custom_request("baseoper_{C_PORT_CODE}",
"URL=http://172.17.19.7:10500/PLATFORM/baseoper",
"Method=POST",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1564.inf",
"Mode=HTML",
"EncType=application/x-java-serialized-object",
"Body={\"className\":\"IActControlService\",\"methodName\":\"doBusOper\",\"paraAssemble\":[{\"paraType\":\"HashMap\",\"paraValue\":\"{\\\"C_PORT_CODE\\\":\\\"{C_PORT_CODE}\\\",\\\"C_DVA_ITEM_CODE\\\":\\\"XGSG,XZSG,"
"SYJZ_SYJZ,FECF,SCCW_SCPZ\\\",\\\"D_START\\\":\\\"{TEMP_DATE}\\\",\\\"D_END\\\":\\\"{TEMP_DATE}\\\",\\\"C_OPER_CODE\\\":\\\"130732112405075950\\\",\\\"C_FUN_CODE\\\":\\\"valuation\\\",\\\"C_IDF_CODE\\\":\\\"\\\",\\\"C_RELA_ID\\\":\\\"\\\"}\"}]}",
LAST);
作者:
lansanniu
时间:
2015-4-15 10:32
我把request中的"Mode=HTML", 这个注释掉了 能跑了 但是不知道注释掉这个会不会有影响
saharaqs你在帮我看看
作者:
saharaqs
时间:
2015-4-15 13:08
从你贴的脚本内容看,第8个参数就是 "Mode=HTML", ,错误提示信息里也是Invalid value for the "HTML" argument,应该就是这个的问题。
web_custom_request里的mode值有html和http两种。
你脚本中其他的 web_custom_request中,这个mode值也是html?还是http?
作者:
lansanniu
时间:
2015-4-15 13:38
我脚本中其他的 web_custom_request,这个mode值也是html。
我是用web(http/html)协议录制的。
现在我手动把这个地方的mode改成http,其他的仍保持html不变。能跑通了,只是不知道会有什么影响。
作者:
lansanniu
时间:
2015-4-15 15:29
从目前的试验结果来看,脚本运行正常,且数据正常插入。
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2