This is a test framework built using Selenium, Cucumber, TestNG, Report Portal, Selenium Grid 4, and Jenkins.
-
Selenium & Cucumber: Powers the core tests with a behavior-driven approach.
-
TestNG & Selenium Grid 4: Enables parallel test method execution across various browsers, enhancing coverage and efficiency.
-
Jenkins: Manages continuous integration, automating builds and tests.
-
Report Portal: Provides an intuitive dashboard for detailed test reporting.
-
Docker: Houses Selenium Grid, Jenkins, and Report Portal, ensuring a consistent environment.
Before you begin, ensure that your system meets the following prerequisites:
- IDE: While Intellij is preferred, you can use any IDE of your choice.
- Java JDK v17: Ensure that JDK v17 is installed and properly configured.
- Maven v3.9.2: The project relies on Maven for dependency management.
- Docker: Needed to initialize the Selenium Grid 4, Jenkins, and Report Portal.
The main components of the project structure are:
main
: where all Page Objects, Driver Factory, Utils locatedtest
: where all Features, Steps located
Before running the tests, ensure that the necessary configurations are set:
Docker-compose.yml
: where to init docker imageconfig.properties
: setting selenium hub urlreportportal.properties
: setting report portal configuration
- initialize the Docker images
docker-compose Docker-compose.yml up
- Run tests via IDE or Maven.
- Access Jenkins in your browser.
- Create a new 'Pipeline' project.
- Configure Build triggers to Determine how your project will be built (e.g., Poll SCM, Periodically).
- Configure Pipeline using 'Git' and point to your repository. For 'Script Path', set to pipeline/RUNSINGLE.
- Click Build Now to run.