Phase de liste de tests TDD

VérifiéSûr

Guide pour créer une liste de tests exhaustive en phase TDD, couvrant chaque règle et exemple de la spécification, ordonnée du plus simple au plus complexe.

Spar Skills Guide Bot
TestingIntermédiaire
02/11/2026
Claude CodeCursorWindsurfCopilotCodex
#tdd#test-planning#specification-coverage#inactive-tests#coverage-analysis

Recommandé pour

Synthèse automatique

Guide un agent dans la phase de liste de tests du TDD en transformant chaque règle et exemple d'une spécification en tests inactifs ordonnés.

Points forts

  • Exige que chaque règle, exemple et question de clarification de prompt.md corresponde à au moins un test inactif.
  • Impose un ordre du plus simple au plus complexe et maintient tous les tests inactifs jusqu'à la phase d'implémentation.
  • Ajoute une vérification de couverture par dimensions indépendantes de la spécification : opérations, variantes, transitions d'état et comportements d'erreur.
  • Demande un contrat d'erreur observable au lieu d'inventer des types ou des messages non spécifiés.

Limites

  • Suppose que la spécification se trouve dans prompt.md et que le projet dispose d'un mécanisme de tests inactifs déjà établi.
  • S'arrête à la liste de tests ; ne couvre ni l'activation des tests, ni l'implémentation, ni le refactoring.
  • Les consignes sur les contrats d'erreur non spécifiés laissent encore place à l'interprétation de l'agent.
Quand l'utiliser

À utiliser lorsqu'une spécification est prête et qu'il faut établir une liste structurée de tests inactifs axée sur la couverture avant de commencer l'implémentation.

Quand l'éviter

Ne pas utiliser sans spécification écrite, ni lorsqu'il faut des tests exécutables et des conseils d'implémentation plutôt qu'une planification de tests.

Analyse de sécurité

Sûr
Score qualité84/100

The file is purely instructional prose about a TDD planning phase: it tells the agent to read a specification, enumerate inactive tests, order them, and summarize coverage. There are no shell commands, no network calls, no credential handling, no encoded payloads, no destructive operations, and no attempts to override the auditor or the host agent's safety behavior. The only executable-adjacent content is generic guidance to keep tests inactive until later phases, which is benign.

Points d'attention
  • •Informational: no allowed-tools are declared, yet the skill directs the agent to read the spec, create/modify test files, and verify a test suite; tool needs are implicit rather than declared (transparency nit, not a risk).
Comment cette analyse est faite

Exemples

TDD list from a feature spec
Read prompt.md and create the complete TDD test list for the feature, turning every rule and example into an inactive test ordered from simplest to most complex.
Error-contract coverage
Our spec describes several rejection cases without defining error types; build the inactive test list and make each failure case observable, stating any assumption you need to make.
Coverage cross-check
Review the specification and our existing inactive tests, then add missing tests for independent dimensions like operations, variants, and state transitions.

name: test-list description: TDD Test List Phase - Create a comprehensive test list covering every example and rule from the specification

TDD Test List Phase

You are now in the Test List Phase of TDD. Follow these instructions to create a comprehensive test list.

Your Mission

Create a test list using the project's inactive-test mechanism that covers every rule and every example from the specification:

  1. Read the specification (prompt.md) thoroughly -- every rule, every example, every clarifying question (?)
  2. Turn each example into at least one inactive test case
  3. Order tests from simplest to most complex
  4. Keep every test inactive -- NO executable tests yet

Process

Step 1: Understand the Feature

Read the complete specification. Pay special attention to integration examples and clarifying questions (marked with ?) -- these disambiguate rules that may seem open to interpretation in isolation.

  • What are all the operations the system must support?
  • What rules govern each operation?
  • Which examples in the spec illustrate these rules?
  • For rejection or failure cases, what is the observable error contract: a thrown error, an error result, a status, or another outcome? If an error is thrown, does the specification define its type and/or message?

Step 2: Identify Test Cases from the Spec

Walk through the specification section by section. For each rule and each example:

  • Create a test case that verifies the described behavior
  • Include the expected values from the spec in the test description
  • If a clarifying question (?) resolves an ambiguity, create a test for the clarified interpretation
  • If the spec uses an example-mapping format (rules, examples, questions), every listed example must have a corresponding test
  • Make every rejection or failure case explicit in observable terms, such as a thrown error of the profile's representative type, an error result, or an error status
  • Include an exact error type or message only when the specification establishes it
  • If the specification merely says rejects, fails, invalid, or equivalent without defining the observable contract, choose the most defensible reading of the specification, state that reading explicitly in the test description, and continue; do not silently invent an unstated contract

Step 3: Order Tests (Simple -> Complex)

Arrange tests in increasing complexity:

  1. Simplest case (often empty/zero/single item)
  2. Individual rules in isolation
  3. Rules with modifiers
  4. Combinations of multiple rules
  5. Multi-step scenarios (e.g., operations that reference earlier results)

Step 4: Write Test File

Create the test file using the project's inactive-test syntax. Keep every listed test inactive.

Step 5: Cross-Check Independent Specification Dimensions

Before declaring the list complete, review the specification and the inactive tests as a coverage map:

  • Identify independently specified dimensions such as operation, entity or variant, input category, policy attribute, state transition, and observable result.
  • For each explicit value named by the specification, ask whether every independently changeable rule that applies to it has a discriminating test. A test of one attribute does not establish another attribute of the same value.
  • Look especially for parallel catalogues, mappings, tables, or branches. Ask whether one side could omit an entry while every current test still passes.
  • Use a representative test where several values are governed by one uniform rule, but test each value separately when the specification assigns it independent data or when entries can drift independently.
  • Check each operation separately. Coverage through quote, parsing, or presentation does not establish policy creation, claim behavior, persistence, or another operation over the same entity.
  • For every uncovered cell, add an inactive test or record why an existing test discriminates that cell. Do not create a mechanical Cartesian product when dimensions cannot fail independently.

Use a falsifying counterfactual as the final check: if one explicitly specified entry or rule were removed or changed while neighboring behavior stayed correct, would an inactive test detect it once activated? If not, the list is not complete.

Step 6: Provide Summary

After creating and cross-checking the test list, provide this summary:

Test List Created:
**Feature**: [feature name]
**Test File**: [test file path]
**Tests**: [count]

**Test Cases** (ordered simple -> complex):
1. [first test description]
2. [second test description]
3. [third test description]
...

**Coverage Cross-Check**:
- [independent dimensions reviewed]
- [parallel catalogues or operations checked for omissions]
- [why representative tests are discriminating where exhaustive combinations are unnecessary]

Step 7: Continue the Workflow

Provide the Test List summary, then return control to the invoking workflow. EXACT Coding Predictive TDD predicts and verifies that the inactive list leaves the suite green without creating a method commit.

Important Guidelines

DO

  • Cover every spec example with at least one test
  • Cover every operation described in the spec
  • Give every clarifying question (?) a corresponding test
  • Order tests simple -> complex
  • Use the project's inactive-test mechanism for all tests
  • Include expected values in descriptions
  • State rejection and failure outcomes as explicit observable contracts
  • Name your chosen reading explicitly when the spec leaves a failure mechanism open
  • Keep tests independent
  • One behavior per test
  • Make the independent-dimensions cross-check visible in the summary

DON'T

  • Write executable tests yet
  • Think about implementation instead of behavior
  • Turn vague words such as rejects into an invented error contract without saying so
  • Leave a rejection test vague when its observable outcome is known
  • Miss an entire operation described in the spec
  • Order randomly

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/tdd-test-list-phase-mvg6tye5/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

mkdir -p '.skill-downloads/tdd-test-list-phase-mvg6tye5' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/tdd-test-list-phase-mvg6tye5/download' --output '.skill-downloads/tdd-test-list-phase-mvg6tye5/SKILL.md.part' && mv '.skill-downloads/tdd-test-list-phase-mvg6tye5/SKILL.md.part' '.skill-downloads/tdd-test-list-phase-mvg6tye5/SKILL.md'

2. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.

Claude Code
test -f '.skill-downloads/tdd-test-list-phase-mvg6tye5/SKILL.md' && test -s '.skill-downloads/tdd-test-list-phase-mvg6tye5/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/test-list' && cp -R '.skill-downloads/tdd-test-list-phase-mvg6tye5' '.claude/skills/test-list'

Cursor
test -f '.skill-downloads/tdd-test-list-phase-mvg6tye5/SKILL.md' && test -s '.skill-downloads/tdd-test-list-phase-mvg6tye5/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/test-list' && cp -R '.skill-downloads/tdd-test-list-phase-mvg6tye5' '.cursor/skills/test-list'

Codex
test -f '.skill-downloads/tdd-test-list-phase-mvg6tye5/SKILL.md' && test -s '.skill-downloads/tdd-test-list-phase-mvg6tye5/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/test-list' && cp -R '.skill-downloads/tdd-test-list-phase-mvg6tye5' '.agents/skills/test-list'

OpenSkills

OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.

Installation officielle d’OpenSkills
openskills install './.skill-downloads/tdd-test-list-phase-mvg6tye5'

openskills read 'tdd-test-list-phase-mvg6tye5'

La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.

Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.

openskills sync

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/tdd-test-list-phase-mvg6tye5/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires