Load Runner web_custom_request - data handling.

1,382 views
Skip to first unread message

Nishanth

unread,
Mar 15, 2010, 6:21:15 AM3/15/10
to LoadRunner
Hello,

This is Nishu here.
I was recording a Load Runner script using HTTP/HTML protcol and i am
getting majorly Web_custom_requests.

When i re-run the script the data which i used while recording is not
being changed on the Application when i check Manually. But the script
is passing for n number of iterations.

And also can anyone please let me know how to verify the exact data
which i used while recording, in my web_custom_request.

Below is the request:

Actually here i am selecting a new value from the dropdown (i.e.,
changing the value from Check(default value) to Deposit)

web_custom_request("xxxxx.dwr",
"URL=https://{MCIP}:{MCPORT}/pathname.dwr",
"Method=POST",
"TargetFrame=",
"Resource=0",
"RecContentType=text/javascript",
"Referer=https://{MCIP}:{MCPORT}/pathname.default.do?
itemAccountId=11488884&itemId=10013075",
"Snapshot=t39.inf",
"Mode=HTML",
"EncType=text/plain",
"Body=callCount=1\npage=/moneycenter/accountDetails.default.do?
itemAccountId=11488884&itemId=10013075\nhttpSessionId=xxxxx
\nscriptSessionId=xxxxxxxxx\nc0-scriptName=TxnService\nc0-
methodName=categorizeTransaction\nc0-id=0\nc0-e1=number:99\nc0-
e2=string:94AAC319-CF5E-4733-AA42-CA88C79C656D\nc0-e3=null:null\nc0-
e5=string:USD\nc0-e6=string:MM%2Fdd%2Fyyyy\nc0-e7=string:PST\nc0-
e8=string:.\nc0-e9=string:%2C\nc0-e10=string:%23%23%23%2C
%23%230.%23%23\n"
"c0-e4=Object_Object:{currencyCode:reference:c0-e5,
dateFormat:reference:c0-e6, timeZone:reference:c0-e7,
decimalSeparator:reference:c0-e8, groupingSeparator:reference:c0-e9,
groupPattern:reference:c0-e10}\nc0-e11=number:3\nc0-e12=boolean:false
\nc0-param0=Object_Object:{cobrandId:reference:c0-e1,
applicationId:reference:c0-e2, csit:reference:c0-e3,
iBean:reference:c0-e4, loggingLevel:reference:c0-e11,
loggingEnabled:reference:c0-e12}\nc0-param1=Number:30707074\nc0-
param2=string:bank\nc0-param3="
"string:27%7C3\nc0-param4=string:\nc0-param5=string:
\nbatchId=18\n",
LAST);

Krishnakanth PPS

unread,
Mar 15, 2010, 2:55:43 PM3/15/10
to lr-loa...@googlegroups.com
Its probably working because you may not be having web_reg_finds.

And you have not correlated things like itemID, number and probably you may have to correlate or parameterise some or all of the e1,e2...e11.

try creating 2 scripts with same flow , enable full logging for both scripts and compare logs of each script transaction by transaction.

This way you would know whats going to server and whats coming back.


--
You received this message because you are subscribed to the Google "LoadRunner" group.
To post to this group, send email to LR-Loa...@googlegroups.com
To unsubscribe from this group, send email to
LR-LoadRunne...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/LR-LoadRunner?hl=en

Floris Kraak

unread,
Mar 16, 2010, 4:29:39 AM3/16/10
to lr-loa...@googlegroups.com
On Mon, Mar 15, 2010 at 11:21 AM, Nishanth <nish...@gmail.com> wrote:
>
> When i re-run the script the data which i used while recording is not
> being changed on the Application when i check Manually. But the script
> is passing for n number of iterations.
>

Is this unexpected behaviour, or expected?
If it isn't expected behaviour, what do you expect instead?


> And also can anyone please let me know how to verify the exact data
> which i used while recording, in my web_custom_request.
>

