JMX 到 k6 的转换:UnhandledPromiseRejectionWarning:错误:无法识别的元素:kg.apc.jmeter.threads.UltimateThreadGroup
Posted
技术标签:
【中文标题】JMX 到 k6 的转换:UnhandledPromiseRejectionWarning:错误:无法识别的元素:kg.apc.jmeter.threads.UltimateThreadGroup【英文标题】:JMX to k6 conversion : UnhandledPromiseRejectionWarning: Error: Unrecognized element: kg.apc.jmeter.threads.UltimateThreadGroup 【发布时间】:2019-10-09 15:47:27 【问题描述】:我正在使用 JMeter 到 k6 转换器 (jmeter-to-k6) 并尝试将 jmx 文件转换为 k6 脚本。当我执行以下命令进行转换时,出现以下错误并且转换停止。
命令
jmeter-to-k6 C:\Tests\test.jmx -o k6
错误
(node:23544) UnhandledPromiseRejectionWarning: Error: Unrecognized element: kg.apc.jmeter.threads.UltimateThreadGroup
at element (C:\Users\SFernando\AppData\Roaming\npm\node_modules\jmeter-to-k6\src\element.js:50:27)
at module.exports.args (C:\Users\SFernando\AppData\Roaming\npm\node_modules\jmeter-to-k6\src\element.js:1:102)
at elements (C:\Users\SFernando\AppData\Roaming\npm\node_modules\jmeter-to-k6\src\elements.js:17:43)
at module.exports.args (C:\Users\SFernando\AppData\Roaming\npm\node_modules\jmeter-to-k6\src\elements.js:1:102)
at Object.hashTree (C:\Users\SFernando\AppData\Roaming\npm\node_modules\jmeter-to-k6\src\element\hashTree.js:4:10)
at element (C:\Users\SFernando\AppData\Roaming\npm\node_modules\jmeter-to-k6\src\element.js:53:36)
at module.exports.args (C:\Users\SFernando\AppData\Roaming\npm\node_modules\jmeter-to-k6\src\element.js:1:102)
at elements (C:\Users\SFernando\AppData\Roaming\npm\node_modules\jmeter-to-k6\src\elements.js:17:43)
at module.exports.args (C:\Users\SFernando\AppData\Roaming\npm\node_modules\jmeter-to-k6\src\elements.js:1:102)
at Object.TestPlan (C:\Users\SFernando\AppData\Roaming\npm\node_modules\jmeter-to-k6\src\element\TestPlan.js:14:17)
(node:23544) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:23544) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
【问题讨论】:
【参考方案1】:终极线程组不在工具的list of supported JMeter components中
您可以在 github 项目中打开一个问题以添加此类支持
【讨论】:
以上是关于JMX 到 k6 的转换:UnhandledPromiseRejectionWarning:错误:无法识别的元素:kg.apc.jmeter.threads.UltimateThreadGroup的主要内容,如果未能解决你的问题,请参考以下文章
如何将管道中的版本号添加到 K6-InfluxDB-Grafana 堆栈中,以便在 grafana 中我们也可以根据版本号过滤结果