Converting BodyBinary to Readable Format

Hi All, I have a recording where the web request body is BodyBinary. As described in the help file, the BodyBinary is an ASCII representation of the binary data passed across the network, where non-printable characters are represented as HEX. So that means, it is possible to reverse engineer what text the binary data represents. For the application under test, the data being passed across the network is simply clear text but compressed (via java Deflater/OutputStream) that is why LoadRunner captures it as binary data. I have tried to inflate the data, that is, convert the BodyBinary text to its byte representation (ASCII to byte or HEX to byte), then decompressed using java Inflate class, but the decompression works. Can anyone tell me I have the right/wrong idea and if this is possible or give some suggestions?



  • Some additional info:


    I made a recording in fiddler and the request data (HEX) did not perfectly match the BodyBinary when converted to from ASCII to HEX. Anyone knows why this is the case?

  • Hello,


    You wrote "LoadRunner captures it as binary data" and "the request data (HEX) did not perfectly match the BodyBinary when converted to from ASCII to HEX."


    I assume you are using the Data Format Extensions feature?

    Could you post the relevant step, and a sample of the data as converted by fiddler?



  • No, I'm not using DFE, just the data in the BodyBinary.


    After some more investigation, I found that the BodyBinary when inflated/decompressed, contains an extract character/byte compared to the inflated/decompressed data from Fiddler. I have traced the data to be an extrac backslash. It appears that a single backslash character is represented by two backslash characters. After making adjustments to my BodyBinary decompression code, I'm now able to view the inflated/decompressed and correct bytes/text.


    Next question:


    Are there DFE's for deflate/zlib compression/decompression? Can I write a DFE in Java? Seems to be available only in C. Can anyone point me to good references/tutorials for writing a custom DFE?



  • The LoadRunner Data Format Extensions Developer Guide can be found here:

    Start > All Programs > HP Software > HP LoadRunner > Documentation > Data Format Extensions Developer Guide


    Currently, we do not support DFEs written in Java out of the box.


    For using zlib, you can try the following (in this case, for decompression):

    1. Copy zlib.h and zconf.h into the LoadRunner include directory.

    2. Add an #include "zlib.h" statement to the relevant Action file.

    3. Call lr_load_dll("zlib.dll"); within your Action file to have access to zlip functions.

    4. Allocate enough memory for the resulting buffer, for example:

    Byte * unzipped = (Byte*)calloc((uInt)4096, 1);
    unsigned long unzipped_len = 4096;

    5. Call lr_eval_string_ext in order to save the compressed value to a buffer:

    lr_eval_string_ext(param_name, param_name_length, &content, &prmLen, 0, 0, -1);

    6. Call zlip uncompress function:

    rc = uncompress(unzipped, &unzipped_len, (const Bytef*)content,prmLen); 


    For further assistance please contact our support system.



  • Hi Raymond


    I have the same problem. After recording an application I'm seeing a lot of BodyBinary data that contains hex values. I can see that you've somehow managed to convert the data into text but I don't understand how you did it.

    It says you "inflated/decompressed" the bodybinary. What does this mean and how did you do that?


    I tried adding jars to the classpath for recording but it seems to just give me "// couldn't decode request from body, couldn't decode response from body"




  • Hi I tried all possible ways to convert the Binary body in readable format. I am using LR 12.60 version and using web HTTP/HTML protocol. Can someone help me how to convert the Binary body please 

  • Hi,

    What type of application do you test? Do you know what type of binary content it is?

    Did you read about LoadRunner Data Format Extension? It allows you to inject your own plugin in the script code generation (a result of the recording) and as part of the replay of the script to convert data from one format to a readable text format.