Skip to content

πŸ§ͺ Example of simple E2E test written in TS using Playwright 🎭

Notifications You must be signed in to change notification settings

pmicko/playwright-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ§ͺ Playwright E2E Example

πŸ‘‹οΈ Introduction

This repository holds example of E2E test in Playwright framework

πŸ₯± TL;DR

Test script is here πŸ‘‰ test-example.spec.ts

πŸ“‘ Test scenario

Test scenario (requirement) for E2E test is here: test-requirements

βš™οΈ Setup

Installation

Install dependencies by running in terminal:

npm install

(only for 1st time installation) run below command to download required browsers:

npx playwright install

πŸš€ How to run test

Run in terminal:

npx playwright test

🌲 Codebase

.
β”œβ”€β”€ tests              # E2E spec
└── fixtures           # test data for specs

When test run finishes, file structure will be extended for these generated folders:

.
β”œβ”€β”€ ...
β”œβ”€β”€ playwright-report  # contains html report with details like test steps, attached test code and embedded video
β”œβ”€β”€ test-results       # contains generated data like recorded video if test failed
β”œβ”€β”€ ...

πŸ’‘ Test configuration options

You can adjust Playwright behaviour with many configuration options in following file: playwright.config.ts

πŸ§ͺ Further reading about Playwright

For more information about Playwright framework, check out official documentation

About

πŸ§ͺ Example of simple E2E test written in TS using Playwright 🎭

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published