How swagatam-github/selenium-java-practice works
Purpose and execution model
This is a Java/Maven Selenium automation project for Tricentis Obstacle Course challenges. TestNG drives browser-based challenge flows; Main.java is a likely standalone entry point, while suite execution is defined by testng.xml and test classes under src/test/java/.
Paths: src/main/java/Main.java, testng.xml, pom.xml
Browser lifecycle boundary
Browser centralizes WebDriver creation and browser lifecycle, with DesktopBrowserType representing supported desktop browser selection. This is the main runtime boundary between test/challenge logic and Selenium driver infrastructure, and is especially relevant to parallel TestNG runs.
Paths: src/main/java/base/Browser.java, src/main/java/base/DesktopBrowserType.java, src/test/java/ParallelRunTestCase.java
Authentication and configuration
Login automation is modeled as a page object. Credentials are read from a properties resource through configuration utilities, separating sensitive/runtime inputs from Selenium interaction code.
Paths: src/main/java/pages/login/LoginPage.java, src/main/java/utils/Credentials.java, src/main/resources/credentials.properties
Page-object challenge layer
Each obstacle is encapsulated in a dedicated page/challenge class rather than embedded directly in tests. These classes implement challenge-specific UI behavior, while GoodJob likely represents successful completion/verification after an obstacle is solved.
Paths: src/main/java/pages/obstacles/AndCounting.java, src/main/java/pages/obstacles/FindTheChangedCell.java, src/main/java/pages/obstacles/ToscaBotCanFly.java, src/main/java/pages/common/GoodJob.java
Selenium interaction abstraction
ElementOperations is the shared UI-operation layer used by page objects for locating, waiting on, and manipulating page elements. It forms the practical boundary that should absorb Selenium-specific synchronization and interaction behavior, keeping obstacle classes task-oriented.
Paths: src/main/java/utils/ElementOperations.java, src/main/java/pages/obstacles/NotATable.java
Test orchestration flow
Typical control flow is: TestNG suite/test class initializes a browser; login page authenticates against the external Obstacle Challenge site; obstacle page objects execute challenge actions; completion is asserted through the common success page; listener infrastructure captures results; browser is closed. Multiple contributor-named test classes suggest independently executable challenge scenarios.
Paths: src/test/java/pages/LoginTest.java, src/test/java/ShawnFrost.java, src/test/java/SwagatamGhosh.java
Reporting and artifacts
A TestNG listener integrates Extent reporting around test execution, providing a reporting boundary independent of challenge implementation. Downloader and XMLParser indicate support for acquiring and parsing external/downloaded data where challenges require it.
Paths: src/main/java/reportinglistener/ExtentReportListener.java, src/main/java/downloader/Downloader.java, src/main/java/utils/XMLParser.java
Runtime and external dependencies
The project runs on Java (README targets Java 8) with Maven dependency management, Selenium WebDriver, and TestNG. It automates the external https://obstaclecourse.tricentis.com/ service. GitHub Actions includes a manually triggered workflow for remote execution.
Paths: pom.xml, .github/workflows/ManualTrigger.yml, README.md
Components 18
Execution
- Maven build · Manages Java, Selenium, and TestNG dependencies.
pom.xml - TestNG suite
testng.xml - Challenge test scenarios · Contributor-named tests execute independent challenge flows.
src/test/java/ShawnFrost.java - Parallel test case · Exercises browser lifecycle under parallel execution.
src/test/java/ParallelRunTestCase.java - Standalone entry point
src/main/java/Main.java - Login test
src/test/java/pages/LoginTest.java - Manual GitHub Actions run
.github/workflows/ManualTrigger.yml
Automation Layer
- Browser lifecycle · Creates and closes WebDriver instances.
src/main/java/base/Browser.java - Desktop browser selection
src/main/java/base/DesktopBrowserType.java - Login page
src/main/java/pages/login/LoginPage.java - Obstacle page objects · Encapsulates obstacle-specific browser behavior.
src/main/java/pages/obstacles/AndCounting.java - Element operations · Centralizes locating, waiting, and UI interactions.
src/main/java/utils/ElementOperations.java - Success verification
src/main/java/pages/common/GoodJob.java
Support
- Credentials loader
src/main/java/utils/Credentials.java - Credentials properties
src/main/resources/credentials.properties - Extent report listener · Captures test execution results independently of challenge logic.
src/main/java/reportinglistener/ExtentReportListener.java - Download and XML support · Acquires and parses challenge-related external data.
src/main/java/downloader/Downloader.java
External Services
- Tricentis Obstacle Course
Connections 20
- Manual GitHub Actions run → Maven build: runs
- Maven build → TestNG suite: provides test runtime
- TestNG suite → Challenge test scenarios: selects
- TestNG suite → Parallel test case: selects
- TestNG suite → Login test: selects
- TestNG suite → Extent report listener: notifies
- Challenge test scenarios → Browser lifecycle: initializes
- Parallel test case → Browser lifecycle: initializes
- Browser lifecycle → Desktop browser selection: selects
- Login test → Login page: authenticates with
- Challenge test scenarios → Login page: authenticates with
- Login page → Credentials loader: reads
- Credentials loader → Credentials properties: loads
- Challenge test scenarios → Obstacle page objects: executes
- Obstacle page objects → Element operations: uses
- Login page → Element operations: uses
- Obstacle page objects → Success verification: verifies completion
- Element operations → Tricentis Obstacle Course: drives browser against
- Download and XML support → Obstacle page objects: supports data-driven challenges
- Challenge test scenarios → Extent report listener: reports results