LoadRunner - JAVA over HTTP - Requests/responses in separate external .xml files
I am working on recording a java based client application. I am using the Java over HTTP protocol. One of my issues (code below) is that the requests/responses are not in my recorded scripts, but rather are in .xml files in the script's directory. If this data is externally written, how can I validate the data returned in my scripts? There must be a way to access this information so I can know if the script passed or failed. Is there an option to include this data directly in the scripts instead of creating .xml files? And if not, how can I make use of these files?
I'd appreciate any assistance on this matter...
////////////////////// requestBody0.xml //////////////////////
WebRequest WebRequest0 = (WebRequest) JavaHTTP.readObject(WebRequestBA0);
WebResponse WebResponse_String0 = (WebResponse) JavaHTTP.sendSerialized(WebRequest0, 0,
LAST});// 0 is the number of the header file, record time response is at file responseBody0.xml
_webresult = lrapi.web.add_header("Request-Id",
Re: LoadRunner - JAVA over HTTP - Requests/responses in separate external .xml files
There is no other way to generate a script with Java over http protocol and that is how the script will be created, in regards to validate and look the information of request and responses what you may do is:
Viewing Requests and Responses in XML Format
For each request and response, you can view the corresponding XML that representsthe binary java
object during the recording phase.
To view requests and responses in XML format:
- Locate the target request or response section in the code. Right-click the commented
RequestBodyX.xml or ResponseBodyX.xml.
Select View XML. The XML is displayed in a separate window
That was taken from the LoadRunner user guide page 575