# Test Automation Strategy

Design and implement effective test automation with proper pyramid, patterns, and CI/CD...

- Repository: https://github.com/proffesor-for-testing/agentic-qe (521 stars)
- Category: Design
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add proffesor-for-testing/agentic-qe --skill test-automation-strategy -g -a claude-code -y`
Codex: `npx skills add proffesor-for-testing/agentic-qe --skill test-automation-strategy -g -a codex -y`
Cursor: `npx skills add proffesor-for-testing/agentic-qe --skill test-automation-strategy -g -a cursor -y`
Gemini CLI: `npx skills add proffesor-for-testing/agentic-qe --skill test-automation-strategy -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add proffesor-for-testing/agentic-qe`

## Description

Design and implement effective test automation with proper pyramid, patterns, and CI/CD integration. Use when building automation frameworks or improving test efficiency.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Test Automation Strategy

<default_to_action>
When designing or improving test automation:
1. DETECT anti-patterns: Ice cream cone? Slow suite? Flaky tests?
2. USE patterns: Page Object Model, Builder pattern, Factory pattern
3. INTEGRATE in CI/CD: Every commit runs tests, fail fast
4. MANAGE flaky tests: Quarantine, fix, or delete - never ignore

**Quick Anti-Pattern Detection:**
- Ice cream cone (many E2E, few unit) → Invert to pyramid
- Slow tests (> 10 min suite) → Parallelize, mock external deps
- Flaky tests → Fix timing, isolate data, or quarantine
- Brittle selectors → Use data-testid, semantic locators
</default_to_action>

## Quick Reference Card

### When to Use
- Building new automation framework
- Improving existing test efficiency
- Reducing flaky test burden
- Optimizing CI/CD pipeline speed

### Anti-Patterns to Detect
| Problem | Symptom | Fix |
|---------|---------|-----|
| Ice cream cone | 80% E2E, 10% unit | Invert pyramid |
| Slow suite | 30+ min CI | Parallelize, prune |
| Flaky tests | Random failures | Quarantine, fix timing |
| Coupled tests | Order-dependent | Isolate data |
| Brittle selectors | Break on CSS change | Use data-testid |

---

## CI/CD Integration

```yaml
name: Test Pipeline
on: [push, pull_request]

jobs:
  unit-tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci
      - run: npm run test:unit -- --coverage
        timeout-minutes: 5
      - uses: codecov/codecov-action@v3

  integration-tests:
    needs: unit-tests
    runs-on: ubuntu-latest
    services:
      postgres:
        image: postgres:15
    steps:
      - run: npm run test:integration
        timeout-minutes: 10

  e2e-tests:
    needs: integration-tests
    runs-on: ubuntu-latest
    steps:
      - run: npx playwright test
        timeout-minutes: 15
```

---

## Flaky Test Management

The rest: https://github.com/proffesor-for-testing/agentic-qe/blob/HEAD/.claude/skills/test-automation-strategy/SKILL.md
