Playwright Starter Kit is a comprehensive boilerplate repository designed to assist developers in initiating automated testing projects using Playwright. This kit includes pre-configured settings and sample tests, demonstrating effective practices for web testing with Playwright.
- Pre-configured Playwright environment
- Example tests showcasing Playwright's capabilities
- Customizable scripts for diverse testing scenarios
Before you begin, ensure you have Node.js installed.
Clone the repository:
git clone https://github.com/your-username/PlaywrightStarterKit.git
cd PlaywrightStarterKit
Install dependencies:
yarn # or npm install
Install Browser Drivers:
yarn playwright install # or npm run playwright install
The repository includes several npm scripts for different testing scenarios:
npm run test
: Run all testsnpm run test:chrome
: Run tests in Chromenpm run test:debug
: Run tests in debug modenpm run test:headed
: Run tests in headed modenpm run test:headed:debug
: Debug tests in headed modenpm run desktop
: Run desktop-specific testsnpm run mobile
: Run mobile-specific testsnpm run desktop:atomic
: Run atomic tests for desktopnpm run mobile:atomic
: Run atomic tests for mobilenpm run desktop:flow
: Run flow tests for desktopnpm run mobile:flow
: Run flow tests for mobilenpm run prepare
: Install Husky for Git hooksnpm run ui
: Launch Playwright test UInpm run lint
: Run ESLintnpm run lint:fix
: Auto-fix ESLint issuesnpm run prettier
: Check code formatnpm run prettier:fix
: Auto-format code
Contributions are welcome!
This project is licensed under the MIT License.