Read the request yourself. It's not hard to find your data.
Look for name value pairs - field=value.
I see a bunch of them just from glancing at your code, surely you can
find them too.


Interesting request by the way. "groupingSeparator=reference:c0-e9"
seems to be referring to "c0-e9=string:%2C\n" further up for instance.
So we're dealing with double indirection: The grouping separator is
%2C (which is the URL encoding for the comma ',' character) but you
can only figure that out if you follow the jumps properly.

Good luck with this one, it may be a bit of a puzzle to figure it out
but it's definitely possible.

Regards,
Floris
---
'What does it mean to say that one is 48% slower? That's like saying
that a squirrel is 48% juicier than an orange - maybe it's true, but
anybody who puts the two in a blender to compare them is kind of
sick.'
--- Linus Torvalds

Nishu BG

unread,
Mar 19, 2010, 3:34:28 PM3/19/10
to lr-loa...@googlegroups.com
Hello,
 
Thanks a lot for your reply.
 
Floris,
 
What i am facing presently is an Unexpected behaviour.
I mean, After i run the Script and then check manually - the app should show the values as recroded in the script Right?
But here in my case its not showing so.
 
> Interesting request by the way. "groupingSeparator=reference:c0-e9"
   seems to be referring to "c0-e9=string:%2C\n" further up for instance.
   So we're dealing with double indirection: The grouping separator is
   %2C (which is the URL encoding for the comma ',' character) but you
   can only figure that out if you follow the jumps properly.
 
Can you Kindly explain the above lines. It would be very helpful.
 
Cheers,
Nish.



 
--

Floris Kraak

unread,
Mar 20, 2010, 5:46:24 PM3/20/10
to lr-loa...@googlegroups.com
On Fri, Mar 19, 2010 at 8:34 PM, Nishu BG <nish...@gmail.com> wrote:
>
> Floris,
>
> What i am facing presently is an Unexpected behaviour.
> I mean, After i run the Script and then check manually - the app should show
> the values as recroded in the script Right?
> But here in my case its not showing so.

No. Not unless you correlate things properly. Just recording something
and then pressing 'play' is pretty much guaranteed to fail 99% of the
time.

>
> Can you Kindly explain the above lines. It would be very helpful.
>

Not right now, sorry. Considering the fever I'm running I shouldn't
even be reading email at all ;-)
Good luck I guess.

Krishnakanth PPS

unread,
Mar 20, 2010, 6:29:11 PM3/20/10
to lr-loa...@googlegroups.com
Nishanth

In order to understand what Floris said, follow the fundamental method that is used to identify correlated values.

record 2 scripts of same flow
enable to logging to full, dont enable last check box of the 3.
run both scripts
compare the requests that being sent and requests that are being received. 
it would help you understand how the LR and also the application is sending the data to the server and getting info back from the server.

What floris says is look at the pattern here and understand how that is happening for your app

Body=callCount=1\npage=/moneycenter/accountDetails.default.do?
itemAccountId=11488884&
itemId=10013075\n
httpSessionId=xxxxx\n
scriptSessionId=xxxxxxxxx\n
c0-scriptName=TxnService\n
c0-methodName=categorizeTransaction\n
c0-id=0\n
c0-e1=number:99\n
c0-e2=string:94AAC319-CF5E-4733-AA42-CA88C79C656D\n
c0-e3=null:null\n
c0-e5=string:USD\n
c0-e6=string:MM%2Fdd%2Fyyyy\n
c0-e7=string:PST\n
c0-e8=string:.\n
c0-e9=string:%2C\n
c0-e10=string:%23%23%23%2C%23%230.%23%23\n
c0-e4=Object_Object:{currencyCode:reference:c0-e5,
dateFormat:reference:c0-e6, timeZone:reference:c0-e7,
decimalSeparator:reference:c0-e8, groupingSeparator:reference:c0-e9,
groupPattern:reference:c0-e10}\n
c0-e11=number:3\n
c0-e12=boolean:false\n
c0-param0=Object_Object:{cobrandId:reference:c0-e1,applicationId:reference:c0-e2, csit:reference:c0-e3,iBean:reference:c0-e4, loggingLevel:reference:c0-e11,
loggingEnabled:reference:c0-e12}\n
c0-param1=Number:30707074\n
c0-param2=string:bank\n
c0-param3=string:27%7C3\n
c0-param4=string:\n
c0-param5=string:\n
batchId=18\n

