Message is not printing on the console in jmeter using JSR223 and groovy

旧街凉风 提交于 2019-11-30 17:42:18

Don't use System.out.println in a Groovy or Beanshell step in jmeter. Instead , do this:

1. Enable the stdout console in Jmeter so that you can see the output.
2. Use  log.info("Message:" + vars.get("variableName"));  instead.

Use below to display text in JMeter Response Tab in "Results Tree":

SampleResult.setResponseData("Document: " + variable,"UTF-8");

Use below to log in the console text area of JMeter:

log.info("hello");

Chapter "2. OUT" shows the answer:

https://jmetervn.com/2016/12/05/jsr223-with-groovy-variables-part-1/

use the OUT command.

OUT.println("INPUT MESSAGE HERE");

Try it: System.out.println("testing")

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!