Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jmeter BSF Sampler JavaScript debugging

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

like image 578
amaurer Avatar asked Oct 20 '11 17:10

amaurer


2 Answers

JavaScript can use the logger from JMeter and its log levels e.g. debug, info

try:

log.info("Hello World!");
like image 135
mbde Avatar answered Oct 11 '22 12:10

mbde


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

like image 43
BlackGaff Avatar answered Oct 11 '22 12:10

BlackGaff