一部の編集内容は現在英語で提供されています。

プロンプト 編集のみ 更新

ユニットテスト生成プロンプト

関数やモジュールから、正常系・境界・例外をカバーする的を絞ったユニットテストを生成し、前提に依存するアサーションを示します。

ユニットテストテスト生成プロンプト工学
再利用可能なプロンプト

自分用に変更

プロンプト言語:英語
ブラウザ内で動作

手順

5 ステップ
  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.

ネガティブプロンプト

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

記録するパラメータ

framework
infer from the project
coverage
happy path + boundaries + errors
output
tests + run instructions
変数
3 個のカスタマイズ項目

制限

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

関連テンプレート

すべて見る →