Skip to content

Commit d77768f

Browse files
committed
Merge branch 'develop'
2 parents 239f011 + 9151d7e commit d77768f

138 files changed

Lines changed: 7701 additions & 419 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ hs_err_pid*
2424
/.classpath
2525
/.project
2626
/.settings/
27-
/bin/
2827
build
2928
dev-*.properties
3029
temp-*.properties
3130
embeddedLocalProxySelfSignedRootCertificate.p12
3231
/bin/
32+
/allure-results/

config/browser.properties

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#
1616
################################################################################
1717
#
18-
# Mandatory properties
18+
# Mandatory properties
1919
#
2020
#################################################################################
2121
#
@@ -37,7 +37,7 @@
3737
#
3838
################################################################################
3939
#
40-
# Global properties
40+
# Global properties
4141
#
4242
#################################################################################
4343
#
@@ -132,11 +132,30 @@ browserprofile.Chrome_1500x1000_headless.browserResolution = 1500x1000
132132
browserprofile.Chrome_1500x1000_headless.arguments = -ignore-certificate-errors
133133
browserprofile.Chrome_1500x1000_headless.headless = true
134134

135+
browserprofile.FF_with_args.name = FF with args
136+
browserprofile.FF_with_args.headless = true
137+
browserprofile.FF_with_args.browserResolution = 1024x768
138+
browserprofile.FF_with_args.browser = firefox
139+
browserprofile.FF_with_args.driverArgs=--log ; info ;--allow-hosts; xceptance.com; google.com; --port=8525; --log-no-truncate ; --websocket-port=8785; --allow-origins; http://xceptance.com:8785
140+
141+
browserprofile.Chrome_with_args.name = Chrome with args
142+
browserprofile.Chrome_with_args.headless = true
143+
browserprofile.Chrome_with_args.browserResolution = 1024x768
144+
browserprofile.Chrome_with_args.browser = chrome
145+
browserprofile.Chrome_with_args.driverArgs=--port=7100 ; --allowed-origins=localhost, xceptance.com; --log-level=INFO
146+
147+
135148
# Small Firefox
136149
browserprofile.FF_1024x768.name = Firefox 1024x768
137150
browserprofile.FF_1024x768.browser = firefox
138151
browserprofile.FF_1024x768.browserResolution = 1024x768
139152

153+
# Small headless Firefox
154+
browserprofile.FF_headless.name = Firefox Headless
155+
browserprofile.FF_headless.browser = firefox
156+
browserprofile.FF_headless.browserResolution = 1024x768
157+
browserprofile.FF_headless.headless = true
158+
140159
# Local Firefox but with larger window size
141160
browserprofile.FF_1500x1000.name = Latest local Firefox 1500x1000
142161
browserprofile.FF_1500x1000.browser = firefox

config/neodymium.properties

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,24 @@
2626
#
2727
#########
2828
#
29+
# URL blocking
30+
#
31+
#########
32+
#
33+
# To ensure the automation process is not taking a wrong turn (e.g. thought misconfigured links),
34+
# we provide a way to break a test, if a blocked URL or an URL which does not match a configured
35+
# include list is called.
36+
# This is only targeting the main page URL, background calls are not covered.
37+
# NOTE: The URLs needs to be provided as Regular Expressions, so be aware of special regex relevant characters!
38+
#
39+
# List of excluded URLS seperated by whitespaces
40+
# neodymium.url.excludeList = ^http://prod.example.com/[?]testmode=true ^https://stg.example.com
41+
#
42+
# List of included URLS seperated by whitespaces
43+
# neodymium.url.includeList = ^http://dev.example.com ^https://stg.example.com
44+
#
45+
#########
46+
#
2947
# Localization
3048
#
3149
#########
@@ -140,6 +158,49 @@
140158
# Whether or not a screenshot should be taken per step
141159
# neodymium.allureAddons.screenshots.perstep.always = false
142160
#
161+
#############################
162+
#
163+
# Advanced screenshot properties
164+
#
165+
#############################
166+
167+
# Enables advanced screenshot capabilities with additional features
168+
# When set to true, provides more sophisticated screenshot taking mechanisms
169+
neodymium.screenshots.enableAdvancedScreenshots = true
170+
171+
# Controls whether screenshots are taken for successful test scenarios
172+
# When set to false, screenshots will not be captured for passing tests
173+
neodymium.screenshots.enableOnSuccess = false
174+
175+
# Enables full-page screenshot capture, capturing entire page content beyond visible viewport
176+
# Useful for long web pages or scrollable content
177+
neodymium.screenshots.fullpagecapture.enable = true
178+
179+
# Determines if the current viewport should be visually highlighted during full-page capture
180+
# When false, no visual indication of current viewport is added
181+
neodymium.screenshots.fullpagecapture.highlightViewport = false
182+
183+
# Controls the directory structure for storing screenshots
184+
# When false, uses a flat directory structure instead of a nested tree-like structure
185+
neodymium.screenshots.enableTreeDirectoryStructure = false
186+
187+
# Sets the highlight color for the viewport during full-page capture
188+
# Uses hexadecimal color code, in this case bright red
189+
neodymium.screenshots.fullpagecapture.highlightColor= #FF0000
190+
191+
# Enables highlighting of the last interacted or focused element in the screenshot
192+
# Helps identify the final state or location of interaction
193+
neodymium.screenshots.highlightLastElement = true
194+
195+
# Sets the highlight color for the last element
196+
# Uses hexadecimal color code
197+
neodymium.screenshots.element.highlightColor = #FF00FF
198+
199+
# Defines the thickness of highlight lines when elements are marked
200+
# Higher values create thicker, more prominent highlight borders
201+
neodymium.screenshots.highlightLineThickness = 4
202+
203+
143204
#############################
144205
#
145206
# DataUtils properties
@@ -226,6 +287,49 @@ neodymium.webDriver.keepBrowserOpenOnFailure = false
226287
# If false: all tests of a test class are executed
227288
neodymium.workInProgress = false
228289

290+
# If true: the test data json of the corresponding test gets attached to the allure report
291+
# If false: the test data json of the corresponding test does not get attached to the allure report
292+
neodymium.report.enableTestDataInReport = true
293+
294+
#############################
295+
#
296+
# Lighthouse
297+
#
298+
#############################
299+
300+
# Specifies the path to the Lighthouse executable
301+
# If Lighthouse is globally installed and available in PATH, use only the name of the Lighthouse binary
302+
# If Lighthouse is not globally installed and available in PATH, use the absolute/relative path to the Lighthouse binary
303+
neodymium.lighthouse.binaryPath = lighthouse
304+
305+
# Specifies the minimum acceptable score for the performance category in Lighthouse reports
306+
# If the Lighthouse performance score falls below this threshold, the test will fail
307+
# Range: 0.0 - 1.0 (representing 0% to 100%)
308+
# The actual value for the performance score varies alot, so consider using a lower threshold to avoid a lot of false alerts
309+
neodymium.lighthouse.assert.thresholdScore.performance = 0.5
310+
311+
# Specifies the minimum acceptable score for the accessibility category in Lighthouse reports
312+
# If the Lighthouse accessibility score falls below this threshold, the test will fail
313+
# Range: 0.0 - 1.0 (representing 0% to 100%)
314+
# The actual value for the accessibility score varies alot, so consider using a lower threshold to avoid a lot of false alerts
315+
neodymium.lighthouse.assert.thresholdScore.accessibility = 0.5
316+
317+
# Specifies the minimum acceptable score for the best practices category in Lighthouse reports
318+
# If the Lighthouse best practices score falls below this threshold, the test will fail
319+
# Range: 0.0 - 1.0 (representing 0% to 100%)
320+
# The actual value for the best practices score varies alot, so consider using a lower threshold to avoid a lot of false alerts
321+
neodymium.lighthouse.assert.thresholdScore.bestPractices = 0.5
322+
323+
# Specifies the minimum acceptable score for the seo category in Lighthouse reports
324+
# If the Lighthouse seo score falls below this threshold, the test will fail
325+
# Range: 0.0 - 1.0 (representing 0% to 100%)
326+
# The actual value for the seo score varies alot, so consider using a lower threshold to avoid a lot of false alerts
327+
neodymium.lighthouse.assert.thresholdScore.seo = 0.5
328+
329+
# To be able to validate Lighthouse report audits, we use internal json id's from the report itself
330+
# A full list of all audit id's and their corresponding titles can be found here: https://github.com/Xceptance/neodymium/wiki/Reports#lighthouse-audit-validation
331+
#neodymium.lighthouse.assert.audits =
332+
229333
#############################
230334
#
231335
# Proxy configuration properties
@@ -284,3 +388,32 @@ neodymium.workInProgress = false
284388

