Skip to content

digitarald/testpilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TestPilot

A Playwright test automation project for end-to-end testing.

Setup

This project uses Playwright for browser automation and testing. The project has been set up with:

  • TypeScript for type-safe test authoring
  • Multi-browser testing support (Chrome, Firefox, Safari)
  • Parallel test execution
  • HTML reporting
  • Screenshot capture

Installation

  1. Ensure you have Node.js installed
  2. Clone this repository
  3. Install dependencies:
npm install

Running Tests

The following npm scripts are available:

  • npm test - Run all tests in all browsers
  • npm run test:ui - Run tests with the Playwright UI mode
  • npm run test:chrome - Run tests only in Chrome
  • npm run test:firefox - Run tests only in Firefox
  • npm run test:safari - Run tests only in Safari (WebKit)
  • npm run test:debug - Run tests in debug mode
  • npm run report - Show the HTML test report
  • npm run codegen - Generate tests using the Playwright code generator

Project Structure

  • tests/ - Contains test files (example.spec.ts and custom-test.spec.ts)
  • tests-examples/ - Contains demo examples provided by Playwright
  • playwright.config.ts - Playwright configuration file
  • test-results/ - Screenshots and other test artifacts

Writing Tests

Tests are written using the Playwright test framework. Here's a basic example:

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

test('basic test', async ({ page }) => {
  await page.goto('https://example.com');
  await expect(page).toHaveTitle(/Example/);
});

For more information, visit the Playwright documentation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published