1

I have several JMeter variables that are read in from User-Defined Properties, read from a CSV, or extracted from an HTTP response.

I need to be able to output the variables in a log file, and want to include them in the jmeter.log for now. I know how to use the Debug Sampler to view them in the JMeter UI, but it does not seem that they are being saved to jmeter.log.

Is it possible to configure JMeter to log the output of the Debug Sampler in jmeter.log, and if so, how?

1 Answer 1

1

The easiest way is using an appropriate JSR223 Test Element and simple Groovy script like:

vars.entrySet().each { var -> log.info(var.key + '=' + var.value) }

Demo:

enter image description here

Where:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.