skills/test-automation-framework/SKILL.md
Design and implement scalable test automation frameworks with Page Object Model, fixtures, and reporting. Use for test framework, page object pattern, test architecture, test organization, and automation infrastructure.
npx skillsauth add aj-geddes/useful-ai-prompts test-automation-frameworkInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
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 |
development
Implement Zero Trust security model with identity verification, microsegmentation, least privilege access, and continuous monitoring. Use when building secure cloud-native applications.
development
Prevent Cross-Site Scripting (XSS) attacks through input sanitization, output encoding, and Content Security Policy. Use when handling user-generated content in web applications.
tools
Create wireframes and interactive prototypes to visualize user interfaces and gather feedback early. Use tools and techniques to communicate design ideas before development.
development
Implement real-time bidirectional communication with WebSockets including connection management, message routing, and scaling. Use when building real-time features, chat systems, live notifications, or collaborative applications.