0
votes

I have a question about the printing that I perform in Jmeter, I use System.out.println and the consul is full with data. the problem is that if I want in each iteration to clear the consul how can I do it? the consul is full with data from last run, or Prev thread and I just want to clear it. regards (it is the black consul that opened in a new window.)enter image description here

2

2 Answers

0
votes

You should log messages using log.info("Hello World"); (log is a script global variable) instead of using OUT in your scripts. Therefore, the logs will be sent to jmeter.log file.

See the documentation about JSR223 Sampler for more information.

0
votes

For Windows you can use something like:

new ProcessBuilder('cmd', '/c', 'cls').inheritIO().start().waitFor()

For other operating system it will depend on SHELL implementation, you will need to amend the command line according to your requirements, most likely using clear command.

References: