This repository is a demonstration of simple UI testing examples using Playwright and TypeScript.
It’s intended as a learning project and reference for setting up automated browser tests, including interaction, validation, and reporting.
- Automated browser tests with Playwright
- TypeScript support
- HTML reports and test traces
- GitHub Actions CI workflow
- Clone the repository:
git clone https://github.com/imaun/playwright-demo
cd playwright-demo- Install dependencies:
npm install- Install Playwright browsers:
npx playwright installTo run all tests:
npx playwright test- Terminal summary: You’ll see pass/fail results directly in the terminal.
- HTML report: After running the tests, generate and open the interactive HTML report:
npx playwright show-report- Trace viewer (if enabled in the tests): Playwright can capture detailed traces. To view a trace, open it with:
npx playwright show-trace trace.zipThis project includes a ready-to-use GitHub Actions workflow (.github/workflows/playwright.yml) to automatically run tests on every push and pull request to the main branch.
The Playwright HTML report is uploaded as an artifact and can be downloaded from the GitHub Actions run page.