简体   繁体   中英

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

Currently we run them using maven command :

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

The pom.xml config is as follow :

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

You can call the maven multiple times. Each will execute a separate process.

You should be able to fork the test execution. I never tried this for JMeter. Seems to be doable. Check the below link.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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