Skip to content

πŸš€ This repository demonstrates a hybrid automation testing framework using Java, Selenium Grid, Cucumber (BDD), and TestNG as the runner, designed for execution on the LambdaTest cloud. πŸ”‘ Highlights: ⚑ Parallel test execution & Cross-browser testing πŸ’» Cross-platform support for broader coverage ♻️ Reusable & scalable framework design

Notifications You must be signed in to change notification settings

MahalakshmiLingesan18/SeleniumCucumber_LambdaTest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

59 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ§ͺ Selenium_Cucumber_TestNG - Hybrid Framework

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

🌐 Selenium Grid Support

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

βœ… Run on Gitpod

Click below to launch this repo in Gitpod:

Open in Gitpod


πŸ“‘ Table of Contents


βš™οΈ Setup

πŸ“¦ Prerequisites

  • Java 11+ (Java 21 supported βœ…)
  • Maven 3+
  • TestNG plugin (for IDE)
  • IntelliJ IDEA / Eclipse

πŸ“¦ Clone the repo

(bash) git clone https://github.com//selenium-cucumber-testng.git cd selenium-cucumber-testng


πŸ“¦ Install dependencies

(bash) mvn clean install


πŸ› οΈ Configuration

πŸ”‘ LambdaTest Credentials

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


βš™οΈ config.properties

(properties) url=https://www.lambdatest.com/selenium-playground browser=chrome version=latest platform=Windows 11


▢️ Running Tests

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"


πŸ“Š Reports

  • Cucumber JSON Report β†’ target/cucumber-reports/CucumberTestReport.json
    -Integrated with ExtentReports for richer reports β†’ target/SparkReport/Spark.html

🧩 Example Feature

(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


πŸ“Œ Key Highlights

  • DriverManager Pattern β†’ Thread-safe WebDriver management
  • Configurable Browsers β†’ via config.properties or testng.xml
  • Excel Data Driven β†’ form input pulled from InputFormData.xlsx
  • Cloud Execution β†’ Seamless integration with LambdaTest

πŸš€ Next Enhancements

  • 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.

About

πŸš€ This repository demonstrates a hybrid automation testing framework using Java, Selenium Grid, Cucumber (BDD), and TestNG as the runner, designed for execution on the LambdaTest cloud. πŸ”‘ Highlights: ⚑ Parallel test execution & Cross-browser testing πŸ’» Cross-platform support for broader coverage ♻️ Reusable & scalable framework design

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published