搜索

PythonReactSEOPDF
GitHub Skill

testing-protocol

Testing workflow tools following Modified-Code Protocol for intelligent test selection.

tao3k☆ 7 仓库 Stars0 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

Testing Protocol Skill System Prompts

When using the Testing Protocol skill, follow these patterns for effective test execution.

Modified-Code Protocol

Step 1: Identify Modified Files

The smart_test_runner automatically detects:

  • Staged files (git diff --cached --name-only)
  • Unstaged files (git diff --name-only)
  • Untracked files (git ls-files --others)
Step 2: Categorize Changes
Category Detection Action
docs_only .md, .txt, .rst, .adoc Skip tests
mcp_server mcp-server/ in path MCP tests only
tool_router tool-router/ in path MCP tests only
nix_config .nix or devenv in path Full suite
code_changes .py, .nix, .yaml, etc. Full suite
Step 3: Execute Appropriate Tests
  • Skip: Return immediately with rationale
  • MCP only: Run just test-mcp-only
  • Full: Run just test

When to Use Each Tool

smart_test_runner (Most Common)
await smart_test_runner()

Automatically determines what to test.

smart_test_runner with focus
await smart_test_runner(focus_file="src/agent/tests/test_phase13.py")

When you know exactly what to test.

run_test_command
await run_test_command(command="just test-mcp-only")

When you need to run a specific test command.

get_test_protocol
await get_test_protocol()

To remind yourself of the protocol rules.

Test Command Reference

Command Purpose
just test Full test suite
just test-unit Unit tests only
just test-int Integration tests
just test-mcp MCP tests (includes mcp tests)
just test-mcp-only MCP tests only
pytest path Specific file/directory

Common Scenarios

After making a documentation change
await smart_test_runner()
# Returns: {"strategy": "skip", "reason": "Docs only - skipping tests"}
After changing MCP server code
await smart_test_runner()
# Returns: {"strategy": "mcp_only", "command": "just test-mcp-only"}
After changing Nix configuration
await smart_test_runner()
# Returns: {"strategy": "full", "command": "just test"}
After a bug fix in Python code
await smart_test_runner()
# Returns: {"strategy": "full", "command": "just test"}

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-02-02
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!