Skip to content

Creating a scalable, industrial-grade UI automation framework using Playwright with a TDD (Test-Driven Development) approach involves designing a clean, modular structure that supports: Page Object Model (POM) Allure Reporting Logging Scalability and Maintainability

Notifications You must be signed in to change notification settings

ByteCodeTechnical/UI-Automation-Playwright

Repository files navigation

UI Automation Framework

Overview

This project is a scalable, industrial-grade UI automation framework built using Playwright and TypeScript. It follows a Test-Driven Development (TDD) approach and incorporates the Page Object Model (POM) for better maintainability and scalability. The framework also includes Allure Reporting for enhanced reporting capabilities and a logging utility for consistent logging throughout the tests.

Project Structure

ui-automation-framework
├── src
│   ├── pages
│   │   ├── BasePage.ts
│   │   ├── HomePage.ts
│   │   └── LoginPage.ts
│   ├── tests
│   │   └── example.spec.ts
│   ├── utils
│   │   ├── logger.ts
│   │   └── testData.ts
│   └── config
│       └── playwright.config.ts
├── reports
│   └── allure-results
├── .github
│   └── workflows
│       └── ci.yml
├── .vscode
│   └── settings.json
├── .gitignore
├── package.json
├── tsconfig.json
└── README.md

Setup Instructions

  1. Clone the repository

    git clone <repository-url>
    cd ui-automation-framework
    
  2. Install dependencies

    npm install
    
  3. Run tests

    npm test
    

Usage

  • The framework uses the Page Object Model (POM) to separate the test logic from the UI interactions.
  • Create new page objects by extending the BasePage class located in src/pages/BasePage.ts.
  • Write test cases in the src/tests directory, utilizing the page objects for interactions.

Logging

  • The framework includes a logging utility located in src/utils/logger.ts. Use this utility to log messages at different levels (info, warn, error) throughout your tests.

Reporting

  • Allure Reporting is integrated into the framework. Test results will be generated in the reports/allure-results directory after executing the tests.

Contribution Guidelines

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

License

This project is licensed under the ISC License.

About

Creating a scalable, industrial-grade UI automation framework using Playwright with a TDD (Test-Driven Development) approach involves designing a clean, modular structure that supports: Page Object Model (POM) Allure Reporting Logging Scalability and Maintainability

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published