JMeterMaven插件:如何在执行mvn验证时下载jmeter testplan所需的插件

JMeterMaven插件:如何在执行mvn验证时下载jmeter testplan所需的插件,jmeter,jmeter-maven-plugin,Jmeter,Jmeter Maven Plugin,运行时,我在测试计划中使用非默认线程组/插件 mvn清洁验证 maven生成一个错误 missing class com.thoughtworks.xstream.converters.ConversionException: [INFO] ---- Debugging information ---- [INFO] cause-exception : com.thoughtworks.xstream.converters.ConversionException 然而,在maven命令

运行时,我在测试计划中使用非默认线程组/插件
mvn清洁验证
maven生成一个错误

missing class com.thoughtworks.xstream.converters.ConversionException:
[INFO] ---- Debugging information ----
[INFO] cause-exception     : com.thoughtworks.xstream.converters.ConversionException
然而,在maven命令行控制台中,我看到download dependency=true

target\jmeter\lib\ext with downloadExtensionDependencies set to true ...
target\jmeter\lib\junit with downloadLibraryDependencies set to true
target\jmeter\lib with downloadLibraryDependencies set to true ...
这是我的pom.xml

<build>
        <plugins>
            <plugin>
                <groupId>com.lazerycode.jmeter</groupId>
                <artifactId>jmeter-maven-plugin</artifactId>
                <version>${jmeter.maven.plugin.version}</version>
                <configuration>
                    <testFilesIncluded>
                        <jMeterTestFile>google.jmx</jMeterTestFile>
                    </testFilesIncluded>
                </configuration>
                <executions>
                    <execution>
                        <id>jmeter-tests</id>
                        <goals>
                            <goal>jmeter</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>jmeter-check-results</id>
                        <goals>
                            <goal>results</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

com.lazerycode.jmeter
jmetermaven插件
${jmeter.maven.plugin.version}
google.jmx
jmeter测试
性能测试
jmeter检查结果
结果
问题:

  • 为了让jmeter maven插件下载所需的插件,我应该在插件中添加什么? (通常我们使用jmeter插件管理器在UI上下载)
  • 如果您的测试依赖于,您需要在
    pom.xml
    中添加几行代码,以便告诉JMeter Maven插件下载并安装此插件,您的配置应该如下所示:

    <build>
        <plugins>
            <plugin>
                <groupId>com.lazerycode.jmeter</groupId>
                <artifactId>jmeter-maven-plugin</artifactId>
                <version>${jmeter.maven.plugin.version}</version>
                <configuration>
                    <jmeterExtensions>
                        <artifact>kg.apc:jmeter-plugins-casutg:2.5</artifact>
                    </jmeterExtensions>
                    <testFilesIncluded>
                        <jMeterTestFile>google.jmx</jMeterTestFile>
                    </testFilesIncluded>
                </configuration>
                <executions>
                    <execution>
                        <id>jmeter-tests</id>
                        <goals>
                            <goal>jmeter</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>jmeter-check-results</id>
                        <goals>
                            <goal>results</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    
    
    com.lazerycode.jmeter
    
    

  • 我仍然不知道在TestPlanLibrary、jmeterExtensions或JUnitLibrary中应该在哪里使用插件?中的所有库都是testPlanLibraries?其中一些在jmeter-plugins.org中没有maven工件名称