evaluate-pr-tests
БесплатноЗапускает вложенные скриптыНе проверенEvaluates tests added in a PR for coverage, quality, edge cases, and test type appropriateness. Checks if tests cover the fix, finds gaps, and recommends…
от dotnet★ 23 319 звёзд на GitHubОб этом скилле
Evaluate PR Tests
Evaluates the quality, coverage, and appropriateness of tests added in a PR. Produces a structured report with actionable findings.
When to Use
- ✅ PR has tests and you want to evaluate their quality
- ⚠️ PR has no test files -- output a ❌ Fix Coverage verdict noting no tests were added; skip remaining criteria
- ✅ Reviewing whether tests adequately cover the fix
- ✅ Checking if a lighter test type could be used instead
- ✅ Before merging a PR, as part of review
Quick Start
# Auto-detect PR and base branch
pwsh .github/skills/evaluate-pr-tests/scripts/Gather-TestContext.ps1
# With explicit base branch
pwsh .github/skills/evaluate-pr-tests/scripts/Gather-TestContext.ps1 -BaseBranch "origin/main"
Workflow
Step 1: Gather Automated Context
Run the script to get file categorization, convention checks, and anti-pattern detection:
pwsh .github/skills/evaluate-pr-tests/scripts/Gather-TestContext.ps1
This produces a report at CustomAgentLogsTmp/TestEvaluation/context.md with:
- File categorization (fix files vs test files by type)
- Convention compliance checks (naming, attributes, anti-patterns)
- AutomationId consistency (HostApp ↔ test)
- Existing similar tests
- Platform scope analysis
Step 2: Understand the Fix
Read the fix files to understand:
- What changed — which code paths were modified
- Why it changed — the bug being fixed (from PR description or linked issue)
- Edge cases — what boundary conditions exist in the changed code
Step 3: Evaluate the Tests
Read each test file and evaluate against all criteria below. For each criterion, provide a verdict (✅ Pass, ⚠️ Concern, ❌ Fail) with explanation.
Step 4: Produce the Report
Output a structured evaluation report (see Output Format below).
Evaluation Criteria
1. Fix Coverage
Question: Does the test exercise the actual code paths changed by the fix?
How to check:
- Trace the test's actions through the code to the fix location
- Would the test fail if the fix were reverted?
- Does the test assert on the specific behavior that was broken?
Red flags:
- Test only checks that a page loads (doesn't exercise the fix)
- Test asserts on a different property/behavior than what was fixed
- Test interacts with the control but doesn't trigger the buggy code path
Example — Good:
// Fix: CollectionView.SelectedItem setter now clears selection when set to null
// Test: Sets SelectedItem to null and verifies selection is cleared
App.Tap("SelectItem");
App.Tap("ClearSelection"); // Sets SelectedItem = null
var text = App.FindElement("SelectionStatus").GetText();
Assert.That(text, Is.EqualTo("None")); // Directly tests the fix
Example — Bad:
// Fix: CollectionView.SelectedItem setter
// Test: Just checks CollectionView renders (doesn't test selection clearing)
App.WaitForElement("MyCollectionView");
Assert.That(true); // Proves nothing about the fix
2. Edge Cases & Gaps
Question: Does the test cover boundary conditions, or only the happy path?
Check for these common gaps:
| Gap Type | What to Look For |
|---|---|
| Null/empty | Does the fix handle null? Is it tested? |
| Boundary values | Min, max, zero, negative, very large |
| Repeated actions | Does calling the action twice cause issues? |
| Platform-specific | Does the bug only occur on certain platforms? |
| Async/timing | Does the fix involve async code? Race conditions? |
| State transitions | Does the test cover before→after state changes? |
| Error paths | What happens when the operation fails? |
| Combination effects | Does the fix interact with other properties/features? |
How to suggest missing edge cases:
- Read the fix code and identify every conditional branch
- For each branch, check if the test covers it
- Look for
if (x == null),if (x <= 0), try/catch blocks - Consider: "What inputs would make this fix NOT work?"
3. Test Type Appropriateness
Question: Is this the lightest test type that can verify the fix?
Preference order (lightest → heaviest):
| Priority | Type | When Appropriate | Project |
|---|---|---|---|
| ⭐ 1st | Unit Test | Pure logic, property changes, data transformations, binding behavior, event wiring | *.UnitTests.csproj |
| ⭐ 1st | XAML Test | XAML parsing, XamlC compilation, source generation, markup extensions | Controls.Xaml.UnitTests |
| ⭐⭐ 2nd | Device Test | Platform-specific rendering, native API interaction, handler mapping | *.DeviceTests.csproj |
| ⭐⭐⭐ 3rd | UI Test | User interaction flows, visual layout, screenshot comparison, end-to-end scenarios | TestCases.Shared.Tests |
Decision tree:
Does the test need to interact with visual UI elements?
YES → Is it checking visual layout/appearance?
YES → UI test (VerifyScreenshot) ✅
NO → Could the interact
Установить evaluate-pr-tests в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл evaluate-pr-tests?
Evaluates tests added in a PR for coverage, quality, edge cases, and test type appropriateness. Checks if tests cover the fix, finds gaps, and recommends lighter test types when possible. Prefer unit tests over device tests over UI tests. Triggers on: 'evaluate tests in PR', 'review test quality', 'are these tests good enough', 'check test coverage', 'is this test adequate', 'assess test coverage for PR'.
Как установить скилл evaluate-pr-tests?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл evaluate-pr-tests запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic