Skip to content

kishkk84/Playwright-TypeScript

Repository files navigation

PLAYWRIGHT TEST REPOSITORY

Introduction

This project is a Playwright-based testing framework for UI application(s). The framework is designed to automate APIs, end-to-end & Regression testing, ensuring the application functions correctly across different browsers, APIs and devices.

Getting Started

Follow these steps to get the code up and running on your system.

Prerequisites

Ensure you have the following installed on your system:

Installation

  1. Clone the repository:

    git clone https://github.com/kishkk84/Playwright-TypeScript.git
    cd Playwright-TypeScript
  2. Install the dependencies:

    npm install
    
  3. Install Playwright browsers:

    npx playwright install
    npx playwright install-deps
    
  4. Install the below extensions from visual studio code extensions.

    Playwright Test for VSCode
    Prettier - Code formatter
    open in browser
    

Configuration

Create a .env.local file in the env directory with the necessary environment variables.

Running Tests

Running Regression Tests

From the root of the project run the below command

npm run test:reg

Run Specific Test

npx playwright test path/to/test-file.spec.ts

View test results:

npx playwright show-report

Project Structure

  • .git: Contains hooks
  • .pipelines: Contains pipeline configuration files for CI/CD.
  • authentication: Stores authentication-related files.
  • env: Contains environment-specific configuration files.
  • fixtures: Contains fixture files for setting up & tearing down the test & data.
  • pages: Contains page object files for the application(s).
  • playwright: Contains global setup and global teardown scripts for Playwright.
  • reports: Stores all test reports like allure, html, json etc.
  • tests: Contains api & ui test files.
  • utils: Contains utility functions and helpers.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •