How to use web.reg_save_param() Java Web Vuser function to capture the response?
I am using web.custom_request() Java Web Vuser function to send a request t开发者_C百科o server. Now I want to know how can I capture the response in my Vuser script?
I am not able to successfully do it using web.reg_save_param() Java Web Vuser function.
Any pointers are appreciated.
Thank you Chaitanya
I got it myself.
I used the following piece of code:
web.reg_save_param("Response",new String []{"LB=","RB=","LAST"});
...
...
...
String response = lr.eval_string("<Response>");
I don't see the point of your second statement: "String response = lr.eval_string("");"
The parameter is already stored as a string. You can use lr.eval_string to use it anywhere down the line.
精彩评论