Logo de Testing Strategy

Testing Strategy

Comunidade
AnastasiyaW
testing-strategy

Use when planning or reviewing tests for a code change, choosing between unit, focused regression, integration, contract, end-to-end, performance, security, property-based, or agent-evaluation checks; classify change risk first and select the smallest evidence set that proves the behavior. Do not use for a single obvious test command, pure documentation changes, or a full security audit without a testing question.

Visão geral

Publicado porAnastasiyaW
Repositóriocodex-claude-code-config
Nome da habilidadetesting-strategy
Estrelas
212
Forks
32
Arquivos incluídos
Somente instruções
LicençaMIT
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Sem arquivos extras

    Tudo de que o modelo precisa está nas instruções — sem arquivos extras para sincronizar.

  • Código aberto

    Publicada por AnastasiyaW no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Testing Strategy no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/AnastasiyaW/codex-claude-code-config/tree/main/skills/development/testing-strategy
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AnastasiyaW/codex-claude-code-config.git /tmp/codex-claude-code-config
mkdir -p .claude/skills
cp -r /tmp/codex-claude-code-config/skills/development/testing-strategy .claude/skills/testing-strategy
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Testing Strategy em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Testing Strategy automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Testing Strategy não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

Testing Strategy

Testing is an evidence-selection problem, not a contest to run the largest suite. Choose the smallest set that can falsify the changed behavior, then add one higher-level check only when it covers a boundary the lower level cannot. Keep execution environments reusable, but separate their evidence profiles: staging-smoke, security-proof, release-attestation, and nightly-stress. Use harness-feedback when a gate is reported as overloaded or misplaced.

Workflow

  1. Freeze the acceptance criteria as observable outcomes.
  2. Inspect the changed files and classify the risk.
  3. Select the lowest useful test level from the matrix below and name the profile.
  4. Run the fast gate first. If it fails, fix the cause before adding more tests.
  5. Add a focused regression test for a confirmed bug or a changed invariant.
  6. Test real boundaries only when the change crosses them.
  7. Keep security-proof and release-attestation checks out of staging-smoke unless the acceptance criteria explicitly require that evidence.
  8. For high-risk or long-horizon work, use a fresh-context verifier and store the command, revision, result, and skipped checks in a durable artifact.
  9. When a verified stage becomes the input to another stage, seal that boundary with commit/tree, contract, input/output digests, and a fresh verdict. Mark an unavailable external prerequisite as BLOCKED; do not rerun unrelated accepted code merely because the following environment is unavailable.

Compact Matrix

ChangeRequired evidenceUsually deferred
Docs, comments, formatting onlyLink/lint check when relevantRuntime suite
Pure function, local refactorFast checks + focused unit/regression testsFull E2E, mutation
Parser, serializer, file, DB, API adapterFast + focused + one real boundary/integration checkBrowser E2E unless user flow changes
Auth, permissions, migrations, concurrency, public API, deploymentFast + focused + integration/contract + targeted smoke; independent review for non-trivial changesFull load test unless performance is in scope
UI or user journeyFast + component/focused checks + one stable E2E smokeLarge browser matrix
Release or performance claimAll applicable lower levels + fixed benchmark/security/release evidenceNothing that is part of the claim

The Stop hook runs the project's fast/default suite only when the working tree contains code or test changes. Projects with a complex suite may declare .claude/test-policy.json:

json
{
  "fast": ["python", "-m", "pytest", "-q", "tests/unit"],
  "integration": ["python", "-m", "pytest", "-q", "tests/integration"],
  "release": ["python", "-m", "pytest", "-q"]
}

fast is the automatic Stop gate. integration is additionally selected for high-risk changes when present. release is explicit or CI-only; do not make every edit pay the release-suite cost. Optional profiles make the separation explicit; a staging profile must not contain release-signing requirements.

Test Kinds

  • Unit: isolated behavior and invariants; fast and numerous.
  • Focused regression: a minimal test that was red before a fix and green after it. Keep it when it protects a real contract.
  • Integration: one real boundary such as a database, filesystem, queue, or external adapter. Use a local/test dependency, never production.
  • Contract: provider/consumer schema and serialization expectations.
  • Smoke/E2E: a small number of real user or release paths; keep them stable.
  • Property/fuzz: invariants over generated inputs; use for parsers, normalizers, state machines, and edge-heavy algorithms.
  • Performance/security: only when the change or release claim needs it; preserve a fixed workload and baseline.
  • Agent eval: test task completion, tool selection, recovery, and safety on a versioned golden set. Deterministic assertions come first; an LLM judge is an additional signal, never the sole proof of code correctness.

Agent Evidence Contract

An agent must report: revision, changed scope, commands actually run, exit status, relevant counts, environment constraints, and checks not run with a reason. “Tests passed” without command output or a durable evidence file is not proof. A generated test is a candidate until it reproduces the failure or asserts a stable contract; do not add broad snapshot tests merely to inflate coverage.

For a confirmed bug use bug-reproducer: reproduce first, then fix, then run the same test again. For a large/high-risk change use proof-verify: a fresh context must produce the final verdict. For a safe structural refactor use refactoring-safely and characterization tests before the transformation.

Anti-Duplication Rules

  • If a higher-level test finds a failure with no lower-level failure, add the smallest lower-level reproducer and keep the higher-level test only if it proves a distinct boundary.
  • Do not run unit, integration, E2E, benchmark, and security suites by default just because they exist. Route by changed boundary and risk.
  • Do not use retries, sleeps, snapshots, or skip/xfail to make red tests look green. A flaky test needs a cause, a bounded quarantine reason, or a fix.
  • Do not claim release readiness from a fast suite alone.
  • Do not treat a new external blocker as a failed upstream candidate. Verify the stage that changed; promote the same sealed input when the prerequisite arrives.

Gotchas

  • A green test suite proves only the exercised behavior; it does not prove absence of defects.
  • Mocks can hide serialization and wiring failures. Keep one real boundary test for each important adapter.
  • End-to-end tests are valuable but expensive and flaky; they should protect journeys, not duplicate every branch already tested below.
  • Mutation testing is a periodic test-quality audit, not a per-edit gate. On Windows, verify the tool's runtime requirements before adding it to CI.
  • Agent trajectories need task-outcome checks and tool-call checks, not only final-text similarity.
  • A VM harness is an execution environment, not a release profile. Reuse the VM for staging and security checks, but attach signing and artifact identity checks only to release-attestation.

Troubleshooting

SymptomLikely causeAction
Stop gate runs in a docs-only changeProject has no Git-visible status or a broad overrideCheck git status; keep the default command scoped in .claude/test-policy.json
Fast suite passes, integration failsA real boundary was changed or mocked awayAdd/fix the boundary test; do not weaken the fast gate
E2E is flakyTiming, shared state, browser/environment dependencyMake state isolated and waits explicit; reduce E2E to a stable smoke
Generated test passes without exposing the bugTest asserts implementation details or never goes redReproduce the pre-fix failure and assert the user-visible invariant
Agent claims completion with skipped checksMissing evidence contract or verifierRecord the skip reason and run proof-verify for high-risk work
Agent says the harness is too strict or blocks smokeProfiles are coupled or a gate is misplacedInvoke harness-feedback; capture the blocker, split profiles, and rerun the reduced smoke
A later audit asks to repeat a green earlier stageProof identity was not recorded, or its source/input changedCheck the stage receipt; reuse a sealed matching receipt or record a superseding stage

Perguntas frequentes

O que a habilidade de IA Testing Strategy faz?

Use when planning or reviewing tests for a code change, choosing between unit, focused regression, integration, contract, end-to-end, performance, security, property-based, or agent-evaluation checks; classify change risk first and select the smallest evidence set that proves the behavior. Do not use for a single obvious test command, pure documentation changes, or a full security audit without a testing question.

Por que usar Testing Strategy no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Testing Strategy é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Testing Strategy no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/AnastasiyaW/codex-claude-code-config/tree/main/skills/development/testing-strategy. O TypingMind lê o arquivo SKILL.md e instala a habilidade para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Testing Strategy?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Testing Strategy?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Testing Strategy com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Testing Strategy é gratuita?

Sim. A habilidade é publicada no GitHub por AnastasiyaW sob a licença MIT. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