Skip to content

ganeshsinha/BDD-framework-Selenium-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

Selenium Test Automation Framework

Overview

This repository contains a robust and scalable Selenium test automation framework designed for cross-browser testing using Java, TestNG, Cucumber, Maven, and Extent Reports. The framework is built to support automated testing of web applications, with a focus on searching multiple data on Google and generating detailed test reports.

Features

  • Page Object Model (POM): Structured using the Page Object Model to enhance code maintainability and reusability.
  • Cross-Browser Testing: Supports running tests on multiple browsers (e.g., Chrome, Firefox) through configurable parameters.
  • BDD with Cucumber: Implements Behavior-Driven Development (BDD) using Cucumber for writing and executing test cases.
  • Extent Reports Integration: Provides comprehensive and visually appealing test reports with screenshots for each test step.
  • Parameterized Execution: Allows running tests with different browsers and configurations through Maven commands and batch files.
  • Screenshots for Each Step: Automatically captures and attaches screenshots to the Extent Reports for better visibility of test execution.

Prerequisites

Java 8 or higher Maven Selenium WebDriver ChromeDriver and/or GeckoDriver

Project Structure

  • src/main/java/: Contains page classes, utility classes, and base test classes.
  • src/test/java/: Contains step definitions and test runner classes.
  • src/test/resources/: Contains feature files for Cucumber and configuration files.
  • pom.xml: Maven configuration file with dependencies and build settings.
  • runTests.bat: Batch file to execute tests with different browser parameters.

Getting Started

  1. Clone the Repository:
  1. Configure Your Environment:
  • Update the config.properties file with the appropriate browser settings and base URL.

Run Tests:

  • To run tests on Chrome, execute:

    runTests.bat chrome

-To run tests on Firefox, execute:

runTests.bat firefox

  1. View Reports:

Test reports are generated in the test-output directory. Open extent-report.html to view detailed test results.

Contributing

Contributions are welcome! Please fork the repository, make your changes, and submit a pull request. Ensure that your code adheres to the project's coding standards and includes relevant tests.

License

Open source

Contact

For any questions or support, please open an issue in the repository or contact ganesh.sinha@gmail.com

About

Selenium Java Cucumber Maven

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published