Skip to content

swengr-janan/playwright-qa-tests

Repository files navigation

🚀 Playwright Login Test Automation

This project demonstrates automated login tests using Playwright, with a structured approach using fixtures, Page Object Model (POM), and test data-driven testing.


🛠️ Prerequisites

  • Node.js v18 or higher
  • npm (comes with Node.js)
  • Git (optional but useful)

Check versions:

node -v
npm -v

📦 Setup Instructions

  1. Clone the repository
git clone https://github.com/YOUR_USERNAME/playwright-login-test.git
cd playwright-login-test
  1. Initialize the project

If package.json doesn’t exist yet:

npm init -y
  1. Install Playwright
npm install -D @playwright/test
npx playwright install
  1. (Optional) Add scripts to package.json
"scripts": {
  "test": "npx playwright test",
  "test:ui": "npx playwright test --ui"
}

🧪 Running the Tests

Run all tests:

npx playwright test

Run in interactive UI mode:

npx playwright test --ui

Run specific test file:

npx playwright test tests/login.spec.ts

✅ What’s Covered

  • 🔁 Data-driven testing using arrays of test credentials
  • 🔒 Login page automation with assertions for invalid credentials
  • 🧱 Fixtures for reusable page objects
  • 🧼 Clean project structure for scalability

🧑‍💻 Author

John Anthony Balbin

Happy testing! 🧪✨

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors