Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removing parent pom, making all projects independent from each other
Browse files Browse the repository at this point in the history
mmerrell committed Jan 29, 2025

Verified

This commit was signed with the committer’s verified signature.
fpapon François Papon
1 parent 8d451c6 commit abe8bb2
Showing 43 changed files with 248 additions and 371 deletions.
64 changes: 31 additions & 33 deletions appium-junit4-cucumber-examples/pom.xml
Original file line number Diff line number Diff line change
@@ -2,41 +2,39 @@
<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">
<parent>
<artifactId>demo-java</artifactId>
<groupId>com.saucelabs</groupId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<properties>
<appium.version>9.4.0</appium.version>
</properties>
<modelVersion>4.0.0</modelVersion>
<name>Sauce Labs Appium/Junit4/Cucumber Examples</name>

<artifactId>appium-junit4-cucumber-examples</artifactId>
<dependencies>
<!-- Appium dependency is in project level POM.xml -->
<!-- Maven Surefire dependency is in project level POM.xml -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>7.20.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>7.20.1</version>
<scope>test</scope>
</dependency>
<properties>
<appium.version>9.4.0</appium.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>${appium.version}</version>
<scope>test</scope>
</dependency>
<groupId>com.saucelabs</groupId>
<artifactId>appium-junit4-cucumber-examples</artifactId>
<version>1.0-SNAPSHOT</version>

</dependencies>
<dependencies>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>7.20.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>7.20.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>${appium.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -20,8 +20,8 @@ public class StepDefinitions {
private IOSDriver driver;
private WebDriverWait wait;
public SauceTestWatcher resultReportingTestWatcher = new SauceTestWatcher();
private String SAUCE_EU_URL = "https://ondemand.eu-central-1.saucelabs.com/wd/hub";
private String SAUCE_US_URL = "https://ondemand.us-west-1.saucelabs.com:443/wd/hub";
private final String SAUCE_EU_URL = "https://ondemand.eu-central-1.saucelabs.com/wd/hub";
private final String SAUCE_US_URL = "https://ondemand.us-west-1.saucelabs.com/wd/hub";
public static final String region = System.getProperty("region", "us");

@io.cucumber.java.Before
@@ -41,7 +41,7 @@ public void setUp(Scenario scenario) throws MalformedURLException {
}

capabilities.setCapability("platformName", "iOS");
capabilities.setCapability("automationName", "XCuiTest");
capabilities.setCapability("automationName", "XCUITest");
//Allocate any avilable iPhone device with version 14
capabilities.setCapability("appium:deviceName", "iPhone.*");
capabilities.setCapability("appium:platformVersion", "14");
@@ -58,7 +58,6 @@ public void setUp(Scenario scenario) throws MalformedURLException {

driver = new IOSDriver(url, capabilities);

//Setting the driver so that we can report results
resultReportingTestWatcher.setDriver(driver);
}

7 changes: 1 addition & 6 deletions appium/appium-app/appium-app-best-practice/pom.xml
Original file line number Diff line number Diff line change
@@ -2,12 +2,7 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>demo-java</artifactId>
<groupId>com.saucelabs</groupId>
<version>1.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>

<artifactId>appium-app-best-practice</artifactId>
7 changes: 1 addition & 6 deletions appium/appium-app/appium-app-examples/pom.xml
Original file line number Diff line number Diff line change
@@ -2,12 +2,7 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>demo-java</artifactId>
<groupId>com.saucelabs</groupId>
<version>1.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>

<artifactId>appium-app-examples</artifactId>
52 changes: 10 additions & 42 deletions appium/appium-web/appium-web-examples/pom.xml
Original file line number Diff line number Diff line change
@@ -2,23 +2,24 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>demo-java</artifactId>
<groupId>com.saucelabs</groupId>
<version>1.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>

<artifactId>appium-web-examples</artifactId>
<groupId>com.saucelabs</groupId>
<version>1.0-SNAPSHOT</version>

<name>Sauce Labs Appium Web</name>

<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.surefire.version>3.5.2</maven.surefire.version>
<appium.version>9.4.0</appium.version>
<selenium.version>4.28.1</selenium.version>
</properties>

<!-- You will find Junit and Appium configuration in the project level pom.xml -->
<dependencies>

<!-- Apache Commons Logging -->
@@ -27,56 +28,23 @@
<artifactId>commons-logging</artifactId>
<version>1.3.4</version>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
</dependency>

<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.27.3</version>
</dependency>

<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>${appium.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
</exclusion>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-support</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-support</artifactId>
<version>${selenium.version}</version>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
@@ -93,4 +61,4 @@
</plugins>
</build>

</project>
</project>
Original file line number Diff line number Diff line change
@@ -22,23 +22,20 @@
* Android Native App Tests
*/
public class AndroidWebAppTest {


@Rule
public TestName name = new TestName();

//This rule allows us to set test status with Junit
@Rule
public SauceAppiumTestWatcher resultReportingTestWatcher = new SauceAppiumTestWatcher();

private AppiumDriver driver;
private AndroidDriver driver;

By usernameInput = By.id("user-name");
By passwordInput = By.id("password");
By submitButton = By.className("btn_action");
By inventoryList = By.className("inventory_list");


@Before
public void setup() throws MalformedURLException {
System.out.println("Sauce Android Web App - Before hook");
@@ -47,17 +44,10 @@ public void setup() throws MalformedURLException {
MutableCapabilities sauceOptions = new MutableCapabilities();
URL url;

switch (region) {
case "us":
url = new URL(SAUCE_US_URL);
System.out.println("Sauce REGION US");
break;
case "eu":
default:
url = new URL(SAUCE_EU_URL);
System.out.println("Sauce REGION EU");
break;
}
url = switch (region) {
case "us" -> new URL(SAUCE_US_URL);
default -> new URL(SAUCE_EU_URL);
};

// For all capabilities please check
// http://appium.io/docs/en/writing-running-appium/caps/#general-capabilities
@@ -87,13 +77,8 @@ public void setup() throws MalformedURLException {

capabilities.setCapability("sauce:options", sauceOptions);

try {
driver = new AndroidDriver(url, capabilities);
} catch (Exception e){
System.out.println("Error to create Android Driver: " + e.getMessage());
return;
}
//Setting the driver so that we can report results
driver = new AndroidDriver(url, capabilities);

resultReportingTestWatcher.setDriver(driver);
}

@@ -110,26 +95,15 @@ public void loginToSwagLabsWebTestValid() {
} catch (InterruptedException e) {
e.printStackTrace();
}
// Verificsation
Assert.assertTrue(isOnProductsPage());

}

public void login(String user, String pass){

driver.findElement(usernameInput).sendKeys(user);
driver.findElement(passwordInput).sendKeys(pass);
driver.findElement(submitButton).click();

}

public boolean isOnProductsPage() {

return driver.findElement(inventoryList).isDisplayed();
}





}
Original file line number Diff line number Diff line change
@@ -41,15 +41,10 @@ public void setUp() throws MalformedURLException {
URL url;
String appName;

switch (region) {
case "us":
url = new URL(SAUCE_US_URL);
break;
case "eu":
default:
url = new URL(SAUCE_EU_URL);
break;
}
url = switch (region) {
case "us" -> new URL(SAUCE_US_URL);
default -> new URL(SAUCE_EU_URL);
};

// For all capabilities please check
// http://appium.io/docs/en/writing-running-appium/caps/#general-capabilities
@@ -77,13 +72,8 @@ public void setUp() throws MalformedURLException {
sauceOptions.setCapability("accessKey", System.getenv("SAUCE_ACCESS_KEY"));
capabilities.setCapability("sauce:options", sauceOptions);

try {
driver = new IOSDriver(url, capabilities);
} catch (Exception e){
System.out.println("Error to create iOS Driver: " + e.getMessage());
}

//Setting the driver so that we can report results
resultReportingTestWatcher.setDriver(driver);
}

@@ -100,21 +90,16 @@ public void loginToSwagLabsWebTestValid() {
} catch (InterruptedException e) {
e.printStackTrace();
}
// Verificsation
Assert.assertTrue(isOnProductsPage());

}

public void login(String user, String pass){

driver.findElement(usernameInput).sendKeys(user);
driver.findElement(passwordInput).sendKeys(pass);
driver.findElement(submitButton).click();

}

public boolean isOnProductsPage() {

return driver.findElement(inventoryList).isDisplayed();
}

Original file line number Diff line number Diff line change
@@ -6,6 +6,6 @@ public class Constants {
public static final String rdc = System.getProperty("rdc", "true");

public static final String SAUCE_EU_URL = "https://ondemand.eu-central-1.saucelabs.com/wd/hub";
public static final String SAUCE_US_URL = "https://ondemand.us-west-1.saucelabs.com:443/wd/hub";
public static final String SAUCE_US_URL = "https://ondemand.us-west-1.saucelabs.com/wd/hub";

}
19 changes: 10 additions & 9 deletions best-practice/pom.xml
Original file line number Diff line number Diff line change
@@ -2,18 +2,23 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>demo-java</artifactId>
<groupId>com.saucelabs</groupId>
<version>1.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>

<groupId>com.saucelabs</groupId>
<artifactId>best-practice</artifactId>
<version>1.0-SNAPSHOT</version>

<name>Sauce Labs Best Practices</name>

<properties>
<selenium.version>4.28.1</selenium.version>
<appium.version>9.4.0</appium.version>
<sauce_junit4.version>1.5.0</sauce_junit4.version>
<maven.surefire.version>3.5.1</maven.surefire.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
@@ -23,26 +28,22 @@
<version>${sauce_junit4.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
<version>${selenium.version}</version>
</dependency>

<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>${selenium.version}</version>
</dependency>

<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>${appium.version}</version>
<scope>test</scope>
</dependency>

</dependencies>

<build>
16 changes: 9 additions & 7 deletions gitpod/pom.xml
Original file line number Diff line number Diff line change
@@ -2,21 +2,23 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>demo-java</artifactId>
<groupId>com.saucelabs</groupId>
<version>1.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>

<groupId>com.saucelabs</groupId>
<artifactId>gitpod</artifactId>
<version>1.0-SNAPSHOT</version>

<name>Sauce Labs Gitpod Examples</name>

<properties>
<maven.surefire.version>3.5.2</maven.surefire.version>
<appium.version>9.4.0</appium.version>
<selenium.version>4.28.1</selenium.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.surefire.version>3.5.2</maven.surefire.version>
</properties>

<dependencies>
<dependency>
<groupId>com.saucelabs</groupId>
3 changes: 2 additions & 1 deletion playwright-examples/pom.xml
Original file line number Diff line number Diff line change
@@ -7,7 +7,8 @@
<groupId>com.saucelabs</groupId>
<artifactId>playwright-examples</artifactId>
<version>1.0-SNAPSHOT</version>
<name>playwright-examples</name>

<name>Sauce Labs Playwright Examples</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
60 changes: 0 additions & 60 deletions pom.xml

This file was deleted.

183 changes: 97 additions & 86 deletions selenium-cucumber-examples/pom.xml
Original file line number Diff line number Diff line change
@@ -1,92 +1,103 @@
<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">
<parent>
<artifactId>demo-java</artifactId>
<groupId>com.saucelabs</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>selenium-cucumber-examples</artifactId>
<modelVersion>4.0.0</modelVersion>

<dependencies>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>7.20.1</version>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-picocontainer</artifactId>
<version>7.20.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-testng</artifactId>
<version>7.20.1</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.10.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.18.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
</dependency>
</dependencies>
<groupId>com.saucelabs</groupId>
<artifactId>selenium-cucumber-examples</artifactId>
<version>1.0-SNAPSHOT</version>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.version}</version>
<configuration>
<forkCount>6</forkCount>
<reuseForks>false</reuseForks>
<argLine>-Duser.language=en</argLine>
<argLine>-Xmx1024m</argLine>
<argLine>-XX:MaxPermSize=256m</argLine>
<argLine>-Dfile.encoding=UTF-8</argLine>
<useFile>false</useFile>
<includes>
<include>**/*AT.class</include>
</includes>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-resources</id>
<!-- here the phase you need -->
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>target/test-classes/com/yourcompany/saucecucumberjvm</outputDirectory>
<resources>
<resource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<name>Sauce Labs Test Cucumber Examples</name>

<properties>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>7.20.1</version>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-picocontainer</artifactId>
<version>7.20.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-testng</artifactId>
<version>7.20.1</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.10.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.18.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
</dependency>
<dependency>
<groupId>com.saucelabs</groupId>
<artifactId>sauce_bindings</artifactId>
<version>1.6.0</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<forkCount>6</forkCount>
<reuseForks>false</reuseForks>
<argLine>-Duser.language=en</argLine>
<argLine>-Xmx1024m</argLine>
<argLine>-XX:MaxPermSize=256m</argLine>
<argLine>-Dfile.encoding=UTF-8</argLine>
<useFile>false</useFile>
<includes>
<include>**/*AT.class</include>
</includes>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-resources</id>
<!-- here the phase you need -->
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>target/test-classes/com/yourcompany/saucecucumberjvm</outputDirectory>
<resources>
<resource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
107 changes: 53 additions & 54 deletions selenium-junit4-examples/pom.xml
Original file line number Diff line number Diff line change
@@ -2,63 +2,62 @@
<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>
<modelVersion>4.0.0</modelVersion>

<groupId>com.com.saucelabs</groupId>
<artifactId>selenium_junit4_examples</artifactId>
<version>1.0-SNAPSHOT</version>
<groupId>com.com.saucelabs</groupId>
<artifactId>selenium-junit4-examples</artifactId>
<version>1.0-SNAPSHOT</version>

<name>Sauce Labs Selenium Examples</name>
<description>Example code for using Selenium on Sauce labs</description>
<url>https://github.com/saucelabs-training/demo-java</url>
<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
<distribution>repo</distribution>
</license>
</licenses>
<name>Sauce Labs JUnit4 Examples</name>
<description>Example code for using Selenium on Sauce labs</description>
<url>https://github.com/saucelabs-training/demo-java</url>
<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
<distribution>repo</distribution>
</license>
</licenses>

<properties>
<surefire.parallel>10</surefire.parallel>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>com.saucelabs</groupId>
<artifactId>saucebindings-junit4</artifactId>
<version>1.5.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.28.1</version>
</dependency>
<dependency>
<groupId>com.titusfortner</groupId>
<artifactId>selenium-logger</artifactId>
<version>2.4.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>com.saucelabs</groupId>
<artifactId>saucebindings-junit4</artifactId>
<version>1.5.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.28.1</version>
</dependency>
<dependency>
<groupId>com.titusfortner</groupId>
<artifactId>selenium-logger</artifactId>
<version>2.4.0</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.2</version>
<configuration>
<parallel>all</parallel>
<threadCountMethods>${surefire.parallel}</threadCountMethods>
<useUnlimitedThreads>true</useUnlimitedThreads>
<redirectTestOutputToFile>false</redirectTestOutputToFile>
</configuration>
</plugin>
</plugins>
</build>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.2</version>
<configuration>
<parallel>all</parallel>
<threadCountMethods>${surefire.parallel}</threadCountMethods>
<useUnlimitedThreads>true</useUnlimitedThreads>
<redirectTestOutputToFile>false</redirectTestOutputToFile>
</configuration>
</plugin>
</plugins>
</build>
</project>
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -5,10 +5,10 @@
<modelVersion>4.0.0</modelVersion>

<groupId>com.saucelabs</groupId>
<artifactId>selenium-examples</artifactId>
<artifactId>selenium-junit5-examples</artifactId>
<version>1.0-SNAPSHOT</version>

<name>Sauce Labs Selenium Examples</name>
<name>Sauce Labs JUnit5 Examples</name>
<description>Example code for using Selenium on Sauce labs</description>
<url>https://github.com/saucelabs-training/demo-java</url>
<licenses>
@@ -28,8 +28,8 @@

<properties>
<surefire.parallel>10</surefire.parallel>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Original file line number Diff line number Diff line change
@@ -21,7 +21,8 @@ public void setup(TestInfo testInfo) {
public void accessibilityTest() {
driver.navigate().to("https://www.saucedemo.com");

AxeBuilder axeBuilder = new AxeBuilder();
AxeBuilder axeBuilder;
axeBuilder = new AxeBuilder();
Results accessibilityResults = axeBuilder.analyze(driver);

Assertions.assertEquals(3, accessibilityResults.getViolations().size());
18 changes: 13 additions & 5 deletions selenium-testng-examples/pom.xml
Original file line number Diff line number Diff line change
@@ -2,14 +2,22 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>demo-java</artifactId>
<groupId>com.saucelabs</groupId>
<version>1.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>

<groupId>com.saucelabs</groupId>
<artifactId>selenium-testng-examples</artifactId>
<version>1.0-SNAPSHOT</version>

<name>Sauce Labs TestNG Examples</name>

<properties>
<sauce_testng.version>1.5.0</sauce_testng.version>
<maven.surefire.version>3.5.1</maven.surefire.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>

0 comments on commit abe8bb2

Please sign in to comment.