简体   繁体   English

并行运行多个jmx文件

[英]Run multiple jmx files in Parallel

We have project structure as src/test/jmeter/regressionTests/jmx1,jmx2,jmx2 The regressionTests folder has different jmx files. 我们有项目结构src / test / jmeter / regressionTests / jmx1,jmx2,jmx2 regressionTests文件夹有不同的jmx文件。 These files can execute in parallel.(They have no dependency on each other.Each jmx file creates its own data and then deletes the data created at last.) 这些文件可以并行执行。(它们彼此没有依赖关系。每个jmx文件创建自己的数据,然后删除最后创建的数据。)

Currently we run them using maven command : 目前我们使用maven命令运行它们:

-Pprofile-jmeter jmeter:jmeter -DtestType=regressionTest -DskipTests=true

The pom.xml config is as follow : pom.xml配置如下:

<profiles>
        <profile>
            <id>profile-jmeter</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.lazerycode.jmeter</groupId>
                        <artifactId>jmeter-maven-plugin</artifactId>
                        <version>1.10.1</version>
                        <executions>
                            <execution>
                                <id>run-jmeter-tests</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>jmeter</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <testFilesDirectory>${basedir}/src/test/jmeter/scripts/${testType}</testFilesDirectory>
                            <overrideRootLogLevel>ERROR</overrideRootLogLevel>
                            <testResultsTimestamp>false</testResultsTimestamp>
                            <resultsFileFormat>xml</resultsFileFormat>

Is there anything we can add to the maven command or the maven config in pom.xml so that the jmx files run in parallel. 我们可以在pom.xml中添加maven命令或maven配置,以便jmx文件并行运行。

You can call the maven multiple times. 你可以多次打电话给maven。 Each will execute a separate process. 每个都将执行一个单独的过程。

You should be able to fork the test execution. 您应该能够分叉测试执行。 I never tried this for JMeter. 我从没试过JMeter。 Seems to be doable. 似乎是可行的。 Check the below link. 请查看以下链接。

http://maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html http://maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM