How to save RESPONSE CODE IN VARIABLE and use it in other sampler for assertion using JSR223 Listener

Viewed 2143

I wanted to save the response code of one sampler in a variable and wanted to use the variable for response assertion in other sampler using JSR223 Listener How can I do this?

I have defined variable vars.put("server",prev.getResponseCode()) and tried to use it in other sampler ,however I am getting response is null

1 Answers
Related