-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpom.xml
More file actions
192 lines (189 loc) · 8.43 KB
/
Copy pathpom.xml
File metadata and controls
192 lines (189 loc) · 8.43 KB
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
<?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.asismisr</groupId>
<artifactId>SeleniumE2ETestAutomationFramework</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<selenium.java.version>4.27.0</selenium.java.version>
<logback.version>1.5.6</logback.version>
<webdriver.manager.version>5.9.2</webdriver.manager.version>
<testng.version>7.10.2</testng.version>
<jackson.version>2.17.2</jackson.version>
<!-- plugins versions -->
<maven.compiler.version>3.11.0</maven.compiler.version>
<maven.dependency.version>3.6.0</maven.dependency.version>
<maven.jar.version>3.3.0</maven.jar.version>
<maven.surefire.version>3.1.2</maven.surefire.version>
<maven.resources.plugin>3.3.1</maven.resources.plugin>
<extent.report.version>5.1.2</extent.report.version>
<lombok.version>1.18.30</lombok.version>
<browser>chrome</browser>
<suite>vendor-portal.xml</suite>
<!-- output directory -->
<package.directory>${project.build.directory}/docker-resources</package.directory>
</properties>
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>${selenium.java.version}</version>
</dependency>
<!-- logging library -->
<!-- https://www.baeldung.com/logback -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
<!-- web-driver manager for local testing -->
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>${webdriver.manager.version}</version>
</dependency>
<!-- To deserialize json into Java object or vice versa -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<!-- Test framework -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${testng.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.aventstack/extentreports -->
<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports</artifactId>
<version>${extent.report.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.rest-assured/rest-assured -->
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>5.5.0</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version> <!-- Replace with the latest version -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>5.4.1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>5.4.1</version>
</dependency>
<dependency>
<groupId>com.influxdb</groupId>
<artifactId>influxdb-client-java</artifactId>
<version>6.11.0</version>
</dependency>
</dependencies>
<build>
<finalName>selenium-code-compiled</finalName>
<plugins>
<!-- To compile the source code using specific java version. also to force IDE to change the settings -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.version}</version>
<configuration>
<release>17</release>
</configuration>
</plugin>
<!-- To run the tests using specific parameters, change thread count, testng report output directory etc -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.version}</version>
<configuration>
<systemPropertyVariables>
<!-- maven clean test -Dbrowser=chrome -Dselenium.grid.enabled=true -->
<browser>${browser}</browser>
<selenium.grid.enabled>false</selenium.grid.enabled>
<!-- <selenium.grid.enabled>true</selenium.grid.enabled>-->
</systemPropertyVariables>
<suiteXmlFiles>
<!--suppress UnresolvedMavenProperty -->
<suiteXmlFile>target/test-classes/test-suites/${suite}</suiteXmlFile>
</suiteXmlFiles>
<threadCount>1</threadCount>
<reportsDirectory>target/test-output/testng-report</reportsDirectory>
</configuration>
</plugin>
<!-- To copy all the dependencies to run our tests as part of "mvn package" -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${maven.dependency.version}</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>
${package.directory}/libs
</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!-- To package our page objects, test classes into jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven.jar.version}</version>
<configuration>
<outputDirectory>${package.directory}/libs</outputDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
<configuration>
<includes>**/*.class</includes> <!-- include only *.class files i.e. basically excluding the resources folder content-->
</configuration>
</execution>
</executions>
</plugin>
<!-- To copy resources into the output directory -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${maven.resources.plugin}</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${package.directory}</outputDirectory>
<resources>
<resource>
<directory>src/test/resources</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>