请有人帮我在Jmeter中使用jsr223预处理器和一些examples进行脚本编写.
Someone please help me how to do scripting using jsr223 preprocessor in Jmeter with some examples.
任何获得相同tutorial的最佳网站.
Any best site to get tutorial for the same.
预先感谢
SIJO
推荐答案例如:
将JSR223预处理器添加为HTTP请求的子代,并将以下行放入脚本"区域:
Add JSR223 PreProcessor as a child of the HTTP Request and put the following line into "Script" area: sampler.setDomain("example");
因此,PreProcessors的目的是在请求之前做 ,以便使系统为请求或更改请求做好准备(例如,您具有要发送的动态参数数量或动态文件数量)与请求,并且不想对其进行硬编码).
So the purpose of PreProcessors is do something before request in order to make the system prepared for the request or change request somehow (for instance you have dynamic number of parameters or dynamic number of files to send with the request and don't want to hardcode it).
在上面的示例中,sampler代表 HTTPSamplerProxy ,有关可用方法和字段,请参见JavaDoc.另请查看 Beanshell vs JSR223 vs Java JMeter脚本:关于性能的问题,您一直在等待!指南,以获取有关groovy引擎安装和脚本最佳实践的详细信息.
In above example sampler stands for HTTPSamplerProxy, see JavaDoc for available methods and fields. Also check out Beanshell vs JSR223 vs Java JMeter Scripting: The Performance-Off You've Been Waiting For! guide for details on groovy engine installation and scripting best practices.
更多推荐
如何在jmeter中使用jsr 223预处理程序?
发布评论