285389
# The password of the root certificate for the MITM proxy
286390
# neodymium.localproxy.certificate.password = MITMCertificatePassword
391+
392+
393+
#############################
394+
#
395+
# Allure Report properties
396+
#
397+
#############################
398+
399+
# Enable the saving of links of called pages in the report
400+
# neodymium.report.enableStepLinks =
401+
402+
neodymium.report.showSelenideErrorDetails = false
403+
404+
405+
#############################
406+
#
407+
# Popup Blocker settings
408+
#
409+
#############################
410+
# We introduced a simple popup blocker to get rid of test affecting popups on a webpage.
411+
# To use it just configure add a CSS selector which targets the close button of the popup
412+
# in the format neodymium.popup.<popupName> = <css selector>.
413+
# For example neodymium.popup.newsletter = #newsletterbox > button.close
414+
#
415+
#neodymium.popup.popupname =
416+
#
417+
# The delay between two checks for a popup in milliseconds
418+
#neodymium.popupInterval = 1000
419+

pom.xml

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>com.xceptance</groupId>
66
<artifactId>neodymium-library</artifactId>
7-
<version>5.0.2</version>
7+
<version>5.1.0</version>
88

99
<name>neodymium-library</name>
1010
<url>https://github.com/Xceptance/neodymium-library</url>
@@ -47,15 +47,15 @@
4747
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4848
<maven.compiler.source.version>17</maven.compiler.source.version>
4949
<maven.compiler.target.version>17</maven.compiler.target.version>
50-
<surefire.version>3.0.0-M5</surefire.version>
51-
<allure.version>2.26.0</allure.version>
52-
<selenide.version>7.4.0</selenide.version>
53-
<cucumber.version>6.9.1</cucumber.version>
50+
<surefire.version>3.5.2</surefire.version>
51+
<allure.version>2.29.0</allure.version>
52+
<selenide.version>7.6.0</selenide.version>
53+
<cucumber.version>7.20.1</cucumber.version>
5454
<browserup.version>2.2.17</browserup.version>
55-
<log4j.version>2.23.1</log4j.version>
56-
<junit.version>4.13.1</junit.version>
57-
<junit.jupiter.version>5.8.0</junit.jupiter.version>
58-
<junit.vintage.version>5.8.0</junit.vintage.version>
55+
<log4j.version>2.24.2</log4j.version>
56+
<junit.version>4.13.2</junit.version>
57+
<junit.jupiter.version>5.11.3</junit.jupiter.version>
58+
<junit.vintage.version>5.11.3</junit.vintage.version>
5959
</properties>
6060

6161
<repositories>
@@ -259,6 +259,21 @@
259259
</reporting>
260260

261261
<dependencies>
262+
<dependency>
263+
<groupId>com.assertthat</groupId>
264+
<artifactId>selenium-shutterbug</artifactId>
265+
<version>1.6</version>
266+
<exclusions>
267+
<exclusion>
268+
<groupId>org.seleniumhq.selenium</groupId>
269+
<artifactId>selenium-java</artifactId>
270+
</exclusion>
271+
<exclusion>
272+
<groupId>org.apache.httpcomponents.client5</groupId>
273+
<artifactId>httpclient5</artifactId>
274+
</exclusion>
275+
</exclusions>
276+
</dependency>
262277
<dependency>
263278
<groupId>xyz.rogfam</groupId>
264279
<artifactId>littleproxy</artifactId>
@@ -298,7 +313,7 @@
298313
<dependency>
299314
<groupId>org.yaml</groupId>
300315
<artifactId>snakeyaml</artifactId>
301-
<version>2.2</version>
316+
<version>2.3</version>
302317
</dependency>
303318
<dependency>
304319
<groupId>io.cucumber</groupId>
@@ -363,22 +378,22 @@
363378
<dependency>
364379
<groupId>org.apache.commons</groupId>
365380
<artifactId>commons-csv</artifactId>
366-
<version>1.10.0</version>
381+
<version>1.12.0</version>
367382
</dependency>
368383
<dependency>
369384
<groupId>org.apache.commons</groupId>
370385
<artifactId>commons-text</artifactId>
371-
<version>1.11.0</version>
386+
<version>1.12.0</version>
372387
</dependency>
373388
<dependency>
374389
<groupId>org.apache.commons</groupId>
375390
<artifactId>commons-lang3</artifactId>
376-
<version>3.14.0</version>
391+
<version>3.17.0</version>
377392
</dependency>
378393
<dependency>
379394
<groupId>org.slf4j</groupId>
380395
<artifactId>slf4j-api</artifactId>
381-
<version>2.0.12</version>
396+
<version>2.0.16</version>
382397
</dependency>
383398
<dependency>
384399
<groupId>org.apache.logging.log4j</groupId>
@@ -401,17 +416,22 @@
401416
<dependency>
402417
<groupId>commons-io</groupId>
403418
<artifactId>commons-io</artifactId>
404-
<version>2.16.0</version>
419+
<version>2.18.0</version>
405420
</dependency>
406421
<dependency>
407422
<groupId>com.google.code.gson</groupId>
408423
<artifactId>gson</artifactId>
409-
<version>2.10.1</version>
424+
<version>2.11.0</version>
410425
</dependency>
411426
<dependency>
412427
<groupId>com.squareup.okhttp3</groupId>
413428
<artifactId>okhttp</artifactId>
414429
<version>4.12.0</version>
415430
</dependency>
431+
<dependency>
432+
<groupId>org.skyscreamer</groupId>
433+
<artifactId>jsonassert</artifactId>
434+
<version>2.0-rc1</version>
435+
</dependency>
416436
</dependencies>
417437
</project>

src/main/java/com/xceptance/neodymium/NeodymiumWebDriverListener.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public class NeodymiumWebDriverListener implements WebDriverListener
1818
@Override
1919
public void beforeFindElement(WebDriver driver, By by)
2020
{
21+
Neodymium.setLastUsedLocator(by);
2122
try
2223
{
2324
if (Neodymium.configuration().debuggingHighlightSelectedElements())
@@ -35,6 +36,7 @@ public void beforeFindElement(WebDriver driver, By by)
3536
@Override
3637
public void beforeFindElements(WebDriver driver, By by)
3738
{
39+
Neodymium.setLastUsedLocator(by);
3840
try
3941
{
4042
if (Neodymium.configuration().debuggingHighlightSelectedElements())
@@ -52,6 +54,7 @@ public void beforeFindElements(WebDriver driver, By by)
5254
@Override
5355
public void beforeFindElement(WebElement element, By locator)
5456
{
57+
Neodymium.setLastUsedLocator(element, locator);
5558
try
5659
{
5760
if (Neodymium.configuration().debuggingHighlightSelectedElements())
@@ -69,6 +72,7 @@ public void beforeFindElement(WebElement element, By locator)
6972
@Override
7073
public void beforeFindElements(WebElement element, By locator)
7174
{
75+
Neodymium.setLastUsedLocator(element, locator);
7276
try
7377
{
7478
if (Neodymium.configuration().debuggingHighlightSelectedElements())

0 commit comments

Comments
 (0)