Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
oomelianchuk committed Dec 5, 2024
2 parents 239f011 + 9151d7e commit d77768f
Show file tree
Hide file tree
Showing 138 changed files with 7,701 additions and 419 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ hs_err_pid*
/.classpath
/.project
/.settings/
/bin/
build
dev-*.properties
temp-*.properties
embeddedLocalProxySelfSignedRootCertificate.p12
/bin/
/allure-results/
23 changes: 21 additions & 2 deletions config/browser.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#
################################################################################
#
# Mandatory properties
# Mandatory properties
#
#################################################################################
#
Expand All @@ -37,7 +37,7 @@
#
################################################################################
#
# Global properties
# Global properties
#
#################################################################################
#
Expand Down Expand Up @@ -132,11 +132,30 @@ browserprofile.Chrome_1500x1000_headless.browserResolution = 1500x1000
browserprofile.Chrome_1500x1000_headless.arguments = -ignore-certificate-errors
browserprofile.Chrome_1500x1000_headless.headless = true

browserprofile.FF_with_args.name = FF with args
browserprofile.FF_with_args.headless = true
browserprofile.FF_with_args.browserResolution = 1024x768
browserprofile.FF_with_args.browser = firefox
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

browserprofile.Chrome_with_args.name = Chrome with args
browserprofile.Chrome_with_args.headless = true
browserprofile.Chrome_with_args.browserResolution = 1024x768
browserprofile.Chrome_with_args.browser = chrome
browserprofile.Chrome_with_args.driverArgs=--port=7100 ; --allowed-origins=localhost, xceptance.com; --log-level=INFO


# Small Firefox
browserprofile.FF_1024x768.name = Firefox 1024x768
browserprofile.FF_1024x768.browser = firefox
browserprofile.FF_1024x768.browserResolution = 1024x768

# Small headless Firefox
browserprofile.FF_headless.name = Firefox Headless
browserprofile.FF_headless.browser = firefox
browserprofile.FF_headless.browserResolution = 1024x768
browserprofile.FF_headless.headless = true

# Local Firefox but with larger window size
browserprofile.FF_1500x1000.name = Latest local Firefox 1500x1000
browserprofile.FF_1500x1000.browser = firefox
Expand Down
133 changes: 133 additions & 0 deletions config/neodymium.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,24 @@
#
#########
#
# URL blocking
#
#########
#
# To ensure the automation process is not taking a wrong turn (e.g. thought misconfigured links),
# we provide a way to break a test, if a blocked URL or an URL which does not match a configured
# include list is called.
# This is only targeting the main page URL, background calls are not covered.
# NOTE: The URLs needs to be provided as Regular Expressions, so be aware of special regex relevant characters!
#
# List of excluded URLS seperated by whitespaces
# neodymium.url.excludeList = ^http://prod.example.com/[?]testmode=true ^https://stg.example.com
#
# List of included URLS seperated by whitespaces
# neodymium.url.includeList = ^http://dev.example.com ^https://stg.example.com
#
#########
#
# Localization
#
#########
Expand Down Expand Up @@ -140,6 +158,49 @@
# Whether or not a screenshot should be taken per step
# neodymium.allureAddons.screenshots.perstep.always = false
#
#############################
#
# Advanced screenshot properties
#
#############################

# Enables advanced screenshot capabilities with additional features
# When set to true, provides more sophisticated screenshot taking mechanisms
neodymium.screenshots.enableAdvancedScreenshots = true

# Controls whether screenshots are taken for successful test scenarios
# When set to false, screenshots will not be captured for passing tests
neodymium.screenshots.enableOnSuccess = false

# Enables full-page screenshot capture, capturing entire page content beyond visible viewport
# Useful for long web pages or scrollable content
neodymium.screenshots.fullpagecapture.enable = true

# Determines if the current viewport should be visually highlighted during full-page capture
# When false, no visual indication of current viewport is added
neodymium.screenshots.fullpagecapture.highlightViewport = false

