Skip to content

Test Automation framework using Playwright and TypeScript

Notifications You must be signed in to change notification settings

sadabnepal/playwright-test-ui-api

Repository files navigation

Playwright TypeScript Test Automation Framework

Requirements:

NodeJs VSCode

Getting Started:

Clone Repository

git clone https://github.com/sadabnepal/playwright-test-ui-api.git
cd playwright-test-ui

Install Packages

npm install
npm run prepare

Install Browsers

npx playwright install --with-deps --chromium
npx playwright install --with-deps --webkit

Run tests and Generate Report

npm test                 [ run all tests ]
npm run test:chrome      [ Run UI tests in Chromium ]
npm run test:webkit      [ Run UI tests in Webkit ]
npm run test:api:rest    [ Run API tests ]
npm run test:api:graphql [ Run API tests ]

Code Analyze and Fix

npm run lint
npm run lint:fix

check script section of package.json for more test commands

Features:

- Support for: Web App, Rest API, GraphQL
- Report: Playwright HTML, Ortoni HTML
- CI/CD: Github Action
- Schema validation: zod library
- Test data generator: faker-js library
- Multi environment and secretes: dotenv library
- Code Quality Control: EsLint, Husky, Custom Interface

Tech stacks:

Playwright GraphQL TypeScript GithubActions ESlint Husky zod

Sample Report:

Report