/playwright.spikes

This is a collection of spikes with API libraries to determine the most viable

Primary LanguageTypeScript

Playwright Spikes

This project is to spike and investigate features of Playwright. Currently attempting the following:

  • POM
  • API requests
  • Configuration options
  • Allure Report - S3 and GH Page storage
  • Lighthouse - Skipped not working after an update
  • Visual Regression
  • Sharding in GitHub

Built With

Additionally, we are using the following:

  • dotenv for environment management
  • Biome for statically analyzes code for issues and for automatically formatting code
  • Falso for providing fake data
  • xml2js for XML to JavaScript object converter

Getting Started

  • Clone the repo using SSH

  • Navigate to folder and install npm packages using:

npm install
npx playwright install

Prerequisites

Useful Tools

The following will be consider essential but you can use optional tools:

Optional

Setup

  • Ensure all prerequisites are installed as outlined above.

You will need to create a .env file at the root folder which will configure your local settings, this will NOT be in source control. See .env File Creation

In all of the following cases, there will multiple options and ways to perform these actions but this is a cut down CLI version. Review the Wiki for alternatives. You will be running these commands via a VsCode terminal.

Build

npm run build

Linter

npm run lint

Run tests

There are several ways to run tests and most configuration options will found in the Wiki, for more advanced options consult Playwright

All Tests

npm run test

Unit Test Only

npm run test --project=unit

Functional Test Only

npm run test --project=functional

E2e Test Only with Chromium

npm run test --project=chromium

See also