diff --git a/.github/workflows/appium-app-examples.yml b/.github/workflows/appium-app-examples.yml index 4cb870d6..55cb49f4 100644 --- a/.github/workflows/appium-app-examples.yml +++ b/.github/workflows/appium-app-examples.yml @@ -28,9 +28,9 @@ jobs: steps: - uses: actions/checkout@v7 - name: Set up Java - uses: actions/setup-java@v5 + uses: actions/setup-java@v6 with: - java-version: 21 + java-version: 25 distribution: "temurin" - name: RDC Native App IOS timeout-minutes: 30 diff --git a/.github/workflows/appium-examples.yml b/.github/workflows/appium-examples.yml index b780ce03..beca33cf 100644 --- a/.github/workflows/appium-examples.yml +++ b/.github/workflows/appium-examples.yml @@ -26,9 +26,9 @@ jobs: steps: - uses: actions/checkout@v7 - name: Set up Java - uses: actions/setup-java@v5 + uses: actions/setup-java@v6 with: - java-version: 21 + java-version: 25 distribution: "temurin" - name: Android Native App ${{ matrix.cloud }} timeout-minutes: 30 diff --git a/.github/workflows/appium-mobile-examples.yml b/.github/workflows/appium-mobile-examples.yml index c05af6a4..c65a29bb 100644 --- a/.github/workflows/appium-mobile-examples.yml +++ b/.github/workflows/appium-mobile-examples.yml @@ -27,9 +27,9 @@ jobs: steps: - uses: actions/checkout@v7 - name: Set up Java - uses: actions/setup-java@v5 + uses: actions/setup-java@v6 with: - java-version: 21 + java-version: 25 distribution: "temurin" - name: Mobile Web ${{ matrix.cloud }} ${{ matrix.browser }} timeout-minutes: 30 diff --git a/.github/workflows/best-practice.yml b/.github/workflows/best-practice.yml index c5804894..42f2c26b 100644 --- a/.github/workflows/best-practice.yml +++ b/.github/workflows/best-practice.yml @@ -23,9 +23,9 @@ jobs: steps: - uses: actions/checkout@v7 - name: Set up Java - uses: actions/setup-java@v5 + uses: actions/setup-java@v6 with: - java-version: 21 + java-version: 25 distribution: "temurin" - name: Run tests continue-on-error: true diff --git a/.github/workflows/playwright-examples.yml b/.github/workflows/playwright-examples.yml index ca698c6b..5e61df44 100644 --- a/.github/workflows/playwright-examples.yml +++ b/.github/workflows/playwright-examples.yml @@ -20,9 +20,9 @@ jobs: steps: - uses: actions/checkout@v7 - name: Set up Java - uses: actions/setup-java@v5 + uses: actions/setup-java@v6 with: - java-version: 21 + java-version: 25 distribution: "temurin" - uses: axel-op/googlejavaformat-action@v4 with: @@ -44,9 +44,9 @@ jobs: steps: - uses: actions/checkout@v7 - name: Set up Java - uses: actions/setup-java@v5 + uses: actions/setup-java@v6 with: - java-version: 21 + java-version: 25 distribution: "temurin" - name: Example timeout-minutes: 30 @@ -74,9 +74,9 @@ jobs: steps: - uses: actions/checkout@v7 - name: Set up Java - uses: actions/setup-java@v5 + uses: actions/setup-java@v6 with: - java-version: 21 + java-version: 25 distribution: "temurin" - name: Example timeout-minutes: 30 diff --git a/.github/workflows/selenium-cucumber-examples.yml b/.github/workflows/selenium-cucumber-examples.yml index adb1c2a6..2156dde2 100644 --- a/.github/workflows/selenium-cucumber-examples.yml +++ b/.github/workflows/selenium-cucumber-examples.yml @@ -26,9 +26,9 @@ jobs: steps: - uses: actions/checkout@v7 - name: Set up Java - uses: actions/setup-java@v5 + uses: actions/setup-java@v6 with: - java-version: 21 + java-version: 25 distribution: "temurin" - name: Run tests timeout-minutes: 30 diff --git a/.github/workflows/selenium-junit4-examples.yml b/.github/workflows/selenium-junit4-examples.yml index 135f1c2b..9c2239b4 100644 --- a/.github/workflows/selenium-junit4-examples.yml +++ b/.github/workflows/selenium-junit4-examples.yml @@ -21,9 +21,9 @@ jobs: steps: - uses: actions/checkout@v7 - name: Set up Java - uses: actions/setup-java@v5 + uses: actions/setup-java@v6 with: - java-version: 21 + java-version: 25 distribution: "temurin" - uses: axel-op/googlejavaformat-action@v4 with: @@ -42,9 +42,9 @@ jobs: steps: - uses: actions/checkout@v7 - name: Set up Java - uses: actions/setup-java@v5 + uses: actions/setup-java@v6 with: - java-version: 21 + java-version: 25 distribution: "temurin" - name: Run JUnit 4 Tests timeout-minutes: 30 diff --git a/.github/workflows/selenium-junit5-examples.yml b/.github/workflows/selenium-junit5-examples.yml index ce544976..d9826302 100644 --- a/.github/workflows/selenium-junit5-examples.yml +++ b/.github/workflows/selenium-junit5-examples.yml @@ -23,9 +23,9 @@ jobs: steps: - uses: actions/checkout@v7 - name: Set up Java - uses: actions/setup-java@v5 + uses: actions/setup-java@v6 with: - java-version: 21 + java-version: 25 distribution: "temurin" - uses: axel-op/googlejavaformat-action@v4 with: @@ -45,9 +45,9 @@ jobs: steps: - uses: actions/checkout@v7 - name: Set up Java - uses: actions/setup-java@v5 + uses: actions/setup-java@v6 with: - java-version: 21 + java-version: 25 distribution: "temurin" - name: Run JUnit 5 tests timeout-minutes: 30 diff --git a/.github/workflows/testng.yml b/.github/workflows/testng.yml index 21cb32be..8a4e9341 100644 --- a/.github/workflows/testng.yml +++ b/.github/workflows/testng.yml @@ -30,9 +30,9 @@ jobs: steps: - uses: actions/checkout@v7 - name: Set up Java - uses: actions/setup-java@v5 + uses: actions/setup-java@v6 with: - java-version: 21 + java-version: 25 distribution: "temurin" - name: Run TestNG tests timeout-minutes: 30 diff --git a/appium-junit4-cucumber-examples/pom.xml b/appium-junit4-cucumber-examples/pom.xml index 8452b410..fda5b07a 100644 --- a/appium-junit4-cucumber-examples/pom.xml +++ b/appium-junit4-cucumber-examples/pom.xml @@ -21,13 +21,13 @@ io.cucumber cucumber-java - 7.34.6 + 8.0.4 test io.cucumber cucumber-junit - 7.34.6 + 8.0.4 test @@ -43,7 +43,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.15.0 + 3.16.0 ${maven.compiler.source} ${maven.compiler.source} diff --git a/appium/android-app/pom.xml b/appium/android-app/pom.xml index 8c46836d..b6bd344e 100644 --- a/appium/android-app/pom.xml +++ b/appium/android-app/pom.xml @@ -19,7 +19,7 @@ org.junit.jupiter junit-jupiter - 6.1.2 + 6.1.3 test @@ -35,7 +35,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.6 + 3.6.0 diff --git a/appium/appium-app/appium-app-best-practice/pom.xml b/appium/appium-app/appium-app-best-practice/pom.xml index 63c7dab1..841cecd2 100644 --- a/appium/appium-app/appium-app-best-practice/pom.xml +++ b/appium/appium-app/appium-app-best-practice/pom.xml @@ -14,7 +14,7 @@ myDemoTests.xml 7.12.0 10.1.1 - 4.46.0 + 4.50.0 21 21 @@ -72,7 +72,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.15.0 + 3.16.0 ${maven.compiler.source} ${maven.compiler.source} @@ -81,7 +81,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.6 + 3.6.0 ${testngXmlDir}/${testngXmlFile} diff --git a/appium/appium-app/appium-app-examples/pom.xml b/appium/appium-app/appium-app-examples/pom.xml index 1d7e8fda..57742458 100644 --- a/appium/appium-app/appium-app-examples/pom.xml +++ b/appium/appium-app/appium-app-examples/pom.xml @@ -10,9 +10,9 @@ 1.0-SNAPSHOT - 3.5.6 + 3.6.0 10.1.1 - 4.46.0 + 4.50.0 21 21 UTF-8 @@ -82,7 +82,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.15.0 + 3.16.0 ${maven.compiler.source} ${maven.compiler.source} @@ -93,9 +93,14 @@ maven-surefire-plugin ${maven.surefire.version} - all - 30 - true + + + junit.vintage.execution.parallel.enabled = true + junit.vintage.execution.parallel.classes = true + junit.vintage.execution.parallel.methods = true + junit.vintage.execution.parallel.pool-size = 30 + + false diff --git a/appium/mobile-web/pom.xml b/appium/mobile-web/pom.xml index 0d899cb6..5ef71c38 100644 --- a/appium/mobile-web/pom.xml +++ b/appium/mobile-web/pom.xml @@ -19,7 +19,7 @@ org.junit.jupiter junit-jupiter - 6.1.2 + 6.1.3 test @@ -41,7 +41,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.6 + 3.6.0 diff --git a/best-practice/pom.xml b/best-practice/pom.xml index 0439c55b..3a22928d 100644 --- a/best-practice/pom.xml +++ b/best-practice/pom.xml @@ -12,10 +12,10 @@ Sauce Labs Best Practices - 4.46.0 + 4.50.0 10.1.1 1.5.0 - 3.5.6 + 3.6.0 21 21 UTF-8 @@ -51,7 +51,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.15.0 + 3.16.0 ${maven.compiler.source} ${maven.compiler.source} @@ -62,9 +62,14 @@ maven-surefire-plugin ${maven.surefire.version} - methods - 100 - true + + + junit.vintage.execution.parallel.enabled = true + junit.vintage.execution.parallel.classes = false + junit.vintage.execution.parallel.methods = true + junit.vintage.execution.parallel.pool-size = 100 + + false diff --git a/best-practice/src/test/java/com/saucedemo/tests/EmuSimWebAppTests.java b/best-practice/src/test/java/com/saucedemo/tests/EmuSimWebAppTests.java index e4403d2d..8f776a98 100644 --- a/best-practice/src/test/java/com/saucedemo/tests/EmuSimWebAppTests.java +++ b/best-practice/src/test/java/com/saucedemo/tests/EmuSimWebAppTests.java @@ -8,6 +8,7 @@ import com.saucedemo.pages.LoginPage; import com.saucedemo.pages.ProductsPage; import java.net.MalformedURLException; +import java.time.Duration; import java.util.Arrays; import java.util.Collection; import org.junit.Before; @@ -16,7 +17,9 @@ import org.junit.runners.Parameterized; import org.openqa.selenium.MutableCapabilities; import org.openqa.selenium.TimeoutException; +import org.openqa.selenium.remote.HttpCommandExecutor; import org.openqa.selenium.remote.RemoteWebDriver; +import org.openqa.selenium.remote.http.ClientConfig; /** Emulator / Simulator Web Tests. */ @RunWith(Parameterized.class) @@ -75,7 +78,12 @@ public void setUp() throws MalformedURLException { capabilities.setCapability("sauce:options", sauceOptions); // EmuSim devices have Simulator/Emulator in the name - driver = new RemoteWebDriver(Endpoints.getEmuSimHub(), capabilities); + // Simulators can take longer to start than Selenium's default 3-minute read timeout + ClientConfig clientConfig = + ClientConfig.defaultConfig() + .baseUrl(Endpoints.getEmuSimHub()) + .readTimeout(Duration.ofMinutes(6)); + driver = new RemoteWebDriver(new HttpCommandExecutor(clientConfig), capabilities); } @Test diff --git a/playwright-examples/pom.xml b/playwright-examples/pom.xml index b4c52b8b..b23979dc 100644 --- a/playwright-examples/pom.xml +++ b/playwright-examples/pom.xml @@ -27,7 +27,7 @@ org.junit.jupiter junit-jupiter - 6.1.2 + 6.1.3 test @@ -42,7 +42,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.6 + 3.6.0 **/StandaloneTest.java diff --git a/selenium-cucumber-examples/pom.xml b/selenium-cucumber-examples/pom.xml index eabba307..8a73d0fc 100644 --- a/selenium-cucumber-examples/pom.xml +++ b/selenium-cucumber-examples/pom.xml @@ -19,18 +19,18 @@ io.cucumber cucumber-java - 7.34.6 + 8.0.4 io.cucumber cucumber-picocontainer - 7.34.6 + 8.0.4 test io.cucumber cucumber-testng - 7.34.6 + 8.0.4 org.testng @@ -60,7 +60,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.6 + 3.6.0 6 false @@ -70,21 +70,15 @@ -Dfile.encoding=UTF-8 false - **/*AT.class + **/*AT.java true - - - listener - com.saucedemo.selenium.cucumber.RetryListener - - org.apache.maven.plugins maven-compiler-plugin - 3.15.0 + 3.16.0 ${maven.compiler.source} ${maven.compiler.source} diff --git a/selenium-cucumber-examples/src/test/java/com/saucedemo/selenium/cucumber/RetryListener.java b/selenium-cucumber-examples/src/test/java/com/saucedemo/selenium/cucumber/RetryListener.java deleted file mode 100644 index 0ab7a214..00000000 --- a/selenium-cucumber-examples/src/test/java/com/saucedemo/selenium/cucumber/RetryListener.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.saucedemo.selenium.cucumber; - -import java.lang.reflect.Constructor; -import java.lang.reflect.Method; -import org.testng.IAnnotationTransformer; -import org.testng.IRetryAnalyzer; -import org.testng.ITestResult; -import org.testng.annotations.ITestAnnotation; - -/** - * Retries failed tests, since Surefire's rerunFailingTestsCount does not support TestNG. Reads the - * same property so retries are enabled the same way as in the JUnit modules: - * mvn test -Dsurefire.rerunFailingTestsCount=2 - */ -public class RetryListener implements IAnnotationTransformer { - @Override - public void transform( - ITestAnnotation annotation, Class testClass, Constructor testConstructor, Method testMethod) { - annotation.setRetryAnalyzer(Analyzer.class); - } - - public static class Analyzer implements IRetryAnalyzer { - private static final int MAX_RETRIES = - Integer.getInteger("surefire.rerunFailingTestsCount", 0); - private int retries = 0; - - @Override - public boolean retry(ITestResult result) { - return retries++ < MAX_RETRIES; - } - } -} diff --git a/selenium-junit4-examples/pom.xml b/selenium-junit4-examples/pom.xml index d584ba90..0bef51f2 100644 --- a/selenium-junit4-examples/pom.xml +++ b/selenium-junit4-examples/pom.xml @@ -36,7 +36,7 @@ org.seleniumhq.selenium selenium-java - 4.46.0 + 4.50.0 com.titusfortner @@ -51,7 +51,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.15.0 + 3.16.0 ${maven.compiler.source} ${maven.compiler.source} @@ -60,11 +60,16 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.6 + 3.6.0 - all - ${surefire.parallel} - true + + + junit.vintage.execution.parallel.enabled = true + junit.vintage.execution.parallel.classes = true + junit.vintage.execution.parallel.methods = true + junit.vintage.execution.parallel.pool-size = ${surefire.parallel} + + false diff --git a/selenium-junit5-examples/pom.xml b/selenium-junit5-examples/pom.xml index d27a0713..cc859c2b 100644 --- a/selenium-junit5-examples/pom.xml +++ b/selenium-junit5-examples/pom.xml @@ -28,7 +28,7 @@ 10 - 4.46.0 + 4.50.0 21 21 UTF-8 @@ -44,13 +44,13 @@ org.junit.jupiter junit-jupiter-engine - 6.1.2 + 6.1.3 test com.deque.html.axe-core selenium - 4.12.0 + 4.13.0 test @@ -60,7 +60,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.15.0 + 3.16.0 ${maven.compiler.source} ${maven.compiler.source} @@ -69,7 +69,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.6 + 3.6.0 diff --git a/selenium-junit5-examples/src/test/java/com/saucedemo/selenium/selenium_features/DevToolsTest.java b/selenium-junit5-examples/src/test/java/com/saucedemo/selenium/selenium_features/DevToolsTest.java index b4516ba3..e65d881b 100644 --- a/selenium-junit5-examples/src/test/java/com/saucedemo/selenium/selenium_features/DevToolsTest.java +++ b/selenium-junit5-examples/src/test/java/com/saucedemo/selenium/selenium_features/DevToolsTest.java @@ -43,13 +43,13 @@ import org.openqa.selenium.devtools.DevTools; import org.openqa.selenium.devtools.HasDevTools; import org.openqa.selenium.devtools.NetworkInterceptor; -import org.openqa.selenium.devtools.v148.browser.Browser; -import org.openqa.selenium.devtools.v148.emulation.Emulation; -import org.openqa.selenium.devtools.v148.network.Network; -import org.openqa.selenium.devtools.v148.network.model.Headers; -import org.openqa.selenium.devtools.v148.performance.Performance; -import org.openqa.selenium.devtools.v148.performance.model.Metric; -import org.openqa.selenium.devtools.v148.runtime.Runtime; +import org.openqa.selenium.devtools.v154.browser.Browser; +import org.openqa.selenium.devtools.v154.emulation.Emulation; +import org.openqa.selenium.devtools.v154.network.Network; +import org.openqa.selenium.devtools.v154.network.model.Headers; +import org.openqa.selenium.devtools.v154.performance.Performance; +import org.openqa.selenium.devtools.v154.performance.model.Metric; +import org.openqa.selenium.devtools.v154.runtime.Runtime; import org.openqa.selenium.logging.HasLogEvents; import org.openqa.selenium.remote.Augmenter; import org.openqa.selenium.remote.http.ClientConfig; diff --git a/selenium-testng-examples/pom.xml b/selenium-testng-examples/pom.xml index 7598d711..55bb7544 100644 --- a/selenium-testng-examples/pom.xml +++ b/selenium-testng-examples/pom.xml @@ -13,7 +13,7 @@ 1.5.0 - 3.5.6 + 3.6.0 21 21 UTF-8 @@ -38,12 +38,6 @@ methods 10 false - - - listener - com.saucedemo.selenium.testng.RetryListener - - diff --git a/selenium-testng-examples/src/test/java/com/saucedemo/selenium/testng/RetryListener.java b/selenium-testng-examples/src/test/java/com/saucedemo/selenium/testng/RetryListener.java deleted file mode 100644 index 68edc7cb..00000000 --- a/selenium-testng-examples/src/test/java/com/saucedemo/selenium/testng/RetryListener.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.saucedemo.selenium.testng; - -import java.lang.reflect.Constructor; -import java.lang.reflect.Method; -import org.testng.IAnnotationTransformer; -import org.testng.IRetryAnalyzer; -import org.testng.ITestResult; -import org.testng.annotations.ITestAnnotation; - -/** - * Retries failed tests, since Surefire's rerunFailingTestsCount does not support TestNG. Reads the - * same property so retries are enabled the same way as in the JUnit modules: - * mvn test -Dsurefire.rerunFailingTestsCount=2 - */ -public class RetryListener implements IAnnotationTransformer { - @Override - public void transform( - ITestAnnotation annotation, Class testClass, Constructor testConstructor, Method testMethod) { - annotation.setRetryAnalyzer(Analyzer.class); - } - - public static class Analyzer implements IRetryAnalyzer { - private static final int MAX_RETRIES = - Integer.getInteger("surefire.rerunFailingTestsCount", 0); - private int retries = 0; - - @Override - public boolean retry(ITestResult result) { - return retries++ < MAX_RETRIES; - } - } -}