Certains détails éditoriaux sont encore disponibles en anglais.

Prompt Éditorial uniquement Mis à jour

Prompt de génération de tests unitaires

Générez des tests unitaires ciblés à partir d’une fonction ou d’un module : cas nominal, limites et erreurs attendues, avec les hypothèses signalées.

tests unitairesgénération de testsingénierie de prompt
Prompt réutilisable

Personnalisez-le

Langue du prompt : anglais
Fonctionne dans votre navigateur

Workflow

5 étapes
  1. Paste the code and pick a framework.
  2. Generate the tests.
  3. Review each test's intent and assumptions.
  4. Run the suite and fix failures.
  5. Add only the tests that add real coverage.

Prompt négatif

testing private internals, brittle snapshots, flaky timing assertions, empty test cases

Paramètres à noter

framework
infer from the project
coverage
happy path + boundaries + errors
output
tests + run instructions
Variables
3 champs personnalisables

Limites

  • Generated tests can assert the wrong expected value.
  • They may miss framework-specific setup.
  • They are a starting point, not a proof of correctness.

Modèles associés

Tout voir →