# Controls the directory structure for storing screenshots
# When false, uses a flat directory structure instead of a nested tree-like structure
neodymium.screenshots.enableTreeDirectoryStructure = false

# Sets the highlight color for the viewport during full-page capture
# Uses hexadecimal color code, in this case bright red
neodymium.screenshots.fullpagecapture.highlightColor= #FF0000

# Enables highlighting of the last interacted or focused element in the screenshot
# Helps identify the final state or location of interaction
neodymium.screenshots.highlightLastElement = true

# Sets the highlight color for the last element
# Uses hexadecimal color code
neodymium.screenshots.element.highlightColor = #FF00FF

# Defines the thickness of highlight lines when elements are marked
# Higher values create thicker, more prominent highlight borders
neodymium.screenshots.highlightLineThickness = 4


#############################
#
# DataUtils properties
Expand Down Expand Up @@ -226,6 +287,49 @@ neodymium.webDriver.keepBrowserOpenOnFailure = false
# If false: all tests of a test class are executed
neodymium.workInProgress = false

# If true: the test data json of the corresponding test gets attached to the allure report
# If false: the test data json of the corresponding test does not get attached to the allure report
neodymium.report.enableTestDataInReport = true

#############################
#
# Lighthouse
#
#############################

# Specifies the path to the Lighthouse executable
# If Lighthouse is globally installed and available in PATH, use only the name of the Lighthouse binary
# If Lighthouse is not globally installed and available in PATH, use the absolute/relative path to the Lighthouse binary
neodymium.lighthouse.binaryPath = lighthouse

# Specifies the minimum acceptable score for the performance category in Lighthouse reports
# If the Lighthouse performance score falls below this threshold, the test will fail
# Range: 0.0 - 1.0 (representing 0% to 100%)
# The actual value for the performance score varies alot, so consider using a lower threshold to avoid a lot of false alerts
neodymium.lighthouse.assert.thresholdScore.performance = 0.5

# Specifies the minimum acceptable score for the accessibility category in Lighthouse reports
# If the Lighthouse accessibility score falls below this threshold, the test will fail
# Range: 0.0 - 1.0 (representing 0% to 100%)
# The actual value for the accessibility score varies alot, so consider using a lower threshold to avoid a lot of false alerts
neodymium.lighthouse.assert.thresholdScore.accessibility = 0.5

# Specifies the minimum acceptable score for the best practices category in Lighthouse reports
# If the Lighthouse best practices score falls below this threshold, the test will fail
# Range: 0.0 - 1.0 (representing 0% to 100%)
# The actual value for the best practices score varies alot, so consider using a lower threshold to avoid a lot of false alerts
neodymium.lighthouse.assert.thresholdScore.bestPractices = 0.5

# Specifies the minimum acceptable score for the seo category in Lighthouse reports
# If the Lighthouse seo score falls below this threshold, the test will fail
# Range: 0.0 - 1.0 (representing 0% to 100%)
# The actual value for the seo score varies alot, so consider using a lower threshold to avoid a lot of false alerts
neodymium.lighthouse.assert.thresholdScore.seo = 0.5

# To be able to validate Lighthouse report audits, we use internal json id's from the report itself
# 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
#neodymium.lighthouse.assert.audits =

#############################
#
# Proxy configuration properties
Expand Down Expand Up @@ -284,3 +388,32 @@ neodymium.workInProgress = false

# The password of the root certificate for the MITM proxy
# neodymium.localproxy.certificate.password = MITMCertificatePassword


#############################
#
# Allure Report properties
#
#############################

# Enable the saving of links of called pages in the report
# neodymium.report.enableStepLinks =

neodymium.report.showSelenideErrorDetails = false


