This project demonstrates automated testing using Selenium, Cucumber BDD, TestNG, Rest Assured, and AssertJ. The framework is designed for both UI and API testing and supports parallel test execution through Docker Selenium Grid.
- Project Overview
- Technologies Used
- Application Under Test
- Project Setup
- Docker Selenium Grid Setup
- Running Tests
- Contact
This framework integrates multiple tools to provide a seamless testing solution for web applications and RESTful APIs. It supports:
- UI testing using Selenium and Cucumber BDD.
- API testing using Rest Assured.
- Test execution parallelism with TestNG.
- Browser interaction across multiple environments via Docker Selenium Grid.
The application used for testing in this project is Sauce Demo.
- Selenium: For browser automation.
- Cucumber BDD: To write human-readable test scenarios.
- TestNG: To manage and execute tests.
- Rest Assured: For API testing.
- AssertJ: For fluent assertion API.
- Docker: To containerize and manage testing infrastructure.
- Maven: For project build and dependency management.
- docker network create grid
- docker pull selenium/hub:latest
- docker pull selenium/node-firefox:latest
- docker run -d -p 4442-4444:4442-4444 --net grid --name selenium-hub selenium/hub:latest
- docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub --shm-size="2g" -e SE_EVENT_BUS_PUBLISH_PORT=4442 -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 -e SE_NODE_MAX_SESSIONS=5 -e SE_NODE_OVERRIDE_MAX_SESSIONS=true selenium/node-firefox:latest
- Java JDK 8+ installed.
- Maven for build automation.
- Docker to set up Selenium Grid and manage nodes.
To get started, clone this repository:
git clone https://github.com/yourusername/selenium_cucumber_pom.git
cd selenium_cucumber_pom
mvn test -Dcucumber.filter.tags="@selenium" -Dbrowser.env=local
-DthreadCount=2 -Dbrowser=chrome
-Dbrowser.env=grid -Dgrid.url=gridurl
If you have any questions or need support, feel free to reach out.
- Author: Partheeban Subramanian
- Email: [email protected]
- GitHub: https://github.com/partheebanMani