mcpField
T
testing-assistant

testing-assistant

github.com/robthepcguyテスト・品質20656 回インストール2 日前に更新
リポジトリ

testing-assistant について

Claude Patent Creator のテストと検証を支援するスキルです。自動テスト、Claude Code での手動確認、テスト作成、性能評価を扱います。

主な機能

  1. 01インストールと各機能のテスト実行
  2. 02Claude Code での MCP ツール検証
  3. 03ユニットテストと回帰テストの作成
  4. 04検索・分析速度のベンチマーク

活用シーン

  1. 01コード変更後のプロジェクト確認
  2. 02テスト失敗や性能問題の調査
  3. 03特許検索・分析ツールの検証

MCP 対応

Claude Code を介して MCP ツールを手動テストする手順と、ツールの利用可否を確認する項目を示します。

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/robthepcguy/claude-patent-creator --skill testing-assistant

インストール後、Claude Code で/testing-assistantを入力して読み込まれたか確認します。

詳細

テストアシスタントスキル

Claude Patent Creator のテストと検証を行うエキスパートシステムです。

CLAUDE 向け: テストスクリプトは scripts/ ディレクトリにあります。

  • 適切なテストを直接実行してください
  • プロジェクトのルートディレクトリから実行してください
  • テストにはアクティブな venv が必要です
  • テストが失敗した場合にのみ、診断を実行してください

使用する場面

テストスイートの実行、新機能の検証、変更後のテスト、失敗のデバッグ、テストの作成、CI/CD の設定、パフォーマンステスト、E2E 検証、リグレッションテスト。

テストピラミッド

         /\
        /  \       E2E (Manual + Automated)
       /----\
      / API  \     Integration Tests
     /--------\
    /  Unit   \    Unit Tests
   /----------\

方針: ユニットテスト(高速で分離されている)を多くし、統合テスト(中程度)を少なく、E2E テスト(低速)を最小限にします。

テストスイートの概要

scripts/
+-- test_install.py          # Complete installation validation
+-- test_gpu.py              # GPU detection and CUDA
+-- test_bigquery.py         # BigQuery connection
+-- test_analyzers.py        # Claims, spec, formalities
+-- test_embedding_speed.py  # Performance benchmarks
+-- test_checkpoint.py       # Index checkpoint system

クイックテスト:

python scripts/test_install.py

Claude による手動テスト

Claude Code のインターフェースを通じて MCP ツールをテストします。

クイックテストの例
1. MPEP Search: "Search MPEP for claim definiteness requirements"
2. Patent Search: "Search for patents about neural networks filed in 2024"
3. Claims Review: "Review these claims: [paste test claims]"
4. Full Review: "/full-review" (with test application)
5. Diagrams: "Create a flowchart for this process: [describe]"
検証チェックリスト
[OK] MPEP search returns relevant results
[OK] BigQuery search finds patents
[OK] Claims analyzer identifies issues
[OK] Specification analyzer checks support
[OK] Formalities checker validates format
[OK] Diagrams generate successfully
[OK] Full review workflow completes
[OK] All MCP tools accessible
[OK] Error messages clear and helpful
[OK] Performance acceptable (<2s most ops)

新しいテストの作成

クイックスタート
# Unit test template
def test_basic_functionality():
    from mcp_server.your_module import YourClass
    instance = YourClass()
    result = instance.method("test input")
    assert result is not None
    print("[OK] test_basic_functionality passed")

テストカテゴリ:

  1. 基本機能
  2. エッジケース
  3. パフォーマンス
  4. エラー処理

パフォーマンステスト

クイックベンチマーク
from mcp_server.mpep_search import MPEPIndex
import time

index = MPEPIndex()
index.build_index()
index.search("test", top_k=5)  # Warm up

start = time.time()
result = index.search("claim definiteness", top_k=5)
duration = time.time() - start
print(f"Search took: {duration:.3f}s")
パフォーマンスのしきい値
操作しきい値備考
MPEP 検索(初回)<3sモデルの読み込み
MPEP 検索(2 回目以降)<500msモデルをキャッシュ
BigQuery 検索<2sネットワークに依存
クレーム分析<3s20 件のクレーム
明細書分析<10s10 ページ
図の生成<1sSVG 出力

テスト失敗時のトラブルシューティング

問題解決策
インポートエラーvenv を有効にして、pip install -r requirements.txt を実行します
GPU テストの失敗nvidia-smi を確認し、PyTorch を再インストールするか、テストをスキップします
BigQuery の失敗再認証します:gcloud auth application-default login
インデックスが見つからない再構築します:patent-creator rebuild-index
処理が遅すぎるGPU の使用状況を確認します。初回実行は時間がかかります。システム負荷を確認してください

ベストプラクティス

  1. 変更のたびにテストする
  2. テストを自動化する
  3. テストピラミッド(ユニットテストを多くし、E2E テストを少なくする)
  4. テストを高速にする(スイート全体で 5 分未満)
  5. テストを分離する(依存関係なし)
  6. 明確なアサーションを設定する
  7. テストを文書化する
  8. テストをバージョン管理する
  9. 定期的に実行する(毎週)
  10. パフォーマンスを監視する

クイックリファレンス

すべてのテストを実行
python scripts/test_install.py
python scripts/test_gpu.py
python scripts/test_bigquery.py
python scripts/test_analyzers.py
python scripts/test_embedding_speed.py
リグレッションテスト
python scripts/test_install.py || exit 1
python scripts/test_bigquery.py || exit 1
python scripts/test_analyzers.py || exit 1
echo "[OK] All regression tests passed!"
手動チェックリスト
□ Ask Claude to search MPEP
□ Ask Claude to search patents
□ Ask Claude to review claims
□ Run /full-review command
□ Generate a diagram
□ Verify all tools work
□ Check performance (<2s)

コメント