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.bill99</groupId>
<artifactId>internal-quickpay</artifactId>
<version>0.0.1</version>
<packaging>jar</packaging>
<name>internal-quickpay</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<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:internal-quickpay:0.0.1</artifact>
</jmeterExtensions>
<jMeterProcessJVMSettings>
<xms>1024</xms>
<xmx>1024</xmx>
</jMeterProcessJVMSettings>
<propertiesUser>
<mongo_host>192.168.65.11</mongo_host>
<mongo_port>27017</mongo_port>
<scenarioname>${group_name}</scenarioname>
<threads>${thread}</threads>
<time>${time}</time>
<pan>pan</pan>
<startTime>${startTime}</startTime>
<monitor_time>${monitor_time}</monitor_time>
<monitor_host>${monitor_host}</monitor_host>
<monitor_metric>${monitor_metric}</monitor_metric>
<!-- ramp_up_period>${ramp_up_period}</ramp_up_period>-->
<monitor_time>5</monitor_time>
</propertiesUser>
<testFilesIncluded>
${group_name}.jmx
</testFilesIncluded>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.4</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.2</version>
</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.6</version>
</dependency>
<dependency>
<groupId>com.99bill</groupId>
<artifactId>hessian</artifactId>
<version>3.1.6</version>
</dependency>
<dependency>
<groupId>com.bill99</groupId>
<artifactId>internal</artifactId>
<version>6.0.14.4</version>
</dependency>
</dependencies>
</project>
本文来自博客园,作者:up~up,转载请注明原文链接:https://www.cnblogs.com/soft-engineer/articles/15323816.html
浙公网安备 33010602011771号