groovycmdcommand-linejmeterpost-processor

set a variable in jmeter postprocessor and access in command prompt in NON GUI mode


Is there any way to set an environmet variable in JMeter and access outside in command prompt after finishing jmeter script in non gui mode?

I have a script which has name of person which is extracted from JSON Extractor and I want to display extracted name on command prompt


Solution

  • In JSR223 Sampler use OUT to print to console, for example for person variable

     OUT.println("variable person value=" + vars.get("person"))
    

    OUT - System.out - e.g. OUT.println("message")