test-automation-strategy — скилл для Claude Code: тесты
Скилл test-automation-strategy проектирует стратегию автоматизации тестов, исправляет перекосы тестовой пирамиды и связывает проверки с CI/CD.
MIT 261 установок ★ 533 обновлён 2026-10-25
npx skills add proffesor-for-testing/agentic-qe --skill test-automation-strategy -a claude-codeЧто делает test-automation-strategy
Скилл помогает спроектировать или пересобрать автоматизацию тестов. Он ищет «перевёрнутую» пирамиду, медленный набор, зависимые проверки, хрупкие селекторы и нестабильные тесты. Для структуры предлагает соотношение 70/20/10 для unit, integration и E2E, а также Page Object Model, Builder и Factory.
Внутри описаны шаги для CI/CD, параллельного запуска и отбора тестов по риску. Отдельные сценарии помогают изолировать данные, отправлять нестабильные проверки в карантин и искать причины сбоев по времени, данным и окружению. Скилл координирует пять субагентов, включая генератор тестов, анализатор покрытия и охотника за flaky-тестами.
Без изоляции данных параллельные тесты дают недетерминированные сбои.
Какие задачи решает
- выстроить пирамиду unit, integration и E2E-тестов
- найти медленные и зависимые проверки
- стабилизировать flaky-тесты
- подключить тесты к CI/CD
- выбрать проверки по риску регрессии
Примеры запросов агенту
- Проанализируй набор тестов и предложи структуру 70/20/10 для unit, integration и E2E.
- Найди flaky-тесты, проверь проблемы с таймингом и изоляцией данных, затем предложи план стабилизации.
- Собери CI/CD-пайплайн с отдельными этапами для unit, integration и E2E-тестов.
Как установить test-automation-strategy
1Через Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill test-automation-strategy -a claude-code2Вручную: положить файлы
~/.claude/skills/test-automation-strategy/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/test-automation-strategy/
1Через Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill test-automation-strategy -a codex2Вручную: положить файлы
.agents/skills/test-automation-strategy/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill test-automation-strategy -a cursor2Вручную: положить файлы
.cursor/skills/test-automation-strategy/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install proffesor-for-testing/agentic-qe assets/skills/test-automation-strategy2Вручную: положить файлы
.github/skills/test-automation-strategy/SKILL.md1Через Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill test-automation-strategy -a gemini-cli2Командой платформы
gemini skills install https://github.com/proffesor-for-testing/agentic-qe --path assets/skills/test-automation-strategyВручную: положить файлы
.devin/skills/test-automation-strategy/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add proffesor-for-testing/agentic-qe --skill test-automation-strategy -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о test-automation-strategy
Как установить test-automation-strategy в Claude Code?
Выполните npx skills add proffesor-for-testing/agentic-qe --skill test-automation-strategy -a claude-code, затем проверьте файл ~/.claude/skills/test-automation-strategy/SKILL.md.
Что делает test-automation-strategy?
Скилл проектирует тестовую пирамиду, подбирает паттерны автоматизации, помогает настроить CI/CD и разбирает flaky-тесты.
Какой баланс тестов предлагает скилл?
Для unit, integration и E2E он использует соотношение 70/20/10. При параллельном запуске тестам нужна изоляция данных.
Исходный текст
SKILL.md · MIT
---
name: test-automation-strategy
description: "Design and implement effective test automation with proper pyramid, patterns, and CI/CD integration. Use when building automation frameworks or improving test efficiency."
category: testing-methodologies
priority: high
tokenEstimate: 1000
agents: [qe-test-generator, qe-test-executor, qe-coverage-analyzer, qe-flaky-test-hunter, qe-regression-risk-analyzer]
implementation_status: optimized
optimization_version: 1.0
last_optimized: 2025-12-02
dependencies: []
quick_reference_card: true
tags: [automation, test-pyramid, page-object, first-principles, ci-cd, flaky-tests]
trust_tier: 3
validation:
schema_path: schemas/output.json
validator_path: scripts/validate-config.json
eval_path: evals/test-automation-strategy.yaml
---
# 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
```typescript
// Quarantine flaky tests
describe.skip('Quarantined - INC-123', () => {
test('flaky test awaiting fix', () => { /* ... */ });
});
// Agent-assisted stabilization
await Task("Fix Flaky Tests", {
tests: quarantinedTests,
analysis: ['timing-issues', 'data-isolation', 'race-conditions'],
strategies: ['add-waits', 'isolate-fixtures', 'mock-externals']
}, "qe-flaky-test-hunter");
```
---
## Agent-Assisted Automation
```typescript
// Generate tests following pyramid
await Task("Generate Test Suite", {
sourceCode: 'src/',
pyramid: { unit: 70, integration: 20, e2e: 10 },
patterns: ['page-object', 'builder', 'factory'],
framework: 'jest'
}, "qe-test-generator");
// Optimize test execution
await Task("Optimize Suite", {
algorithm: 'johnson-lindenstrauss',
targetReduction: 0.3,
maintainCoverage: 0.95
}, "qe-regression-risk-analyzer");
// Analyze flaky patterns
await Task("Flaky Analysis", {
testHistory: 'last-30-days',
detectPatterns: ['timing', 'data', 'environment'],
recommend: 'stabilization-strategy'
}, "qe-flaky-test-hunter");
```
---
## Agent Coordination Hints
### Memory Namespace
```
aqe/automation/
├── test-pyramid/* - Coverage by layer
├── page-objects/* - Shared page objects
├── flaky-registry/* - Quarantined tests
└── execution-metrics/* - Suite performance data
```
### Fleet Coordination
```typescript
const automationFleet = await FleetManager.coordinate({
strategy: 'test-automation',
agents: [
'qe-test-generator', // Generate pyramid-compliant tests
'qe-test-executor', // Parallel execution
'qe-coverage-analyzer', // Coverage gaps
'qe-flaky-test-hunter', // Flaky detection
'qe-regression-risk-analyzer' // Smart selection
],
topology: 'hierarchical'
});
```
---
## Related Skills
- [tdd-london-chicago](../tdd-london-chicago/) - TDD for unit tests
- [api-testing-patterns](../api-testing-patterns/) - Integration patterns
- [cicd-pipeline-qe-orchestrator](../cicd-pipeline-qe-orchestrator/) - Pipeline integration
- [shift-left-testing](../shift-left-testing/) - Early automation
---
## Remember
**With Agents:** Agents generate pyramid-compliant tests, detect flaky patterns, optimize execution time, and maintain test infrastructure. Use agents to scale automation quality.
## Gotchas
- Agent generates 80% E2E tests and 20% unit tests (inverted pyramid) — explicitly enforce 70/20/10 ratio
- Page Object Model tests become brittle when selectors change — prefer data-testid attributes over CSS selectors
- Flaky tests quarantined but never fixed is technical debt — set a 2-week SLA to fix or delete
- Agent treats test code as second-class — test code needs the same review standards as production code
- Parallel test execution requires test isolation — shared state between tests causes non-deterministic failures
© proffesor-for-testing · MIT · proffesor-for-testing/agentic-qe