简体   繁体   中英

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.

在此处输入图片说明

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

ie 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM