-
Notifications
You must be signed in to change notification settings - Fork 56
/
pom.xml
132 lines (118 loc) · 6.4 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?xml version="1.0" encoding="UTF-8"?>
<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>
<artifactId>jmeter-maven-plugin-example</artifactId>
<groupId>com.lazerycode.jmeter</groupId>
<version>DEV-SNAPSHOT</version>
<packaging>pom</packaging>
<description>
Executes a JMeter test.
Invoke with "mvn verify -Pperformance"
</description>
<properties>
<webapp.protocol>http</webapp.protocol>
<webapp.host>www.mozilla.com</webapp.host>
<webapp.port>80</webapp.port>
<webapp.uris>${project.basedir}/src/test/uris/uris.txt</webapp.uris>
<jmeter.analysis.maven.plugin.version>1.0.6</jmeter.analysis.maven.plugin.version>
<jmeter-maven-plugin.version>2.0.3</jmeter-maven-plugin.version>
<test.duration>30</test.duration>
<test.threads>10</test.threads>
</properties>
<profiles>
<profile>
<id>performance</id>
<build>
<plugins>
<!-- execute JMeter test -->
<plugin>
<groupId>${project.groupId}</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>${jmeter-maven-plugin.version}</version>
<executions>
<execution>
<id>test</id>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
<configuration>
<propertiesUser>
<!--A user which accesses all URLs-->
<threadgroup00.name>test</threadgroup00.name>
<!--number of threads to use-->
<threadgroup00.numberOfThreads>${test.threads}</threadgroup00.numberOfThreads>
<!--delay of the test in seconds-->
<threadgroup00.scheduledDelay>0</threadgroup00.scheduledDelay>
<!--duration of the test in seconds-->
<threadgroup00.scheduledDuration>${test.duration}</threadgroup00.scheduledDuration>
<!--how long till all threads are up and running in seconds-->
<threadgroup00.rampUp>1</threadgroup00.rampUp>
<!--target throughput of all threads of the group per minute-->
<threadgroup00.throughput>100000000</threadgroup00.throughput>
<!-- use uris from given file -->
<threadgroup00.dataFile>${webapp.uris}</threadgroup00.dataFile>
<protocol>${webapp.protocol}</protocol>
<server>${webapp.host}</server>
<port>${webapp.port}</port>
</propertiesUser>
<ignoreResultFailures>true</ignoreResultFailures>
</configuration>
</plugin>
<plugin>
<groupId>${project.groupId}</groupId>
<artifactId>jmeter-analysis-maven-plugin</artifactId>
<version>${jmeter.analysis.maven.plugin.version}</version>
<executions>
<execution>
<goals>
<goal>analyze</goal>
</goals>
<phase>post-integration-test</phase>
</execution>
</executions>
<configuration>
<!--
source file that contains jmeter result data. Needs to be XML format or a GZIPed XML format
-->
<source>${project.build.directory}/jmeter/results/*</source>
<!--
directory where to store analysis report files. At least a file "summary.txt" will be stored here.
-->
<targetDirectory>${project.build.directory}/reports</targetDirectory>
<!--
Defines groups of requests by URL patterns,
e.g. URIs starting with /mock/page are associated with group "pages". All analysis results are
If there is no such mapping then the threadgroups from the jmeter.xml are used.
-->
<!--<requestGroups>-->
<!--<test>/en-US/firefox/**</test>-->
<!--</requestGroups>-->
<!--
Mapping from resource URL to file name. Every resource will be downloaded and stored in 'targetDirectory'
with the given filename. Tokens "_FROM_" and "_TO_" can be used as placeholders. These placeholders will
be replaced by timestamps of execution interval (formatted as ISO8601, e.g. '20111216T145509+0100').
-->
<!--<remoteResources>-->
<!--<property>-->
<!--<name>http://yourhost/path?from=_FROM_&to=_TO_</name>-->
<!--<value>my_resource.txt</value>-->
<!--</property>-->
<!--</remoteResources>-->
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<!-- in case we want to use a SNAPSHOT version of the jmeter-maven-plugin -->
<pluginRepositories>
<pluginRepository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</pluginRepository>
</pluginRepositories>
</project>