A modern Selenium automation framework using Java, TestNG, Maven, Page Object Model (POM), and Allure Reporting.
- POM Architecture: Organized page objects for maintainability and reusability.
- Environment Management: Use of
.envfiles for security and flexibility. - TestNG Listeners: Custom listeners for automatic screenshots on failure.
- Reporting: Detailed Allure reports with embedded screenshots.
- REST Assured: Advanced API testing with Reqres and JSONPlaceholder.
- JDBC Testing: Database validation tests using SQLite.
- Docker Support: Run tests in isolated containers.
- CI/CD Integrated: GitHub Actions workflow for automated testing.
- Cleanup Utility: Batch script to clear previous reports and results.
- Java 21+
- Maven 3.x+
- Chrome/Firefox/Edge browser
Create/edit the .env file in the root directory:
BASE_URL=https://practice.expandtesting.com/
BROWSER=chrome
HEADLESS=false
USERNAME=practice
PASSWORD=SuperSecretPassword!Run the cleanup script:
.\clean_reports.batRun tests via Maven:
mvn clean testTo see Allure reports after test execution:
allure generate target/allure-results --clean -o allure-report
allure open allure-reportYou can run the entire suite in an isolated container without having Java or Chrome installed locally.
docker build -t selenium-framework .Pass environment variables directly or use the .env file logic:
docker run -e BROWSER=chrome -e HEADLESS=true -e BASE_URL=https://practice.expandtesting.com -e USERNAME=practice -e PASSWORD=SuperSecretPassword! selenium-frameworkOne command build and execution:
docker compose up --buildAfter test execution, generate and open the Allure report:
allure generate target/allure-results --clean -o allure-report
allure open allure-reportThe framework is pre-configured to run on every push/pull-request to main or master. Result artifacts can be downloaded from the "Actions" tab in GitHub.