Look at the number of things you might need to correlate and parameterize. 

hope that helps.
KK

--
You received this message because you are subscribed to the Google "LoadRunner" group.
To post to this group, send email to LR-Loa...@googlegroups.com
To unsubscribe from this group, send email to
LR-LoadRunne...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/LR-LoadRunner?hl=en

To unsubscribe from this group, send email to LR-LoadRunner+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

mahendra kota

unread,
Mar 22, 2014, 4:15:24 AM3/22/14
to LR-Loa...@googlegroups.com

Hi Nishath 

Go through this URL.You can find how to build a custom body.

http://www.jds.net.au/tech-tips/vugen-dynamic-post-body/


Thank You,
Mahendra. 

James Pulley

unread,
Mar 23, 2014, 1:10:34 PM3/23/14
to LR-Loa...@googlegroups.com
There are several foundations to this answer.  (1) is a test process issue, (2) is a tool process issue, (3) is an architecture|development issue

(1) As Noted By Krishna and Floris, unless you are checking for expected results you really have no idea whether your script is operating successfully or not.  The assumption is if you receive and HTTP 2xx or 3xx class response that the script is operating successfully.  If you are not checking, you are not testing, because you have no measurement of success for the step.    This would also imply that you likely have not had an opportunity to branch the code to handle unexpected results.

(2) On the tool front, unless you are a very mature user of the tool and have a high degree of intimacy with the application, then it is rare that one recording is sufficient to capture all possible dynamic sequences.   This is a tool agnostic issue, impacting JMETER as much as LoadRunner.   You may want to take an listen to this podcast for insight on how to capture different layers of dynamic data information for handling in your application, http://www.perfbytes.com/dynamic-data-correlation

(3) On the architectural | Development front, there is a high likely reason why you could replay for a period and then have your script stop working.   It has been alluded to in a number of questions here of late, but a session has a defined life to it, especially once you start throwing questionable data at the server associated with a previously recorded session.    Your session will likely be in the process of timing out when you go through the first couple of replays and since your requests are out of context to keep the current session alive by the time you get a little bit further down the road you will find that your script no longer runs at all because it fails at the first instance of the session nonce/token/key submission in your code

Given the above there are several areas you likely want to improve from a skills, knowledge perspective

(1) Foundation skills, Developmement and Architecture.   This is a part of that tool independent 85-95% of skills you need to have in place for success independent of tool.    Concentration here will pay dividends for decades to come
(2) Foundation skills, test.   With an assumption that you are not checking for expected results and branching your code to handle unexpected results, this would expose a weakness in testing foundations.    This will dramatically hamper your abilities in test design and execution.  You will probably want to pair yourself with someone with refined testing skills as a mentor while you brush up on testing fundamentals.  Skip over software test and go right to the core of the scientific method which is independent of what you are testing
(3) Process items.   This multi-recording to uncover dynamic items is covered in HP LoadRunner training as well.    Go back to your core on your tool process usage.    Pull your training manuals and go through the sections on correlation.   IN the latest versions of the training about a 1/3 of the class is devoted to this topic, plus an appendix    This is a core tool skill.  If you are reliant upon auto correlation with weak manual correlation skills then it is an axiom that this autocorrelation will fail you in your use and you will lack the skills to tune the recommended correlation statement for success.  

'Pulley

http://www.loadrunnerbythehour.com/PricingMatrix - Effective, onshore LoadRunner services beginning at 19.95 per hour USD

http://www.perfbytes.com - Co hosted with Mark Tomlinson, this biweekly podcast on performance testing and performance engineering topics, the majority of which are tool agnostic in nature.
Reply all
Reply to author
Forward
0 new messages