Skip to content

dobrinindima/home_assessment

Repository files navigation

🎭 Playwright E2E Framework

Automated end-to-end testing framework using Playwright and TypeScript.

📦 Tech Stack

🚀 Getting Started

# Install dependencies
npm install

# Run all tests
npm run test

# Run tests in headed mode (with browser UI)
npm run test:headed

# Generate test scripts with Codegen
npm run codegen

🗂️ Project Structure

.
├── tests/               # E2E test scenarios
├── pages/               # Page Object classes
├── utils/               # Utility functions and helpers
├── config/              # Environment variables and shared configs
├── playwright.config.ts # Playwright configuration
├── global.setup.ts      # Setup logic (e.g., login before tests)
└── .github/workflows/   # CI configuration (GitHub Actions)

🧪 Example Test

test('Successful login', async ({ page }) => {
  const loginPage = new LoginPage(page);
  await loginPage.goto();
  await loginPage.login('user@example.com', 'password123');
  await expect(page).toHaveURL('/dashboard');
});

🔧 NPM Scripts

Command Description
npm run test Run all Playwright tests
npm run test:headed Run tests with browser UI
npm run codegen Open Playwright Codegen
npm run test:testomat Run tests with Testomat reporter (requires TESTOMATIO)
npm run test:import Import tests into Testomat project

⚙️ Continuous Integration

This project uses GitHub Actions to automatically run tests on every push and pull request.

Testomat.io Integration

  • Set TESTOMATIO secret in CI with your Testomat API token.
  • To run with Testomat reporter locally:
TESTOMATIO=your-token npm run test:testomat
  • From Testomat UI, you can trigger a GitHub Actions workflow (see .github/workflows/testomat.yml).

🛣️ Roadmap / TODO

  • Add Page Objects for major flows
  • Implement login/auth setup in global.setup.ts
  • Create reusable API client module
  • Add Slack or Telegram notifications on failure

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors