This project is a Selenium WebDriver test automation framework built from scratch using Java, Cucumber (BDD), and TestNG.
It supports cross-browser & cross-platform testing on LambdaTest Cloud Grid with features like:
- β Cucumber BDD Scenarios
- β TestNG Runner with parallel execution
- β Page Object Model (POM) design
- β Excel-driven test data
- β
Configurable with
config.properties - β Logging with Log4j2
- β Cloud execution on LambdaTest
This framework supports running tests on Selenium Grid for parallel, cross-browser, and cross-platform execution.
You can run tests on:
- π₯οΈ Local Grid (Standalone or Hub/Node setup)
- π³ Dockerized Grid (recommended for CI pipelines)
- βοΈ Cloud Grid such as LambdaTest
Click below to launch this repo in Gitpod:
- π¦ Install dependencies
- π οΈ Configuration
βΆοΈ Running Tests- π Reports
- π§© Example Feature
- π Key Highlights
- π Next Enhancements
- Java 11+ (Java 21 supported β )
- Maven 3+
- TestNG plugin (for IDE)
- IntelliJ IDEA / Eclipse
(bash) git clone https://github.com//selenium-cucumber-testng.git cd selenium-cucumber-testng
(bash) mvn clean install
Set your LambdaTest username & access key as environment variables:
macOS/Linux (bash): (bash) export LT_USERNAME="your-username" export LT_ACCESS_KEY="your-access-key"
Windows (CMD): (cmd) set LT_USERNAME=your-username set LT_ACCESS_KEY=your-access-key
(properties) url=https://www.lambdatest.com/selenium-playground browser=chrome version=latest platform=Windows 11
Run all tests (default config):
(bash)
mvn clean test
Run with TestNG suite:
(bash)
mvn clean test -DsuiteXmlFile=testng.xml
Run a specific feature file:
(bash)
mvn test -Dcucumber.features="src/test/resources/FeatureFiles/drag&DropSlider.feature"
- Cucumber JSON Report β
target/cucumber-reports/CucumberTestReport.json
-Integrated with ExtentReports for richer reports βtarget/SparkReport/Spark.html
(gherkin) Feature: Input Form Submit feature
Scenario: Validating success message after filling the form Given User navigates to the LambdaTest Selenium Playground - Input Form Submit When User fills the form using data row 0 And User clicks Submit button Then A success message "Thanks for contacting us, we will get back to you shortly" should be displayed
- DriverManager Pattern β Thread-safe WebDriver management
- Configurable Browsers β via
config.propertiesortestng.xml - Excel Data Driven β form input pulled from
InputFormData.xlsx - Cloud Execution β Seamless integration with LambdaTest
- Integrate with CI/CD (GitHub Actions / Jenkins)
- Add tagging for Smoke / Regression test selection
β¨ With this framework, you can build scalable, maintainable, and CI/CD-ready Selenium tests with ease.