0

I use non default thread group/plugins in test plan, when running mvn clean verify maven generate an error

missing class com.thoughtworks.xstream.converters.ConversionException:
[INFO] ---- Debugging information ----
[INFO] cause-exception     : com.thoughtworks.xstream.converters.ConversionException

However in maven command line console i saw that 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 ...

This is my 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>

Question:

  1. What should i put in the so that jmeter-maven-plugin will download required plugin? (usually we use jmeter plugin manager to download on the UI)
J. Doem
  • 619
  • 7
  • 21

1 Answers1

1

If your test relies on Custom Thread Groups you will need to add few lines to your pom.xml in order to tell JMeter Maven Plugin to download and install this plugin, your configuration should look something like:

<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>

More information:

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • I'm still confused where we should use plugin in testPlanLibraries, jmeterExtensions or junitLibraries? All library in https://jmeter-plugins.org/ is a testPlanLibraries? Some of those do not have maven artifact name in jmeter-plugins.org – J. Doem Feb 04 '18 at 01:35