运行 中的 ConversionException 一个 Jmeter jmx 文件,在 Intellij maven 中带有终极线程组

ConversionException in running a Jmeter jmx file with Ultimate thread group in Intellij maven

在运行intellij maven中的Ultimate thread group jmx中面临以下问题(请注意,对于普通线程组jmx文件,没有问题。并且在pom文件中还添加了所需的依赖项,这我相信是 ctg(自定义线程组)之一)。我单独执行 jmx 时收到此错误 -

缺少 class 转换异常: 所需类型的 ListedHashTree 转换器类型-ScriptWrapperConverter

现在需要更改什么才能使其在 intellij 中可执行。我正在使用 mvn 命令来触发 jmx

我认为您需要将以下依赖项添加到您的项目类路径中:

jmeter-plugins-casutg

类似于:

<dependency>
    <groupId>kg.apc</groupId>
    <artifactId>jmeter-plugins-casutg</artifactId>
    <version>2.10</version>
</dependency>

您可能会在 Five Ways To Launch a JMeter Test without Using the JMeter GUI article and jmeter-from-code 存储库中找到一些示例。

我找到了解决办法。除了将其添加到依赖项之外,

您还需要将其添加到 pom.xml

中的 jmeter 扩展中
                <jmeterExtensions>
                    <artifact>kg.apc:jmeter-plugins-casutg:2.8</artifact>
                </jmeterExtensions>

在 pom.xml

中进行此更改后,我的脚本开始 运行