From aj-geddes-useful-ai-prompts-4
Designs and implements scalable test automation frameworks with Page Object Model, fixtures, and reporting. Covers Playwright/TypeScript and pytest Python patterns for test organization and infrastructure.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aj-geddes-useful-ai-prompts-4:test-automation-frameworkThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- [Overview](#overview)
references/configuration-management.mdreferences/custom-reporter.mdreferences/custom-test-utilities.mdreferences/page-object-model-playwrighttypescript.mdreferences/pytest-framework-python.mdreferences/test-fixtures-and-factories.mdreferences/test-organization.mdscripts/scaffold-tests.shtemplates/test-template.jsA 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.
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)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Page Object Model (Playwright/TypeScript) | Page Object Model (Playwright/TypeScript) |
| Test Fixtures and Factories | Test Fixtures and Factories |
| Custom Test Utilities | Custom Test Utilities |
| Configuration Management | Configuration Management |
| Custom Reporter | Custom Reporter |
| pytest Framework (Python) | pytest Framework (Python) |
| Test Organization | Test Organization |
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin aj-geddes-useful-ai-prompts-4Provides expert guidance on AI-powered test automation, self-healing tests, TDD, and modern testing frameworks like Playwright and Appium.
Initializes end-to-end test framework with Playwright or Cypress. Useful when setting up testing for web apps after phrases like 'lets setup test framework'.
Initializes a Playwright or Cypress test framework architecture with fixtures, helpers, and configuration. Triggered by phrases like "let's setup test framework."