-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathpom.xml
205 lines (201 loc) · 8.07 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<?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>
<groupId>com.abcnull</groupId>
<artifactId>webui-test</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>WebUI Test Web App</name>
<!-- 属性配置 -->
<properties>
<!-- 指定编码方式和 JDK 8 -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
<!-- 依赖版本信息 -->
<lombok-version>1.18.4</lombok-version>
<junit-version>4.12</junit-version>
<slf4j-version>1.7.25</slf4j-version>
<log4j-version>2.11.1</log4j-version>
<testng-version>6.14.3</testng-version>
<selenium-version>3.141.59</selenium-version>
<htmlunit-version>2.30</htmlunit-version>
<extentreports-version>3.0.7</extentreports-version>
<commons-pool2-version>2.6.1</commons-pool2-version>
<jedis-version>3.0.1</jedis-version>
<poi-version>4.1.0</poi-version>
<httpclient-version>4.5.9</httpclient-version>
<gson-version>2.8.5</gson-version>
<allure-version>2.13.5</allure-version>
<compile-plugin-version>3.8.0</compile-plugin-version>
<surefire-plugin-version>2.22.1</surefire-plugin-version>
<aspectj-version>1.8.10</aspectj-version>
<!-- jenkins 参数化构建 -->
<xml.file>${env.xmlFileName}</xml.file>
<param1>${env.param1}</param1>
<param2>${env.param2}</param2>
<param3>${env.param3}</param3>
</properties>
<!-- 依赖配置 -->
<dependencies>
<!-- lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok-version}</version>
<scope>provided</scope>
</dependency>
<!-- junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit-version}</version>
<scope>test</scope>
</dependency>
<!-- slf4j -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j-version}</version>
</dependency>
<!-- log4j -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j-version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j-version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j-version}</version>
</dependency>
<!-- testng -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${testng-version}</version>
</dependency>
<!-- selenium -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>${selenium-version}</version>
</dependency>
<!-- htmlunit -->
<!-- 一个页面分析工具,提供了界面上各种操作的 API -->
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>${htmlunit-version}</version>
</dependency>
<!-- extentreports -->
<!-- 用于生成定制测试报告使用 -->
<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports</artifactId>
<version>${extentreports-version}</version>
</dependency>
<!-- commons-pool2 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>${commons-pool2-version}</version>
</dependency>
<!-- redis -->
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>${jedis-version}</version>
</dependency>
<!-- poi -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>${poi-version}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${poi-version}</version>
</dependency>
<!-- httpclient -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${httpclient-version}</version>
</dependency>
<!-- gson -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson-version}</version>
</dependency>
<!-- allure 2 -->
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-testng</artifactId>
<version>${allure-version}</version>
</dependency>
</dependencies>
<!-- 构建配置 -->
<build>
<plugins>
<!-- 添加编译插件 compiler -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compile-plugin-version}</version>
<configuration>
<!-- 使用jdk 1.8的版本来编译 -->
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<!-- 测试插件 surefire -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin-version}</version>
<configuration>
<!-- allure 2 配置 -->
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj-version}/aspectjweaver-${aspectj-version}.jar"
</argLine>
<!-- 指定 xml 文件 -->
<suiteXmlFiles>
<!-- 通过美元符的形式可以将 jenkins 中参数传递过来,指定要运行的 xml 名 -->
<!-- <suiteXmlFile>${xml.file}</suiteXmlFile> -->
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
<!-- 传入 xml 中 -->
<systemPropertyVariables>
<!-- jenkins 参数一 -->
<param1>${param1}</param1>
<!-- jenkins 参数二 -->
<param2>${param2}</param2>
<!-- jenkins 参数三 -->
<param3>${param3}</param3>
</systemPropertyVariables>
<argLine>-Dfile.encoding=UTF-8</argLine>
</configuration>
<dependencies>
<!-- allure 2 配置依赖 -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj-version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>