zoukankan      html  css  js  c++  java
  • Jmeter-Maven-Plugin高级应用:Remote Server Configuration

    Remote Server Configuration

    Remote Start And Stop Of Servers Via <remoteConfig>

    Setting the <startServersBeforeTests> option will result in a --runremote command being send to JMeter which will start up any remote servers you have defined in your jmeter.propertieswhen your first test starts.

    Setting the <stopServersAfterTests> option will result in a --remoteexit command being send to JMeter which will shut down all remote servers defined in jmeter.properties after your last test has been run.

    <startServersBeforeTests> and <stopServersAfterTests> can be used independantly so that it is possible to use another process to start and stop servers if required.

    +---+
    <project>
        [...]
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.lazerycode.jmeter</groupId>
                        <artifactId>jmeter-maven-plugin</artifactId>
                        <version>2.0.3</version>
                        <executions>
                            <execution>
                                <id>jmeter-tests</id>
                                <goals>
                                    <goal>jmeter</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <remoteConfig>
                                <startServersBeforeTests>true</startServersBeforeTests>
                                <stopServersAfterTests>true</stopServersAfterTests>
                            </remoteConfig>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        [...]
    </project>
    +---+

    You can configure the plugin to perform a remote start and stop for each individual test by setting the <startAndStopServersForEachTest> variable to true. If you set this along with<startServersBeforeTests> and <stopServersAfterTests> the <startServersBeforeTests>and <stopServersAfterTests> settings will be ignored.

    +---+
    <project>
        [...]
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.lazerycode.jmeter</groupId>
                        <artifactId>jmeter-maven-plugin</artifactId>
                        <version>2.0.3</version>
                        <executions>
                            <execution>
                                <id>jmeter-tests</id>
                                <goals>
                                    <goal>jmeter</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <remoteConfig>
                                <startAndStopServersForEachTest>false</startAndStopServersForEachTest>
                            </remoteConfig>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        [...]
    </project>
    +---+

    Instead of starting all remote servers, you can specify which ones to start by using the<serverList> option, this will accept a comma separated list of servers for JMeter to start (these must be defined in your jmeter.properties, see the remote testing page in the JMeter manual).

    +---+
    <project>
        [...]
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.lazerycode.jmeter</groupId>
                        <artifactId>jmeter-maven-plugin</artifactId>
                        <version>2.0.3</version>
                        <executions>
                            <execution>
                                <id>jmeter-tests</id>
                                <goals>
                                    <goal>jmeter</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <remoteConfig>
                                <startServersBeforeTests>true</startServersBeforeTests>
                                <serverList>server1,server2</serverList>
                                <stopServersAfterTests>true</stopServersAfterTests>
                            </remoteConfig>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        [...]
    </project>
  • 相关阅读:
    对ArcGis Engine的增、删、改实现
    修改 ArcGis Engine 图层字段值
    获取DataTable 删除行的数据
    使用Kdiff3 来解决Git的文件冲突
    WordPress 用Windows Live Write写日志
    在GIT 中增加忽略文件夹与文件
    解决WinDbg下不能用 !ClrStack a
    DevExpress 实现下拉复选控件
    解决远程桌面连接后没有声音的问题
    读书
  • 原文地址:https://www.cnblogs.com/ceshi2016/p/5987089.html
Copyright © 2011-2022 走看看