#############################
#
# Popup Blocker settings
#
#############################
# We introduced a simple popup blocker to get rid of test affecting popups on a webpage.
# To use it just configure add a CSS selector which targets the close button of the popup
# in the format neodymium.popup.<popupName> = <css selector>.
# For example neodymium.popup.newsletter = #newsletterbox > button.close
#
#neodymium.popup.popupname =
#
# The delay between two checks for a popup in milliseconds
#neodymium.popupInterval = 1000

52 changes: 36 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.xceptance</groupId>
<artifactId>neodymium-library</artifactId>
<version>5.0.2</version>
<version>5.1.0</version>

<name>neodymium-library</name>
<url>https://github.com/Xceptance/neodymium-library</url>
Expand Down Expand Up @@ -47,15 +47,15 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source.version>17</maven.compiler.source.version>
<maven.compiler.target.version>17</maven.compiler.target.version>
<surefire.version>3.0.0-M5</surefire.version>
<allure.version>2.26.0</allure.version>
<selenide.version>7.4.0</selenide.version>
<cucumber.version>6.9.1</cucumber.version>
<surefire.version>3.5.2</surefire.version>
<allure.version>2.29.0</allure.version>
<selenide.version>7.6.0</selenide.version>
<cucumber.version>7.20.1</cucumber.version>
<browserup.version>2.2.17</browserup.version>
<log4j.version>2.23.1</log4j.version>
<junit.version>4.13.1</junit.version>
<junit.jupiter.version>5.8.0</junit.jupiter.version>
<junit.vintage.version>5.8.0</junit.vintage.version>
<log4j.version>2.24.2</log4j.version>
<junit.version>4.13.2</junit.version>
<junit.jupiter.version>5.11.3</junit.jupiter.version>
<junit.vintage.version>5.11.3</junit.vintage.version>
</properties>

<repositories>
Expand Down Expand Up @@ -259,6 +259,21 @@
</reporting>

<dependencies>
<dependency>
<groupId>com.assertthat</groupId>
<artifactId>selenium-shutterbug</artifactId>
<version>1.6</version>
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>xyz.rogfam</groupId>
<artifactId>littleproxy</artifactId>
Expand Down Expand Up @@ -298,7 +313,7 @@
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>2.2</version>
<version>2.3</version>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
Expand Down Expand Up @@ -363,22 +378,22 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.10.0</version>
<version>1.12.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.11.0</version>
<version>1.12.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.14.0</version>
<version>3.17.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.12</version>
<version>2.0.16</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
Expand All @@ -401,17 +416,22 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.16.0</version>
<version>2.18.0</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.12.0</version>
</dependency>
<dependency>
<groupId>org.skyscreamer</groupId>
<artifactId>jsonassert</artifactId>
<version>2.0-rc1</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class NeodymiumWebDriverListener implements WebDriverListener
@Override
public void beforeFindElement(WebDriver driver, By by)
{
Neodymium.setLastUsedLocator(by);
try
{
if (Neodymium.configuration().debuggingHighlightSelectedElements())
Expand All @@ -35,6 +36,7 @@ public void beforeFindElement(WebDriver driver, By by)
@Override
public void beforeFindElements(WebDriver driver, By by)
{
Neodymium.setLastUsedLocator(by);
try
{
if (Neodymium.configuration().debuggingHighlightSelectedElements())
Expand All @@ -52,6 +54,7 @@ public void beforeFindElements(WebDriver driver, By by)
@Override
public void beforeFindElement(WebElement element, By locator)
{
Neodymium.setLastUsedLocator(element, locator);
try
{
if (Neodymium.configuration().debuggingHighlightSelectedElements())
Expand All @@ -69,6 +72,7 @@ public void beforeFindElement(WebElement element, By locator)
@Override
public void beforeFindElements(WebElement element, By locator)
{
Neodymium.setLastUsedLocator(element, locator);
try
{
if (Neodymium.configuration().debuggingHighlightSelectedElements())
Expand Down
Loading

0 comments on commit d77768f

Please sign in to comment.