Skip to content

drcolburn/ui_test_automation_playwright

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ui_test_automation_playwright

A modern UI test automation framework built with Playwright for end-to-end testing.

GitHub Copilot prompt used to create this repository's content

Generate a Playwright test automation framework in TypeScript. The framework should include:

1.  **Project Structure:**
    *   A `tests` directory for test files.
    *   A `pages` directory for Page Object Model (POM) files.
    *   A `fixtures` directory for custom test fixtures.
    *   A `utils` directory for helper functions.
    *   A `playwright.config.ts` file with basic configurations (e.g., browser setup for Chromium, Firefox, WebKit, headless mode, base URL, retries, reporting).

🚀 Getting Started

Prerequisites

  • Node.js (version 18 or higher)
  • npm or yarn

Installation

  1. Clone the repository:
git clone https://github.com/drcolburn/ui_test_automation_playwright.git
cd ui_test_automation_playwright
  1. Install dependencies:
npm install
  1. Install Playwright browsers:
npx playwright install

📖 Usage

Running Tests

Run all tests:

npm test

Run tests in headed mode (see browser):

npm run test:headed

Run tests in debug mode:

npm run test:debug

Run tests in UI mode (interactive):

npm run test:ui

View test report:

npm run test:report

Writing Tests

Tests are located in the tests/ directory. Example test structure:

import { test, expect } from '@playwright/test';

test.describe('Feature Name', () => {
  test('test description', async ({ page }) => {
    await page.goto('https://example.com');
    // Your test code here
  });
});

📁 Project Structure

ui_test_automation_playwright/
├── tests/              # Test files
├── playwright.config.ts # Playwright configuration
├── package.json        # Project dependencies and scripts
└── README.md          # This file

🛠️ Configuration

The Playwright configuration is in playwright.config.ts. You can customize:

  • Test directory
  • Browser settings
  • Parallel execution
  • Retry logic
  • Reporting options
  • And more...

📚 Resources

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is licensed under the ISC License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published