This project is a Web Test Automation Framework using Selenium, Java, TestNG, and Maven.
- Java Development Kit (JDK) 11 or higher.
- Verify with:
java -version
- Verify with:
- Maven.
- Verify with:
mvn -version - If not installed:
- Mac (Homebrew):
brew install maven - Windows/Linux: Download from maven.apache.org.
- Mac (Homebrew):
- Verify with:
To run the default test suite (testng.xml):
mvn clean testThis command will:
- Clean previous builds.
- Compile the code.
- Automatically download necessary drivers (via Selenium Manager).
- Execute the tests.
- Generate reports in the
Reportfolder.
- Import the project as a Maven Project.
- Let the IDE resolve dependencies (it might take a minute to download Selenium 4 and other libraries).
- Navigate to
testng.xml. - Right-click the file and select Run As > TestNG Suite.
src/main/java/framework: Core framework components (Driver, Reporting, Setup).src/main/java/pages: Page Object Models (POM).src/test/java: Test classes and TestNG XML suites.Report: Generated ExtentReports.screenshots: Captured screenshots on failure/pass.
- Selenium 4: Uses the latest Selenium features and automated driver management.
- Cross-Platform: Runs on Windows, Mac, and Linux.
- ExtentReports 5: Rich HTML reporting.
- Log4j 2: Secure and robust logging.
One test case fail purposefully to show screenshots in the report generation.