{"header":{"type":"auto_translation","ret_code":"error","time_cost":232.0,"request_id":"ab3fc349599611ed9ba95b34174e380d"},"message":"Translation error (20001), please retry later. Detail: RuntimeException - The length of source sentence is too long!!! - {\n "header": {\n "time_cost": 0.000474,\n "type": "auto_translation",\n "ret_code": "The length of source sentence is too long!!!"\n }\n}"}
1条答案
按热度按时间goucqfw61#
如果您查看JSR223采样器文档,您将看到:
JSR223测试元素有一个功能(编译),可以显著提高性能。要从该功能中获益,请执行以下操作:
使用此功能时,请确保脚本代码不直接在脚本代码中使用JMeter变量或JMeter函数调用,因为缓存只会缓存第一个替换。请改用脚本参数。
因此,如果
counter
是JMeter Variable,它将始终是初始值,并且不会在后续迭代中递增。因此,您需要将该行更改为:
有关JMeter中的Groovy脚本的更多信息:Apache Groovy - Why and How You Should Use It