Skip to content

faisalbasra/JavaPlaywrightWebDriver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Playwright Web Driver

Overview

The Java Playwright Web Driver is a comprehensive starting point for building end-to-end test automation projects using Java, Playwright, Cucumber, JUnit 5, and enhanced reporting support with Allure and Cucumber Reports. This template empowers QA engineers and developers to quickly set up a robust testing framework and focus on creating efficient, maintainable, and readable test scenarios.

Features

  • Java: Harness the power of Java to create robust and maintainable test scripts.
  • Playwright: Leverage Playwright's multi-browser support (Chromium, Firefox, WebKit) for seamless cross-browser testing.
  • Behavior-Driven Development (BDD) with Cucumber: Write human-readable scenarios using Cucumber's Gherkin language, fostering collaboration between technical and non-technical team members.
  • JUnit5 Test Execution: Employ JUnit5 for test execution, offering robust test lifecycle management, reporting, and smooth integration with CI/CD pipelines.
  • Allure Report: Generate interactive and visually appealing test reports using Allure for better insights into test execution.
  • Cucumber Reports: Enhance your reporting capabilities with Cucumber Reports for detailed feature and scenario-level reports.
  • Page Object Model (POM) Design: Implement the Page Object Model pattern for maintainable test scripts by separating page-specific interactions from test logic.
  • Configurable and Extensible: The template ensures flexibility, allowing easy configuration customization, addition of dependencies, and framework extension as per project needs.
  • Sample Test Scenarios: The template includes sample test scenarios showcasing web element interactions, common actions, and expected behavior validation.
  • Quick Start: Get up and running in no time with a project structure, sample tests, and configuration files preconfigured.

Getting Started

Follow these steps to quickly set up your test automation project using this template:

  1. Clone the Repository: Clone this repository to your local machine using git clone https://github.com/yourusername/your-repo.git.

  2. Install Dependencies: Navigate to the project directory and install the necessary dependencies using mvn clean install.

  3. Write Scenarios: Create your feature files using Gherkin syntax in the src/test/resources/features directory.

  4. Write Step Definitions: Implement the step definitions corresponding to your scenarios in the src/test/java/stepdefinitions directory.

  5. Run Tests: Execute your tests using mvn test. Tests will run in your specified browsers and generate reports.

  6. View Reports: After the test execution, find the generated Allure and Cucumber Reports in the target directory.

Project Structure

├── src/
│   ├── main/
│   │   ├── java/
│   │   │   └── your/
│   │   │       └── package/
│   │   │           └── Main.java
│   ├── test/
│   │   ├── java/
│   │   │   └── stepdefinitions/
│   │   │       └── StepDefinitions.java
│   │   ├── resources/
│   │   │   └── features/
│   │   │       └── SampleFeature.feature
├── pom.xml
├── allure.properties
├── cucumber.properties
└── README.md

Customization

  • Browsers: Configure browsers and browser options in the cucumber.properties file.
  • Report Settings: Customize report settings in the allure.properties file.

Contribution

Contributions are welcome! Feel free to submit issues and pull requests to improve this template.

License

This project is licensed under the MIT License.


Start your end-to-end test automation journey with confidence using the Java Playwright WebDriver Cucumber Quick Start Template. Simplify your setup, enhance your reporting, and focus on delivering high-quality software.

Your feedback and contributions make this template even better!

About

Java Playwright Cucumber QuickStart Template

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published