mcpField
T
test-automation-framework

test-automation-framework

github.com/aj-geddesTesting & quality373501 installsUpdated 34w ago
Repository

About test-automation-framework

A skill for structuring maintainable automated test suites, with guidance on reusable utilities, test data, configuration, and reporting. It covers Playwright with TypeScript and pytest with Python.

Key features

  1. 01Reusable test utilities
  2. 02Test fixtures and factories
  3. 03Multi-environment configuration
  4. 04Readable test reporting
  5. 05Page Object Model guidance
  6. 06Test organization patterns

Use cases

  1. 01Establish a new automated test suite
  2. 02Scale an existing test suite
  3. 03Standardize testing across teams
  4. 04Reduce duplicated test setup

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill test-automation-framework

After installing, type/test-automation-frameworkin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
configuration-management.md
custom-reporter.md
custom-test-utilities.md
page-object-model-playwrighttypescript.md
pytest-framework-python.md
test-fixtures-and-factories.md
test-organization.md
scripts/
scaffold-tests.sh
templates/
test-template.js

Details

From the project README

Test Automation Framework

Table of Contents

Overview

A test automation framework provides structure, reusability, and maintainability for automated tests. It defines patterns for organizing tests, managing test data, handling dependencies, and generating reports. A well-designed framework reduces duplication, improves reliability, and accelerates test development.

When to Use

  • Setting up new test automation
  • Scaling existing test suites
  • Standardizing test practices across teams
  • Reducing test maintenance burden
  • Improving test reliability and speed
  • Organizing large test codebases
  • Implementing reusable test utilities
  • Creating consistent reporting

Quick Start

Minimal working example:

// framework/pages/BasePage.ts
import { Page, Locator } from "@playwright/test";

export abstract class BasePage {
  constructor(protected page: Page) {}

  async goto(path: string) {
    await this.page.goto(path);
  }

  async waitForPageLoad() {
    await this.page.waitForLoadState("networkidle");
  }

  async takeScreenshot(name: string) {
    await this.page.screenshot({ path: `screenshots/${name}.png` });
  }

  protected async clickAndWait(locator: Locator) {
    await Promise.all([
      this.page.waitForResponse((resp) => resp.status() === 200),
      locator.click(),
    ]);
  }
}
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
Page Object Model (Playwright/TypeScript)Page Object Model (Playwright/TypeScript)
Test Fixtures and FactoriesTest Fixtures and Factories
Custom Test UtilitiesCustom Test Utilities
Configuration ManagementConfiguration Management
Custom ReporterCustom Reporter
pytest Framework (Python)pytest Framework (Python)
Test OrganizationTest Organization

Best Practices

✅ DO
  • Use Page Object Model for UI tests
  • Create reusable test utilities
  • Implement proper wait strategies
  • Use fixtures for test data
  • Configure for multiple environments
  • Generate readable test reports
  • Organize tests by feature/type
  • Version control test framework
❌ DON'T
  • Put test logic in page objects
  • Use hard-coded waits (sleep)
  • Duplicate test setup code
  • Mix test data with test logic
  • Skip error handling
  • Ignore test flakiness
  • Create overly complex abstractions
  • Hardcode environment URLs

Comments

Markdown supported