This page gives the practical commands and talking points for using the final framework as a portfolio project.
Use this page when you want to run the final checkpoint, rehearse a project walkthrough, or prepare interview answers from the code.
Before running, verify:
- Java 21 is installed.
- Maven is available.
- Chrome is installed for the default browser path.
- the working tree is on
mainormodule-18-completeif you want the final checkpoint.
Sequential framework regression:
mvn test -DsuiteXmlFile=testng.xml -Dheadless=trueParallel framework regression:
mvn test -DsuiteXmlFile=testng-parallel.xml -Dheadless=trueCucumber BDD suite:
mvn test -DsuiteXmlFile=testng-cucumber.xml -Dheadless=trueFull discovered-test regression:
mvn test -Dheadless=trueAllure report:
mvn allure:report| Command | When To Use It | Expected Output |
|---|---|---|
mvn test -DsuiteXmlFile=testng.xml -Dheadless=true |
main framework regression | TestNG SauceDemo suite, Extent, Surefire, Allure results |
mvn test -DsuiteXmlFile=testng-parallel.xml -Dheadless=true |
parallel safety proof | TestNG method-level parallel run with multiple browser threads |
mvn test -DsuiteXmlFile=testng-cucumber.xml -Dheadless=true |
BDD proof | Cucumber scenarios, Cucumber HTML/JSON, Allure results |
mvn test -Dheadless=true |
broad discovered-test run | all default-discovered tests, including raw learning tests |
mvn allure:report |
report generation after tests | target/allure-report/index.html |
For a portfolio demo, prefer the three focused suite commands first. They prove the final framework layers directly. The full discovered-test run is useful as a broad confidence check, but it also exercises older raw Selenium learning tests that are less representative of the final framework architecture.
For a portfolio walkthrough, use this sequence:
- Open README.md and explain the final framework snapshot.
- Open docs/README.md and show the module-by-module learning path.
- Open src/main/java/com/learning/framework/pages/saucedemo/LoginPage.java and explain Page Object encapsulation.
- Open src/main/java/com/learning/framework/actions/ElementActions.java and explain wrapper methods.
- Open src/main/java/com/learning/framework/driver/DriverFactory.java and explain config-driven local/Grid execution.
- Open src/test/java/com/learning/tests/base/BaseTest.java and explain TestNG lifecycle plus ThreadLocal.
- Open src/test/resources/features/saucedemo_login.feature and explain Cucumber as a top layer.
- Open .github/workflows/ui-tests.yml and explain CI scopes and artifacts.
Add these short talking points:
- The repo is module-based because the project teaches why each abstraction appears, not only what the final abstraction looks like.
- The final framework uses dynamic
Bylocators instead of PageFactory to keep locator ownership explicit. - TestNG and Cucumber are both supported, but they share the same framework core.
- Parallel execution uses ThreadLocal driver and service ownership.
- CI uses scoped runs so pull-request feedback stays fast while broader checks remain available.
- Start with README.md: explain the stack and final framework snapshot.
- Open docs/README.md: show that this is a learning curriculum with historical module checkpoints.
- Open SauceDemoPageObjectTest.java: show a readable TestNG workflow.
- Jump to LoginPage.java: explain encapsulation and page transitions.
- Jump to ElementActions.java and WaitUtils.java: explain wrapper methods and waits.
- Open DriverFactory.java: explain local/Grid, headless, and ThreadLocal.
- Open saucedemo_login.feature: show BDD as a top layer.
- Open .github/workflows/ui-tests.yml: explain CI scope selection and artifacts.
A strong portfolio walkthrough shows both code structure and execution evidence:
- testng.xml for the main TestNG suite.
- testng-parallel.xml for parallel execution.
- testng-cucumber.xml for the BDD suite.
- src/test/java/com/learning/tests/reports/ExtentReportManager.java and src/test/java/com/learning/tests/reports/AllureReportUtils.java for report ownership.
- src/main/java/com/learning/framework/screenshots/ScreenshotUtils.java and src/test/java/com/learning/tests/listeners/FrameworkTestListener.java for failure diagnostics.
Generated evidence paths:
| Evidence | Path |
|---|---|
| Surefire XML/HTML output | target/surefire-reports/ |
| Extent report | target/extent-report/extent.html |
| Cucumber report | target/cucumber-report/cucumber.html |
| Cucumber JSON | target/cucumber-report/cucumber.json |
| Allure results | target/allure-results/ |
| Allure HTML report | target/allure-report/index.html |
| failure screenshots | target/screenshots/ |
- Built a Java 21 Selenium WebDriver UI automation framework using Maven, TestNG, Page Object Model, wrapper actions, explicit waits, and configuration driven browser management.
- Added data-driven UI coverage using TestNG DataProviders with JSON, CSV, and Excel test data sources.
- Implemented diagnostics with Log4j2, screenshots, retry handling, Extent Reports, Allure reporting, and Cucumber reports.
- Added parallel TestNG execution with ThreadLocal WebDriver isolation and configurable Selenium Grid support.
- Integrated Cucumber BDD scenarios and GitHub Actions CI with smoke, regression, BDD, parallel, and full test scopes.
Use these examples when asked for design decisions:
- Page Object decision: LoginPage.java
hides locators and exposes
open(),loginAs(...), andloginExpectingError(...). - Wrapper decision: ElementActions.java centralizes waits around clicks, typing, and element lookup.
- Parallel decision: BaseTest.java and DriverFactory.java keep WebDriver and services thread-local.
- BDD decision: SauceDemoSteps.java calls page objects instead of Selenium locators.
- CI decision: .github/workflows/ui-tests.yml maps smoke, regression, BDD, parallel, and full scopes to Maven commands.
The framework uses public demo sites, so external availability can affect execution.
CI runs local headless Chrome only. Browser matrix and Grid-in-CI are documented future enhancements.
Allure is uploaded as an artifact, not published as a hosted report.
The repository intentionally contains rich learning comments and docs. A production-only framework would make comments more concise after the team has internalized the design.
Good future work should build on the existing design:
- Browser matrix: update .github/workflows/ui-tests.yml
to pass
-Dbrowser=chrome/firefox/edgethrough a GitHub Actions matrix. - Grid in CI: add a Selenium Grid service/container and run with
-DexecutionMode=grid. - Hosted Allure: publish
target/allure-report/through GitHub Pages. - Dockerized local run: add a Dockerfile or Compose file that standardizes Java, Maven, browser, and optional Grid versions.
These are intentionally not included in Module 18 so the final learning project remains readable and runnable without extra infrastructure.