1
votes

I am getting and error while running jmeter testscript via mvn .

Here is my pom.xml

<build>
    <plugins>
        <plugin>
            <groupId>com.lazerycode.jmeter</groupId>
            <artifactId>jmeter-maven-plugin</artifactId>
            <version>2.2.0</version>
            <executions>
                <execution>
                    <id>jmeter-tests</id>
                    <phase>verify</phase>
                    <goals>
                        <goal>jmeter</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <jmeterExtensions>
                    <artifact>kg.apc:jmeter-plugins:pom:1.3.1</artifact>
                </jmeterExtensions>
                <jmeterExtensions>
                    <artifact>kg.apc:jmeter-plugins-manager:jar:0.10</artifact>
                </jmeterExtensions>
                <jmeterExtensions>
                    <artifact>kg.apc:jmeter-plugins-json:jar:2.3</artifact>
                </jmeterExtensions>
                <junitLibraries>
                    <artifact>com.lazerycode.junit:junit-test:1.0.0</artifact>
                </junitLibraries>
            </configuration>
        </plugin>
    </plugins>
</build>
<dependencies>
</dependencies>

Jmeter Log File :

2017/08/17 16:57:42 ERROR - jmeter.save.SaveService: Conversion error com.thoughtworks.xstream.converters.ConversionException: com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor ---- Debugging information ---- message : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException cause-message : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor class : org.apache.jorphan.collections.ListedHashTree required-type : org.apache.jorphan.collections.ListedHashTree path : /jmeterTestPlan/hashTree/hashTree/hashTree[2]/hashTree/hashTree/com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor line number : 76

I tried every thing but still no success .

Here is console output of an error I am getting

[ERROR] Failed to execute goal com.lazerycode.jmeter:jmeter-maven-plugin:2.2.0:configure (configure) on project jmeter-demo: Could not find artifact commons-math3:commons-math3:jar:3.4.1 in central (https://repo.maven.apache.org/maven2) -> [Help 1]

1

1 Answers

2
votes

You need to add the following line to jmeterExtensions section of your pom.xml file:

<artifact>kg.apc:jmeter-plugins-json:pom:2.6</artifact>

The error you're getting is about missing JSON Path Extractor which lives in jmeter-plugins-json Maven artifact

More information: