1. 程式人生 > 其它 >pom.xml中jmeter-maven-plugin配置

pom.xml中jmeter-maven-plugin配置

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.test</groupId>
<artifactId>jmetertest</artifactId>
<version>1.1.0</version>
<packaging>jar</packaging>

<name>test</name>
<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.jmeter</groupId>
<artifactId>ApacheJMeter_java</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.4</version>
</dependency>

</dependencies>

<build>
<plugins>
<!-- execute JMeter test -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>2.9.0</version>
<executions>
<execution>
<id>jmeter-tests</id>
<phase>verify</phase>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
<configuration>
<jmeterVersion>5.1.1</jmeterVersion>
<ignoreResultFailures>true</ignoreResultFailures>
<excludedArtifacts>
<exclusion>org.mongodb:mongo-java-driver</exclusion>
</excludedArtifacts>
<jmeterExtensions>
<artifact>com.bill99:jmeter-result-mongodb-collector:3.3.0</artifact>
<!--<artifact>com.bill99:jmeter-monitor-mongodb-collector-plugin:1.1.4</artifact> -->
<artifact>com.bill99.nf.cps.mgw:cps-mgw:1.1.0</artifact>
</jmeterExtensions>
<propertiesUser>
<mongo_host>192.168.65.11</mongo_host>
<mongo_port>27017</mongo_port>
<scenarioname>${group_name}</scenarioname>
<threads>${thread}</threads>
<time>${time}</time>
<test_dataname>${test_dataname}</test_dataname>
<startTime>${startTime}</startTime>
<monitor_time>${monitor_time}</monitor_time>
<monitor_host>${monitor_host}</monitor_host>
<monitor_metric>${monitor_metric}</monitor_metric>
</propertiesUser>
<jMeterProcessJVMSettings>
<xms>2048</xms>
<xmx>2048</xmx>
</jMeterProcessJVMSettings>
<propertiesJMeter>
<sampleresult.default.encoding>UTF-8</sampleresult.default.encoding>
</propertiesJMeter>

<testFilesIncluded>
<jMeterTestFile>${group_name}.jmx</jMeterTestFile>
<!--<jMeterTestFile>mgw-cnp-purchase.jmx</jMeterTestFile>
<jMeterTestFile>mgw-Ind-auth.jmx</jMeterTestFile> -->
</testFilesIncluded>
</configuration>
</plugin>
</plugins>
</build>

</project>

本文來自部落格園,作者:up~up,轉載請註明原文連結:https://www.cnblogs.com/soft-engineer/p/15123857.html