Compétences test-generator
🧪

test-generator

Sûr 🌐 Accès réseau📁 Accès au système de fichiers⚙️ Commandes externes

pytestテストのボイラープレートを生成

Également disponible depuis: CuriousLearner

一からテストを書くには時間がかかり、プロジェクトの規約に従う必要があります。このスキルは、適切なAAAパターン、型ヒント、パラメータ化されたテストケースを含む包括的なテストテンプレートをプロジェクトの標準に合わせて自動生成します。

Prend en charge: Claude Codex Code(CC)
📊 69 Adéquat
1

Télécharger le ZIP du skill

2

Importer dans Claude

Allez dans Paramètres → Capacités → Skills → Importer un skill

3

Activez et commencez à utiliser

Tester

Utilisation de "test-generator". generate tests for src/utils.py - function format_name(first: str, last: str) -> str

Résultat attendu:

  • Created: tests/test_utils.py
  • Test class: TestFormatName
  • Test cases: basic, valid input, invalid input, edge cases
  • All tests follow AAA pattern with type hints
  • Review TODO comments and add actual test data

Utilisation de "test-generator". generate pytest fixture for database connection

Résultat attendu:

  • Created: conftest.py entry
  • Fixture name: db_connection
  • Provides Generator[Database, None, None] with proper setup and teardown
  • Add initialization parameters and cleanup logic

Audit de sécurité

Sûr
v5 • 1/16/2026

This is a pure documentation skill containing only SKILL.md with usage instructions and 5 Jinja2-style templates for pytest test generation. No executable scripts, network calls, or file writes exist. All static findings are false positives: template variables like {module_name} were misidentified as cryptographic algorithms, markdown code block backticks were misidentified as shell execution, and documentation instructions like 'Read the source file' were misidentified as system reconnaissance.

7
Fichiers analysés
976
Lignes analysées
3
résultats
5
Total des audits

Score de qualité

38
Architecture
100
Maintenabilité
85
Contenu
21
Communauté
100
Sécurité
87
Conformité aux spécifications

Ce que vous pouvez construire

新しいTDDプロジェクトを開始

新しい関数やクラスを実装する前にテストテンプレートを生成します

テスト標準を適用

チームリポジトリ間で一貫したテストパターンを作成します

テストカバレッジを構築

パラメータ化されたテストとエッジケースのテンプレートでテストファイルを迅速にスキャフォールディングします

Essayez ces prompts

基本的な関数テスト
generate tests for src/my_project/utils.py - function calculate_total(items: list[float]) -> float
メソッド付きクラス
generate tests for UserManager class with create_user and delete_user methods
非同期API関数
generate async tests for fetch_user_data(user_id: str) -> dict function
パラメータ化されたバリデーター
generate parametrized tests for validate_email function with various valid and invalid email formats

Bonnes pratiques

  • 生成されたテストを即座に実行して失敗することを確認します(TDDのレッドフェーズ)
  • すべてのTODOコメントを実際のテストデータに置き換えてから実装します
  • カバレッジを最大化するために複数の入力組み合わせにパラメータ化されたテストを使用します

Éviter

  • 内部関数やバリデーターをモックすることは避け、可能な限り実際のコードを使用します
  • 1つの関数で複数の無関係な動作をテストするテストは書かないでください
  • 過度なモッキングを避け、HTTP、データベース、ファイルI/O、時間、ランダム値のみをモックします

Foire aux questions

どのPythonバージョンがサポートされていますか?
このスキルはPython 3.9以上に対応した、最新の型ヒントとアノテーションを使用したテストを生成します。
どのテストフレームワークがテンプレートと連携しますか?
テンプレートはpytest、pytest-asyncio(非同期テスト用)、およびpytest-cov(カバレッジ用)と互換性 있도록設計されています。
既存のテストスイートとどのように統合すればよいですか?
テンプレートは標準のpytest規約に従っており、任意のtests/ディレクトリ構造に追加できます。
データは外部に保存または送信されますか?
いいえ。これはプロンプトベースのスキルであり、ネットワークアクセス、ファイル書き込み、外部データ送信は行いません。
生成されたテストが最初に失敗するのはなぜですか?
テストはTDD手法に従います。テスト対象の実際のコードを実装するまでテストは失敗します。これは予想される動作です。
他のテストジェネレーターとどのように比較されますか?
AIが生成したテストとは異なり、これらのテンプレートは厳密なプロジェクトの規約、AAAパターン、型ヒント、ドキュメント文字列に従います。