用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill testing-automation-expert命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | testing-automation-expert |
| description | Validates test quality - surviving mutants = gaps. |
| metadata | {"author":"georgekhananaev"} |
Master production-grade testing strategies for Python and TypeScript applications. QA Architect level - design test ecosystems that scale.
/test-plan - Design test strategy for a feature/project/fixture-refactor - Optimize test fixture architecture/e2e-setup - Set up Playwright E2E testing/test-audit - Review test coverage and quality/contract-test - Set up Pact contract testingLoad the appropriate reference based on need:
| Category | Framework | Reference |
|---|---|---|
| Python | pytest | references/python-pytest.md |
| TypeScript | Jest | references/typescript-jest.md |
| TypeScript | Vitest | references/typescript-vitest.md |
| E2E | Playwright | references/e2e-playwright.md |
| Advanced | Contract/A11y/Mutation | references/specialized-testing.md |
should_return_error_when_user_not_foundsleep().flaky.spec.ts until fixed /\
/E2E\ Few, slow, high confidence
/-----\
/Integ. \ Some, moderate speed
/---------\
/ Contract \ Service boundaries
/-------------\
/ Unit \ Many, fast, isolated
/------------------\
| Type | Count | Speed | Scope |
|---|---|---|---|
| Unit | 60% | <100ms | Single function |
| Contract | 10% | <1s | Service interface |
| Integration | 20% | <5s | Service + DB |
| E2E | 10% | <30s | Full user flow |
tests/
├── conftest.py / setup.ts # Root fixtures
├── factories/ # Test data factories
│ └── user.factory.ts
├── fixtures/ # Static test data
│ └── users.json
├── unit/ # Fast, isolated
│ ├── services/
│ └── utils/
├── integration/ # DB, external services
│ ├── api/
│ └── repositories/
├── contract/ # Pact consumer/provider
│ ├── consumer/
│ └── provider/
├── e2e/ # Full user flows
│ ├── pages/ # Page objects
│ ├── specs/
│ └── a11y/ # Accessibility tests
└── load/ # k6/Locust scripts
└── api-load.js
| Don't | Do |
|---|---|
| Test implementation details | Test behavior/contracts |
| Hardcode test data | Use factories/fixtures |
| Share state between tests | Isolate with fixtures |
| Mock everything | Mock at boundaries only |
Use time.sleep() | Use wait_for or time mocking |
| Use SQLite for Postgres tests | Use Testcontainers |
| Write flaky time-based tests | Use time-machine / vi.useFakeTimers() |
| Skip edge cases | Use property-based testing |
| Ignore test failures | Fix or remove immediately |
| One giant conftest.py | Split into modules |
| Integration tests for service contracts | Use Pact contract testing |
| Skip accessibility | Add axe-core to E2E |
| Trust coverage alone | Add mutation testing |
# Consumer test (Python)
pact = Consumer("UserService").has_pact_with(Provider("AuthService"))
See references/specialized-testing.md for full Pact patterns.
schemathesis run http://localhost:8000/openapi.json
Auto-generates tests from OpenAPI spec - finds edge cases.
# Python
mutmut run && mutmut results
# TypeScript
npx stryker run
Validates test quality - surviving mutants = gaps.
const results = await new AxeBuilder({ page }).analyze();
expect(results.violations).toEqual([]);
pytest # Run all
pytest -m "not slow" # Skip slow
pytest --cov=src --cov-report=html # Coverage
pytest -n auto # Parallel
pytest -x --lf # Stop first, re-run failed
pytest -p randomly # Randomize order (flakiness detection)
npx vitest # Watch mode
npx vitest run # Run once
npx vitest --coverage # Coverage
npx vitest --ui # Browser UI
npx playwright test # Run all
npx playwright test --shard=1/4 # CI sharding
npx playwright test --debug # Debug mode
npx playwright show-trace trace.zip # View trace
# Core
pip install pytest pytest-asyncio pytest-cov pytest-xdist
pip install pytest-mock pytest-randomly time-machine
# Advanced
pip install syrupy hypothesis dirty-equals
pip install testcontainers[postgres] httpx
pip install schemathesis pact-python mutmut
pip install playwright pytest-playwright axe-playwright-python
pip install locust # Load testing
# Vitest (recommended for new projects)
npm install -D vitest @vitest/coverage-v8 @vitest/ui
# Jest (legacy/React Native)
npm install -D jest ts-jest @types/jest
# Shared
npm install -D supertest @types/supertest @faker-js/faker
npm install -D @testcontainers/postgresql
# Playwright
npm init playwright@latest
npm install -D @axe-core/playwright
# Contract & Mutation
npm install -D @pact-foundation/pact
npm install -D @stryker-mutator/core @stryker-mutator/vitest-runner
Converted and distributed by TomeVault — claim your Tome and manage your conversions.