[英]Jmeter BSF Sampler JavaScript debugging
Is there a good way to debug my BSF Sampler written in JavaScript using Jmeter? 有没有一种很好的方法来调试使用Jmeter用JavaScript编写的BSF采样器? For instance, using console.log() in the browser is often used. 例如,经常使用浏览器中的console.log()。 Is there a method like that where I can see the output in Jmeter? 有没有像我这样可以在Jmeter中看到输出的方法?
JavaScript can use the logger from JMeter and its log levels eg debug, info JavaScript可以使用JMeter的记录器及其日志级别,例如debug,info
try: 尝试:
log.info("Hello World!");
you can use the print()
command for this. 你可以使用print()
命令。 It will write to the Jmeter console. 它将写入Jmeter控制台。
You can place calls to OUT.println to your javascripts in the BSF Sampler, BSF PreProcessor, BSF PostProcessor. 您可以将调用OUT.println发送到BSF采样器,BSF预处理器,BSF PostProcessor中的javascripts。 This will write lines to the jmeter console window. 这会将行写入jmeter控制台窗口。 For example: 例如:
OUT.println("hello world");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.