jmeter-maven-plugin库管理

时间:2016-12-07 14:49:41

标签: maven jmeter jmeter-maven-plugin

我的pom.xml

中有这样的插件配置
    <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-json:2.4</artifact>
                    <artifact>kg.apc:jmeter-plugins-casutg:2.1</artifact>
                </jmeterExtensions>
                <junitLibraries>
                    <artifact>com.microsoft.sqlserver:sqljdbc4:4.0</artifact>
                </junitLibraries>
                <testFilesIncluded>
                    <jMeterTestFile>${tests.include}</jMeterTestFile>
                </testFilesIncluded>
                <jMeterProcessJVMSettings>
                    <xms>2048</xms>
                    <xmx>2048</xmx>
                </jMeterProcessJVMSettings>
                <customPropertiesFiles>
                    <!-- Custom property file -->
                </customPropertiesFiles>
                <propertiesJMeter>
                   <!-- Some properties that I pass into jmeter -->
                </propertiesJMeter>
            </configuration>
            <executions>
                <execution>
                    <id>jmeter-tests</id>
                    <phase>verify</phase>
                    <goals>
                        <goal>jmeter</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

运行mvn clean verify后,我得到了这样的libsat /target/jmeter/lib/

json-path-2.1.0.jar json-path-2.2.0.jar

并且在日志文件中我看到jmeter不时失败,但有例外:

jmeter.extractor.json.jsonpath.JSONPostProcessor: Error processing JSON content in Select Team Name, message:Could not compile inline filter : [?(@.id=="29011")]

请注意,此[?(@.id=="29011")]只是表达式的一部分。完整表达式与此类似:$.teamData[?(@.id=="29011")].name

我希望这个错误以某种方式与这个多个库相关

1 个答案:

答案 0 :(得分:1)

使用已解决此问题的插件的最新版本,如发行说明中所述:

  

https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/blob/master/CHANGELOG.md