Hello
I'm trying to do my first script with LoadRunner. I have spent some time and almost everything is working properly, but I have found an issue that I'm not able explain.
My script is based in flex protocol. The script is long, so I will put only the two important blocks.
In vuser_init.c y have the following save param sentences:
web_reg_save_param_regexp(
"ParamName=JSESSIONID",
"RegExp=JSESSIONID=(.*?);",
SEARCH_FILTERS,
"Scope=Cookies",
"IgnoreRedirections=Yes",
"RequestUrl=*/oip.console/*",
LAST);
web_reg_save_param_xpath(
"ParamName=CorrelationParameter",
"QueryString=//string[contains(text(),'DSId')]/following::string[contains(text(),'-')]",
SEARCH_FILTERS,
"Scope=Body",
LAST);
Both of them work perfectly and register correctly the runtime parameters.
Later on, I have the following sentences to register 4 parameters: PubSubTopic... PubSubTopic_3, and it works perfectly.
web_reg_save_param_regexp(
"ParamName=PubSubTopic",
"RegExp=(oip\\.[0-9]+)",
"Ordinal=1",
SEARCH_FILTERS,
"Scope=Body",
LAST);
web_reg_save_param_regexp(
"ParamName=PubSubTopic_1",
"RegExp=(oip\\.[0-9]+)",
"Ordinal=2",
SEARCH_FILTERS,
"Scope=Body",
LAST);
web_reg_save_param_regexp(
"ParamName=PubSubTopic_2",
"RegExp=(oip\\.[0-9]+)",
"Ordinal=3",
SEARCH_FILTERS,
"Scope=Body",
LAST);
web_reg_save_param_regexp(
"ParamName=PubSubTopic_3",
"RegExp=(oip\\.[0-9]+)",
"Ordinal=4",
SEARCH_FILTERS,
"Scope=Body",
LAST);
web_custom_request("amf_8",
"URL=http://localhost:8080/oip.console/graniteamf/amf",
"Method=POST",
"Resource=0",
"RecContentType=application/x-amf",
"Referer=http://localhost:8080/oip.console/icm.demo.flexconsole-2.20-SNAPSHOT.swf",
"Snapshot=t13.inf",
"Mode=HTML",
"EncType=application/x-amf",
"BodyBinary=\\x00\\x03\\x00\\x00\\x00\\x08\\x00\\x04null\\x00\\x02/9\\x00\\x00\\x011\n"
"\\x00\\x00\\x00\\x01\\x11\n"
..., /* Simplified here */
LAST);
And finally, the issue: I have these two sentences, the first one is exactly the same than the 3 in the previous block:
web_reg_save_param_regexp(
"ParamName=PubSubTopic_4",
"RegExp=(oip\\.[0-9]+)",
"Ordinal=1",
SEARCH_FILTERS,
"Scope=Body",
LAST);
flex_amf_call(
"AMF3_call_13",
"Gateway=http://localhost:8080/oip.console/graniteamf/amf",
"Snapshot=t31.inf",
"IsParseResponse=No",
MESSAGE,
"Method=null",
"TargetObjectId=/38",
BEGIN_ARGUMENTS,
"<AMF3>"
"<object-externalizable-custom>"
"<flex.messaging.messages.RemotingMessage>"
.... /* simplified here */
"</AMF3>",
END_ARGUMENTS,
LAST);
Until this last sentence, everything was going ok, but in the last sentence, I get the following error:
Error 233 DMS.c(233): Error: DMS.c(233): Continuing after Error -35049: No match found for the requested parameter "PubSubTopic_4". Check whether the requested regular expression exists in the response data [MsgId: MERR-35049] DMS.c C:\Users\Junquero\Documents\VuGen\Scripts\DMS
DMS
The point is that the string matching the regular expression is there, as you can see in this message got from the log (look for iop.82 in response body message):
This is the exact line:
DMS.c(233): destination\x0Fheaders\x13messageId\x15timeToLive\x13timestamp\x06\roip.82\x06ID656CB04-27
And this is the full content.
DMS.c(233): Sending AMF request message. The following XML describes the message content:
...
DMS.c(233): t=65983ms: 208-byte response headers for "http://localhost:8080/oip.console/graniteamf/amf" (RelFrameId=1, Internal ID=34)
DMS.c(233): HTTP/1.1 200 OK\r\n
DMS.c(233): Server: Apache-Coyote/1.1\r\n
DMS.c(233): Expire: Thu, 01 Jan 1970 00:00:00 GMT\r\n
DMS.c(233): Cache-Control: no-store\r\n
DMS.c(233): Content-Type: application/x-amf\r\n
DMS.c(233): Transfer-Encoding: chunked\r\n
DMS.c(233): Date: Fri, 09 Dec 2016 08:43:17 GMT\r\n
DMS.c(233): \r\n
DMS.c(233): t=65985ms: 6-byte chunked response overhead for "http://localhost:8080/oip.console/graniteamf/amf" (RelFrameId=1, Internal ID=34)
DMS.c(233): 2000\r\n
DMS.c(233): t=65986ms: 4166-byte chunked response body for "http://localhost:8080/oip.console/graniteamf/amf" (RelFrameId=1, Internal ID=34)
DMS.c(233): \x00\x03\x00\x00\x00\x05\x00\x0C/38/onResult\x00\x00\xFF\xFF\xFF\xFF\x11\n
DMS.c(233): \x81\x03Uflex.messaging.messages.AcknowledgeMessage\tbody\x11clientId\x1BcorrelationId\x17
DMS.c(233): destination\x0Fheaders\x13messageId\x15timeToLive\x13timestamp\n
DMS.c(233): \x07Cflex.messaging.io.ArrayCollection\t\x0F\x01\n
DMS.c(233): \x07uatms.foundation.core.exports.dms.domain.TxtLineForbidWords\x03\x01\x01\x01\x05?\xF0\x00
DMS.c(233): \x00\x00\x00\x00\x00\x06\x0FKILOMET\x02\x01\n
DMS.c(233): \t\x03\x01\x01\x01\x05@\x00\x00\x00\x00\x00\x00\x00\x06\x07MET\x02\x01\n
DMS.c(233): \t\x03\x01\x01\x01\x05@\x08\x00\x00\x00\x00\x00\x00\x06\rDANGER\x02\x01\n
DMS.c(233): \t\x03\x01\x01\x01\x05@\x10\x00\x00\x00\x00\x00\x00\x06\tLEFT\x03\x01\n
DMS.c(233): \t\x03\x01\x01\x01\x05@\x14\x00\x00\x00\x00\x00\x00\x06\x0BRIGHT\x03\x01\n
DMS.c(233): \t\x03\x01\x01\x01\x05@\x18\x00\x00\x00\x00\x00\x00\x06\x0FANIMALS\x03\x01\n
DMS.c(233): \t\x03\x01\x01\x01\x05@\x1C\x00\x00\x00\x00\x00\x00\x06\x0FPARKING\x03\x01\x06I0D264B58-4D
DMS.c(233): 4B-4015-A810-634FC5839C7B\x06I0C151140-CF39-E944-2CFD-E294E119F106\x01\n
DMS.c(233): \x0B\x01+org.granite.sessionId\x061GDXIy-M0sGyERoFFqFHcUw3K\x01\x06I6A65792C-9BC8-4E92-818
DMS.c(233): 6-6357C1BE1B1A\x05\x00\x00\x00\x00\x00\x00\x00\x00\x05Bu\x8E,\x03I@\x00\x00\x0C/39/onResul
DMS.c(233): t\x00\x00\xFF\xFF\xFF\xFF\x11\n
DMS.c(233): \x81\x03Uflex.messaging.messages.AcknowledgeMessage\tbody\x11clientId\x1BcorrelationId\x17
DMS.c(233): destination\x0Fheaders\x13messageId\x15timeToLive\x13timestamp\x06\roip.82\x06ID656CB04-27
DMS.c(233): CB-4040-B90C-213EC305DB7B\x06IACCFFE91-4748-16E0-5223-E294E14B89CA\x01\n
....
DMS.c(233): F-8B6E902A8556\x05\x00\x00\x00\x00\x00\x00\x00\x00\x05Bu\x8E,\x03]\xE0\x00
DMS.c(233): t=66116ms: Request done "http://localhost:8080/oip.console/graniteamf/amf" [MsgId: MMSG-26000]
DMS.c(233): Notify: Saving Parameter "PubSubTopic_4 = ".
DMS.c(233): Error: DMS.c(233): Continuing after Error -35049: No match found for the requested parameter "PubSubTopic_4". Check whether the requested regular expression exists in the response data [MsgId: MERR-35049]
DMS.c(233): There was an error during the FLEX AMF Call ("AMF3_call_13")
The point is that in the sentences that are working properly, the response message is very similar as shown here:
vuser_init.c(448): t=55450ms: 208-byte response headers for "http://localhost:8080/oip.console/graniteamf/amf" (RelFrameId=1, Internal ID=17)
vuser_init.c(448): HTTP/1.1 200 OK\r\n
vuser_init.c(448): Server: Apache-Coyote/1.1\r\n
vuser_init.c(448): Expire: Thu, 01 Jan 1970 00:00:00 GMT\r\n
vuser_init.c(448): Cache-Control: no-store\r\n
vuser_init.c(448): Content-Type: application/x-amf\r\n
vuser_init.c(448): Transfer-Encoding: chunked\r\n
vuser_init.c(448): Date: Fri, 09 Dec 2016 08:43:06 GMT\r\n
vuser_init.c(448): \r\n
vuser_init.c(448): t=55453ms: 5-byte chunked response overhead for "http://localhost:8080/oip.console/graniteamf/amf" (RelFrameId=1, Internal ID=17)
vuser_init.c(448): ac9\r\n
vuser_init.c(448): t=55453ms: 2-byte chunked response overhead for "http://localhost:8080/oip.console/graniteamf/amf" (RelFrameId=1, Internal ID=17)
vuser_init.c(448): \r\n
vuser_init.c(448): t=55454ms: 2761-byte chunked response body for "http://localhost:8080/oip.console/graniteamf/amf" (RelFrameId=1, Internal ID=17)
vuser_init.c(448): \x00\x03\x00\x00\x00\x08\x00\x0B/9/onResult\x00\x00\xFF\xFF\xFF\xFF\x11\n
vuser_init.c(448): \x81\x03Uflex.messaging.messages.AcknowledgeMessage\tbody\x11clientId\x1BcorrelationId\x17
vuser_init.c(448): destination\x0Fheaders\x13messageId\x15timeToLive\x13timestamp\x03\x06IB812C15C-5762-41C2-
vuser_init.c(448): A9A1-7DAD187BD9E2\x06IF1AEA9BB-2EE7-03DC-0075-E294286951F7\x01\n
vuser_init.c(448): \x0B\x01+org.granite.sessionId\x061GDXIy-M0sGyERoFFqFHcUw3K\x01\x06I9F677D20-FB11-49A8-B28
vuser_init.c(448): 9-893BCF521C93\x05\x00\x00\x00\x00\x00\x00\x00\x00\x05Bu\x8E,\x00\xB9`\x00\x00\x0C/10/onRe
vuser_init.c(448): sult\x00\x00\xFF\xFF\xFF\xFF\x11\n
vuser_init.c(448): \x81\x03Uflex.messaging.messages.AcknowledgeMessage\tbody\x11clientId\x1BcorrelationId\x17
vuser_init.c(448): destination\x0Fheaders\x13messageId\x15timeToLive\x13timestamp\x06\roip.74\x06I663DFE04-ED
vuser_init.c(448): 86-4101-B778-ABA7D4D2B640\x06I2828BD6C-4EE8-9ED1-E344-E29428A0F603\x01\n
vuser_init.c(448): \x0B\x01+org.granite.sessionId\x061GDXIy-M0sGyERoFFqFHcUw3K\x01\x06I975150E3-6553-4D81-9F6
vuser_init.c(448): D-7C7D3035FF1C\x05\x00\x00\x00\x00\x00\x00\x00\x00\x05Bu\x8E,\x00\xBC\x80\x00\x00\x0C/11/o
vuser_init.c(448): nResult\x00\x00\xFF\xFF\xFF\xFF\x11\n
vuser_init.c(448): \x81\x03Uflex.messaging.messages.AcknowledgeMessage\tbody\x11clientId\x1BcorrelationId\x17
vuser_init.c(448): destination\x0Fheaders\x13messageId\x15timeToLive\x13timestamp\x06\roip.76\x06I2EEF8674-AA
vuser_init.c(448): F2-4CB4-9CFF-308617ED7CF9\x06I1A498063-38A9-698B-F9BD-E29428B5B720\x01\n
vuser_init.c(448): \x0B\x01+org.granite.sessionId\x061GDXIy-M0sGyERoFFqFHcUw3K\x01\x06I3DD9D861-751E-447F-A21
vuser_init.c(448): 2-0E4CE330560B\x05\x00\x00\x00\x00\x00\x00\x00\x00\x05Bu\x8E,\x00\xBF\x90\x00\x00\x0C/12/o
vuser_init.c(448): nResult\x00\x00\xFF\xFF\xFF\xFF\x11\n
vuser_init.c(448): \x81\x03Uflex.messaging.messages.AcknowledgeMessage\tbody\x11clientId\x1BcorrelationId\x17
vuser_init.c(448): destination\x0Fheaders\x13messageId\x15timeToLive\x13timestamp\x06\roip.78\x06I5EF1DA04-ED
vuser_init.c(448): F0-4C70-A1B2-FA43401786E8\x06I6FD77F95-2D32-555D-5605-E29428C74EE8\x01\n
vuser_init.c(448): \x0B\x01+org.granite.sessionId\x061GDXIy-M0sGyERoFFqFHcUw3K\x01\x06I5DBE2AF5-F9CC-40B5-89E
vuser_init.c(448): 3-1FD99735F1AF\x05\x00\x00\x00\x00\x00\x00\x00\x00\x05Bu\x8E,\x00\xC2@\x00\x00\x0C/13/onRe
vuser_init.c(448): sult\x00\x00\xFF\xFF\xFF\xFF\x11\n
vuser_init.c(448): \x81\x03Uflex.messaging.messages.AcknowledgeMessage\tbody\x11clientId\x1BcorrelationId\x17
vuser_init.c(448): destination\x0Fheaders\x13messageId\x15timeToLive\x13timestamp\x06\roip.80\x06IE77F0159-01
vuser_init.c(448): 37-4D44-9117-9B10E8C7101D\x06IE8D5E009-4201-FE0D-78AC-E29428CB53AD\x01\n
vuser_init.c(448): \x0B\x01+org.granite.sessionId\x061GDXIy-M0sGyERoFFqFHcUw3K\x01\x06ID79496A4-CA29-4ADD-841
vuser_init.c(448): 9-4D0DFCF82548\x05\x00\x00\x00\x00\x00\x00\x00\x00\x05Bu\x8E,\x00
....
\xCB\xA0\x00
vuser_init.c(448): t=55458ms: 5-byte chunked response overhead for "http://localhost:8080/oip.console/graniteamf/amf" (RelFrameId=1, Internal ID=17)
vuser_init.c(448): 0\r\n
vuser_init.c(448): \r\n
vuser_init.c(448): t=55459ms: Request done "http://localhost:8080/oip.console/graniteamf/amf" [MsgId: MMSG-26000]
vuser_init.c(448): Notify: Saving Parameter "PubSubTopic = oip.74".
vuser_init.c(448): Notify: Saving Parameter "PubSubTopic_1 = oip.76".
vuser_init.c(448): Notify: Saving Parameter "PubSubTopic_2 = oip.78".
vuser_init.c(448): Notify: Saving Parameter "PubSubTopic_3 = oip.80".
So finally, the question is: anybody can explain why the regex is not detecting the string oip.82?
Help greatly appretiated.