Jmeter BSF Sampler JavaScript Debugging

Is there a good way to debug my BSF Sampler written in JavaScript using Jmeter? For example, console.log () is often used in a browser. Is there a way like this where I can see the output in Jmeter?

+6
source share
3 answers

JavaScript can use the logger from JMeter and its log levels, for example. debug, info

to try:

log.info("Hello World!"); 
+10
source

for this you can use the print() command. It will be recorded to the Jmeter console.

+1
source

You can put calls on OUT.println in your javascripts in BSF Sampler, BSF PreProcessor, BSF PostProcessor. This will write the lines to the jmeter console window. For instance:

 OUT.println("hello world"); 
0
source

Source: https://habr.com/ru/post/899720/


All Articles