Handling binary data in the request...

319 views
Skip to first unread message

needi...@gmail.com

unread,
Sep 23, 2014, 11:54:18 PM9/23/14
to LR-Loa...@googlegroups.com
Hello,

Can someone please help me on how to handle the binary data in the request body for parametrization (and/or correlation) purposes. Below is the request. Handling the compression setting from server side is not possible for me due to various constraints. So I am trying to figure out a way to handle this from VuGen side. What is the binary format (ex:base 64, Hex etc...) of this body request when using octet-stream? Once we know the binary data format, can we convert this binary format to plain text for parameterizing and then convert back to whatever the original format? If that is not possible, what else could I try to make this work?

web_custom_request("Testing1",
        "URL=http://xxxxxxxxxxxxxxx",
        "Method=POST",
        "Resource=0",
        "RecContentType=application/octet-stream",
        "Referer=",
        "Snapshot=t11.inf",
        "Mode=HTML",
        "EncType=application/octet-stream",        
        "BodyBinary=\\xAC\\xED\\x00\\x05sr\\x00@............................................

James Pulley

unread,
Sep 24, 2014, 9:15:03 AM9/24/14
to LR-Loa...@googlegroups.com
You will likely need to speak with the site/application developers to understand the format of the bodybinary section in order to understand which data format extension path to take for decode and re-encode.

needi...@gmail.com

unread,
Sep 24, 2014, 11:37:44 PM9/24/14
to LR-Loa...@googlegroups.com
Thanks, James. That is what I am also thinking. I don't have access to developers as I am working on a packaged product. There is no inhouse dev team. If the request is using 'octet stream', the binary format should be the same across any app that is using 'Octet stream'. If you (or someone on this forum) know what's this binary format is, please let me know. Thanks.

James Pulley

unread,
Sep 25, 2014, 9:20:08 AM9/25/14
to LR-Loa...@googlegroups.com
Octet-Stream is simply the MIME type from the download header and is meant to denote any binary file type, which could be a zip, an executable, a base64 encoded file, etc...   You may want to look at the response header associated with the download to see if it includes additional information on the encoding type.   There is an example located on the wikipedia page for MIME which shows the additional notation for the encoding type, which may or may not be present

http://en.wikipedia.org/wiki/MIME

Additionally, I took a quick look at the wiki page for file signatures to see if something jumped out for the AC ED 00 ... signature, but nothing did


Taking a look at another source, http://www.garykessler.net/library/file_sigs.html , seems to point to the existence of a Java Serialization Object.   The example at the bottom of the page for the linked reference, http://docs.oracle.com/javase/1.5.0/docs/guide/serialization/spec/protocol.html#10258 , looks surprisingly similar to the fragment header that you have provided.  If so then you should be able to deconstruct the object, pull out what you need or replace items if need be to head back.  Yes, this will be a programming exercise.

 "BodyBinary=\\xAC\\xED\\x00\\x05sr\\x00@............................................

(example from ORACLE Website)

 00: ac ed 00 05 73 72 00 04 4c 69 73 74 69 c8 8a 15 >....sr..Listi...<
 10: 40 16 ae 68 02 00 02 49 00 05 76 61 6c 75 65 4c >Z......I..valueL<
 20: 00 04 6e 65 78 74 74 00 06 4c 4c 69 73 74 3b 78 >..nextt..LList;x<
 30: 70 00 00 00 11 73 71 00 7e 00 00 00 00 00 13 70 >p....sq.~......p<
 40: 71 00 7e 00 03                                  >q.~..<

"Be Curious, always ...."

James Pulley
http://www.litesquare.com - A new bargain in performance engineering: You only pay us when we provide a measurable improvement
http://www.perfbytes.com - The podcast for performance engineering and test
http://www.loadrunnerbythehour - Onshore, effective - LoadRunner services beginning at 19.95 USD

Rohit Sethiya

unread,
Sep 26, 2014, 10:37:01 AM9/26/14
to LR-Loa...@googlegroups.com
Try to USE DFE body extensions in loadrunner DFE configuration recording settings

--
You received this message because you are subscribed to the Google Groups "LoadRunner" group.
To unsubscribe from this group and stop receiving emails from it, send an email to LR-LoadRunne...@googlegroups.com.
To post to this group, send email to LR-Loa...@googlegroups.com.
Visit this group at http://groups.google.com/group/LR-LoadRunner.
For more options, visit https://groups.google.com/d/optout.

needi...@gmail.com

unread,
Sep 27, 2014, 9:19:19 PM9/27/14
to LR-Loa...@googlegroups.com
Thanks, James. This information really helps me a lot. Thanks again for your research on this. I hope HP will come up with a solution for handling this issue in their future version.

James Pulley

unread,
Sep 28, 2014, 12:08:30 PM9/28/14
to LR-Loa...@googlegroups.com
You cannot rely upon the tool vendor to handle all possible contingencies that you may encounter in the field.   This is why most performance test tools have available to you a general programming model to handle custom integration.  If you rely upon a vendor, any vendor, to provide 100% of the solution set then you will wind up being very disappointed.

Arun

unread,
Sep 29, 2014, 11:20:19 AM9/29/14
to LR-Loa...@googlegroups.com
If the number of running Vusers are within reach of the available infrastructure(LG) capacity, you should evaluate workarounds like -Ajax True Client. In True Client all the correlations etc. handled @ application layer..
Reply all
Reply to author
Forward
0 new messages