← All skills
Test Architect
Use when designing comprehensive testing strategies spanning pyramid tiers, TDD cycles, property-based testing, and mutation testing.
About this skill
Use when designing comprehensive testing strategies spanning pyramid tiers, TDD cycles, property-based testing, and mutation testing.
SKILL.md
test-architect.SKILL.mdPlace it in your Syntic skills folder. For Syntic Code, install in your local skills directory, review the contents and run it in a controlled environment first.
--- name: Test Architect description: Use when designing comprehensive testing strategies spanning pyramid tiers, TDD cycles, property-based testing, and mutation testing. category: QA & Testing version: 1.0.0 tools: [] --- # Testing Architecture Design testing strategies using the pyramid model: 70% unit tests (fast, isolated), 20% integration tests (component interactions), 10% e2e tests (critical workflows). ## Core Principles - Test behavior, not implementation; refactoring shouldn't break tests. - One clear assertion per test; split "and" tests. - Tests must be deterministic (no time/network/random dependencies). - Each test manages its own state independently. - Descriptive test names: `should_return_404_when_user_not_found`. ## Test-Driven Development 1. Red: Write a failing test describing desired behavior. 2. Green: Write minimum code to pass the test. 3. Refactor: Clean code while keeping tests green. Use TDD for business logic; skip for boilerplate. Keep red-green-refactor cycles under 5 minutes. ## Unit Testing - Mock external dependencies; never mock code under test. - Use dependency injection for testability. - Test edge cases: empty inputs, nulls, boundary numbers, unicode, max-length strings. - Use table-driven tests for multiple input-output combinations. ## Integration Testing - Use real databases (testcontainers). Never mock the database. - Reset state between tests: truncate tables, clear queues, reset caches. - Test API endpoints with actual HTTP; verify status, body, headers. - Set timeouts; integration tests must complete under 30 seconds each. ## End-to-End Testing - Use Playwright for web E2E. - Test 5–10 critical workflows only. - Page Object pattern for maintainability; selectors in page objects, not tests. - Use `data-testid` for element selection, never CSS classes. - Run against staging mirroring production. - Record failures with screenshots and traces. ## Property-Based Testing Use property-based testing (fast-check, Hypothesis, proptest) for functions with well-defined invariants. Good candidates: serialization roundtrips, sorting, encoding/decoding, math functions. Define properties as universal truths: "for all valid inputs, decode(encode(x)) equals x." ## Mutation Testing Use mutation tools (Stryker, mutmut, cargo-mutants) on critical business logic. Target mutation score ≥80%. Focus on surviving mutants in conditional logic, boundaries, and return values. ## Test Infrastructure - Tests run in CI on every PR; block merges on failures. - Parallelize execution; use separate databases per worker. - Flag tests exceeding 10 seconds (unit) or 60 seconds (integration). - Track and fix flaky tests immediately. - Maintain coverage dashboard as signal, not target.
Install
Syntic App
- 1Create a dedicated folder for this skill in your local skills library.
- 2Place SKILL.md into that folder.
- 3Restart Syntic and invoke this skill on matching tasks.
Syntic Code (CLI)
- 1Save SKILL.md in your local Syntic Code skills directory.
- 2Keep related files in the same skill folder.
- 3Run in a safe environment and validate outputs.