【问题标题】:selecting test file (jmx file) not working with jmeter-maven-plugin选择测试文件(jmx 文件)不适用于 jmeter-maven-plugin
【发布时间】:2019-05-31 21:30:52
【问题描述】:

我想一次只选择一个 JMeter 测试文件(jmx 文件)运行。我的 pom.xml 中有以下内容:

<plugin>
    <groupId>com.lazerycode.jmeter</groupId>
    <artifactId>jmeter-maven-plugin</artifactId>
    <version>1.9.0</version>
    <executions>
        <execution>
            <id>jmeter-tests</id>
            <phase>verify</phase>
            <goals>
                <goal>jmeter</goal>
            </goals>
            <configuration>
                <testFilesIncluded>
                    <jMeterTestFile>ionix-${foo.bar}.jmx</jMeterTestFile>
                </testFilesIncluded>
                <overrideRootLogLevel>DEBUG</overrideRootLogLevel>
                <testResultsTimestamp>false</testResultsTimestamp>
            </configuration>
        </execution>
    </executions>
</plugin>

我在src/test/jmeter 中有多个 jmx 文件。事实证明,无论如何,这些 jmx 文件总是由 jmeter 插件运行,即使我使用如下命令运行 maven:
mvn clean -Dfoo.bar=nonsense jmeter:jmeter

根据the documentation,我上面的设置应该只执行ionix-${foo.bar}.jmx。 (文件ionix-${foo.bar}.jmx 是否存在似乎对我的情况没有影响。)那么,我在这里缺少什么?

非常感谢。

【问题讨论】:

    标签: maven jmeter jmeter-maven-plugin


    【解决方案1】:

    通过添加 -X 在 Maven 中启用调试以查看发生了什么。

    您能否列出包含 jmx 文件的文件夹的内容

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-10-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多