开发者

How to use web.reg_save_param() Java Web Vuser function to capture the response?

开发者 https://www.devze.com 2022-12-27 05:53 出处:网络
I am usingweb.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 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号