NARESH KUMAR SHARMA
NARESH KUMAR SHARMA

Reputation: 1

Jmeter - how to return value in jmeter to HTTPS request

I was using JSR223 preprocessor and passing value to it's main request but value is not being return in that request.

How do I pass the value in the HTTPS request extracting from JSR223 preprocessor. In more I need to do parametrization. I am calling NodeJS code.

enter image description here

Upvotes: 0

Views: 344

Answers (1)

Dmitri T
Dmitri T

Reputation: 168002

You need to use vars shorthand for JMeterVariables class instance in order to save the generated encoded value into a JMeter Variable.

i.e. in the last line of your script do something like

vars.put('password', response)

and in the HTTP Request sampler's request body use something like:

"password":"${password}"

More information: Top 8 JMeter Java Classes You Should Be Using with Groovy

Upvotes: 1

Related Questions