Skip to content

Commit 9fe7547

Browse files
authored
Wrap element JS action with retrier (#93)
* Wrap element JS action with retrier * Update settings * Update pom * Update pipeline * Update selenium core library * Update maven step in pipeline
1 parent caf08db commit 9fe7547

File tree

7 files changed

+163
-168
lines changed

7 files changed

+163
-168
lines changed

azure-pipelines.yml

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
# Maven
2-
31
trigger:
42
- master
53

64
pool:
75
vmImage: 'windows-latest'
86

9-
steps:
7+
jobs:
8+
- job: sonar
9+
displayName: Analyse code with SonarQube
10+
11+
steps:
1012
- task: SonarCloudPrepare@1
13+
displayName: 'Prepare SonarCloud analysis'
1114
inputs:
1215
SonarCloud: 'SonarCloud'
1316
organization: 'aqualityautomation'
@@ -16,11 +19,8 @@ steps:
1619
extraProperties: |
1720
sonar.coverage.exclusions=**/**
1821
19-
- task: ScreenResolutionUtility@1
20-
inputs:
21-
displaySettings: 'optimal'
22-
2322
- task: Maven@3
23+
displayName: 'Build project'
2424
inputs:
2525
mavenPomFile: 'pom.xml'
2626
mavenOptions: '-Xmx3072m'
@@ -29,10 +29,34 @@ steps:
2929
jdkArchitectureOption: 'x64'
3030
publishJUnitResults: true
3131
testResultsFiles: '**/surefire-reports/TEST-*.xml'
32-
goals: 'clean test -Dprofile=local'
32+
goals: 'clean'
3333

3434
- task: SonarCloudAnalyze@1
35+
displayName: 'Run SonarCloud code analysis'
36+
continueOnError: true
3537

3638
- task: SonarCloudPublish@1
39+
displayName: 'Publish SonarCloud quality gate results'
3740
inputs:
3841
pollingTimeoutSec: '300'
42+
43+
- job: tests
44+
displayName: Run tests
45+
46+
steps:
47+
- task: ScreenResolutionUtility@1
48+
displayName: 'Set optimal screen resolution'
49+
inputs:
50+
displaySettings: 'optimal'
51+
52+
- task: Maven@3
53+
displayName: 'Run tests'
54+
inputs:
55+
mavenPomFile: 'pom.xml'
56+
mavenOptions: '-Xmx3072m'
57+
javaHomeOption: 'JDKVersion'
58+
jdkVersionOption: '1.8'
59+
jdkArchitectureOption: 'x64'
60+
publishJUnitResults: true
61+
testResultsFiles: '**/surefire-reports/TEST-*.xml'
62+
goals: 'test -Dprofile=local'

pom.xml

Lines changed: 116 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
<groupId>com.github.aquality-automation</groupId>
88
<artifactId>aquality-selenium</artifactId>
9-
<version>2.1.0</version>
10-
<packaging>jar</packaging>
9+
<version>2.1.1</version>
1110

11+
<packaging>jar</packaging>
1212
<name>Aquality Selenium</name>
1313
<description>Library around Selenium WebDriver</description>
1414
<url>https://github.com/aquality-automation/aquality-selenium-java</url>
@@ -74,7 +74,7 @@
7474
<dependency>
7575
<groupId>com.github.aquality-automation</groupId>
7676
<artifactId>aquality-selenium-core</artifactId>
77-
<version>LATEST</version>
77+
<version>1.0.1</version>
7878
</dependency>
7979

8080
<dependency>
@@ -119,160 +119,125 @@
119119
<version>1.7.26</version>
120120
<scope>test</scope>
121121
</dependency>
122-
123122
</dependencies>
124123

125-
<profiles>
126-
<profile>
127-
<id>default</id>
128-
<activation>
129-
<activeByDefault>true</activeByDefault>
130-
</activation>
131-
<build>
132-
<plugins>
133-
<plugin>
134-
<groupId>org.apache.maven.plugins</groupId>
135-
<artifactId>maven-compiler-plugin</artifactId>
136-
<version>3.1</version>
124+
<build>
125+
<plugins>
126+
<plugin>
127+
<groupId>org.apache.maven.plugins</groupId>
128+
<artifactId>maven-compiler-plugin</artifactId>
129+
<version>3.1</version>
130+
<configuration>
131+
<source>1.8</source>
132+
<target>1.8</target>
133+
</configuration>
134+
</plugin>
135+
<plugin>
136+
<groupId>org.jacoco</groupId>
137+
<artifactId>jacoco-maven-plugin</artifactId>
138+
<version>0.8.4</version>
139+
<executions>
140+
<execution>
141+
<id>pre-unit-test</id>
142+
<goals>
143+
<goal>prepare-agent</goal>
144+
</goals>
137145
<configuration>
138-
<source>1.8</source>
139-
<target>1.8</target>
146+
<destFile>${project.build.directory}/jacoco/jacoco-ut.exec</destFile>
147+
<propertyName>surefireArgLine</propertyName>
140148
</configuration>
141-
</plugin>
142-
<plugin>
143-
<groupId>org.jacoco</groupId>
144-
<artifactId>jacoco-maven-plugin</artifactId>
145-
<version>0.8.4</version>
146-
<executions>
147-
<execution>
148-
<id>pre-unit-test</id>
149-
<goals>
150-
<goal>prepare-agent</goal>
151-
</goals>
152-
<configuration>
153-
<destFile>${project.build.directory}/jacoco/jacoco-ut.exec</destFile>
154-
<propertyName>surefireArgLine</propertyName>
155-
</configuration>
156-
</execution>
157-
<execution>
158-
<id>post-unit-test</id>
159-
<phase>test</phase>
160-
<goals>
161-
<goal>report</goal>
162-
</goals>
163-
<configuration>
164-
<dataFile>${project.build.directory}/jacoco/jacoco-ut.exec</dataFile>
165-
<outputDirectory>${project.build.directory}/coverage-report</outputDirectory>
166-
</configuration>
167-
</execution>
168-
</executions>
169-
</plugin>
170-
<plugin>
171-
<groupId>org.apache.maven.plugins</groupId>
172-
<artifactId>maven-surefire-plugin</artifactId>
173-
<version>2.20</version>
149+
</execution>
150+
<execution>
151+
<id>post-unit-test</id>
152+
<phase>test</phase>
153+
<goals>
154+
<goal>report</goal>
155+
</goals>
174156
<configuration>
175-
<argLine>${surefireArgLine} -Dfile.encoding=UTF-8</argLine>
176-
<reuseForks>false</reuseForks>
177-
<suiteXmlFiles>
178-
<suiteXmlFile>src/test/resources/TestSuite.xml</suiteXmlFile>
179-
</suiteXmlFiles>
157+
<dataFile>${project.build.directory}/jacoco/jacoco-ut.exec</dataFile>
158+
<outputDirectory>${project.build.directory}/coverage-report</outputDirectory>
180159
</configuration>
181-
</plugin>
182-
<plugin>
183-
<groupId>org.apache.maven.plugins</groupId>
184-
<artifactId>maven-assembly-plugin</artifactId>
185-
<executions>
186-
<execution>
187-
<goals>
188-
<goal>attached</goal>
189-
</goals>
190-
<phase>package</phase>
191-
<configuration>
192-
<descriptorRefs>
193-
<descriptorRef>jar-with-dependencies</descriptorRef>
194-
</descriptorRefs>
195-
</configuration>
196-
</execution>
197-
</executions>
198-
</plugin>
199-
<plugin>
200-
<groupId>org.apache.maven.plugins</groupId>
201-
<artifactId>maven-source-plugin</artifactId>
202-
<executions>
203-
<execution>
204-
<id>attach-sources</id>
205-
<goals>
206-
<goal>jar</goal>
207-
</goals>
208-
</execution>
209-
</executions>
210-
</plugin>
211-
<plugin>
212-
<groupId>org.apache.maven.plugins</groupId>
213-
<artifactId>maven-javadoc-plugin</artifactId>
214-
<executions>
215-
<execution>
216-
<id>attach-javadocs</id>
217-
<goals>
218-
<goal>jar</goal>
219-
</goals>
220-
</execution>
221-
</executions>
222-
</plugin>
223-
<plugin>
224-
<groupId>org.apache.maven.plugins</groupId>
225-
<artifactId>maven-gpg-plugin</artifactId>
226-
<version>1.6</version>
227-
<executions>
228-
<execution>
229-
<id>sign-artifacts</id>
230-
<phase>verify</phase>
231-
<goals>
232-
<goal>sign</goal>
233-
</goals>
234-
</execution>
235-
</executions>
236-
</plugin>
237-
<plugin>
238-
<groupId>org.sonatype.plugins</groupId>
239-
<artifactId>nexus-staging-maven-plugin</artifactId>
240-
<version>1.6.8</version>
241-
<extensions>true</extensions>
160+
</execution>
161+
</executions>
162+
</plugin>
163+
<plugin>
164+
<groupId>org.apache.maven.plugins</groupId>
165+
<artifactId>maven-surefire-plugin</artifactId>
166+
<version>2.20</version>
167+
<configuration>
168+
<argLine>${surefireArgLine} -Dfile.encoding=UTF-8</argLine>
169+
<reuseForks>false</reuseForks>
170+
<suiteXmlFiles>
171+
<suiteXmlFile>src/test/resources/TestSuite.xml</suiteXmlFile>
172+
</suiteXmlFiles>
173+
</configuration>
174+
</plugin>
175+
<plugin>
176+
<groupId>org.apache.maven.plugins</groupId>
177+
<artifactId>maven-assembly-plugin</artifactId>
178+
<executions>
179+
<execution>
180+
<goals>
181+
<goal>attached</goal>
182+
</goals>
183+
<phase>package</phase>
242184
<configuration>
243-
<serverId>ossrh</serverId>
244-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
245-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
185+
<descriptorRefs>
186+
<descriptorRef>jar-with-dependencies</descriptorRef>
187+
</descriptorRefs>
246188
</configuration>
247-
</plugin>
248-
</plugins>
249-
</build>
250-
</profile>
251-
252-
<profile>
253-
<id>sonar</id>
254-
<build>
255-
<pluginManagement>
256-
<plugins>
257-
<plugin>
258-
<groupId>org.sonarsource.scanner.maven</groupId>
259-
<artifactId>sonar-maven-plugin</artifactId>
260-
<version>3.6.0.1398</version>
261-
</plugin>
262-
</plugins>
263-
</pluginManagement>
264-
</build>
265-
<properties>
266-
<sonar.host.url>http://172.20.68.34:9000</sonar.host.url>
267-
<sonar.login>a9d71a45706333578fa9d518a0aa82d89ecbe3ce</sonar.login>
268-
<sonar.projectKey>sonar.selenium-web-java</sonar.projectKey>
269-
<sonar.sources>src/main</sonar.sources>
270-
<sonar.tests>src/test</sonar.tests>
271-
<sonar.language>java</sonar.language>
272-
<sonar.java.binaries>.</sonar.java.binaries>
273-
<sonar.sourceEncoding>UTF-8</sonar.sourceEncoding>
274-
</properties>
275-
</profile>
276-
</profiles>
277-
189+
</execution>
190+
</executions>
191+
</plugin>
192+
<plugin>
193+
<groupId>org.apache.maven.plugins</groupId>
194+
<artifactId>maven-source-plugin</artifactId>
195+
<executions>
196+
<execution>
197+
<id>attach-sources</id>
198+
<goals>
199+
<goal>jar</goal>
200+
</goals>
201+
</execution>
202+
</executions>
203+
</plugin>
204+
<plugin>
205+
<groupId>org.apache.maven.plugins</groupId>
206+
<artifactId>maven-javadoc-plugin</artifactId>
207+
<executions>
208+
<execution>
209+
<id>attach-javadocs</id>
210+
<goals>
211+
<goal>jar</goal>
212+
</goals>
213+
</execution>
214+
</executions>
215+
</plugin>
216+
<plugin>
217+
<groupId>org.apache.maven.plugins</groupId>
218+
<artifactId>maven-gpg-plugin</artifactId>
219+
<version>1.6</version>
220+
<executions>
221+
<execution>
222+
<id>sign-artifacts</id>
223+
<phase>verify</phase>
224+
<goals>
225+
<goal>sign</goal>
226+
</goals>
227+
</execution>
228+
</executions>
229+
</plugin>
230+
<plugin>
231+
<groupId>org.sonatype.plugins</groupId>
232+
<artifactId>nexus-staging-maven-plugin</artifactId>
233+
<version>1.6.8</version>
234+
<extensions>true</extensions>
235+
<configuration>
236+
<serverId>ossrh</serverId>
237+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
238+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
239+
</configuration>
240+
</plugin>
241+
</plugins>
242+
</build>
278243
</project>

0 commit comments

Comments
 (0)