evaluate-pr-tests

Evaluates PR test coverage, quality, conventions, and test type appropriateness for .NET MAUI pull requests.

23.3k|2.0k|Updated May 8, 2020
One-click install
npx skills add https://github.com/dotnet/maui --skill evaluate-pr-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: evaluate-pr-tests
Source: https://github.com/dotnet/maui/tree/main/.github/skills/evaluate-pr-tests
Command: npx skills add https://github.com/dotnet/maui --skill evaluate-pr-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Reviewing whether tests added in a pull request actually cover the fix, follow project conventions, and use the right test type is time-consuming and inconsistent. This Skill automates context gathering and provides a structured rubric to evaluate PR tests against nine criteria, producing an actionable report.

Core Features & Use Cases

  • Automated Context Gathering: A PowerShell script categorizes changed files (fix vs. UI/device/unit/XAML tests), checks naming and attribute conventions, detects anti-patterns like Task.Delay, and verifies AutomationId consistency between HostApp and test files.
  • Nine-Criteria Evaluation Rubric: Assesses fix coverage, edge cases, test type appropriateness (preferring unit over device over UI tests), convention compliance, flakiness risk, duplicate coverage, platform scope, assertion quality, and fix-test alignment.
  • Structured Report Output: Produces a standardized verdict report with pass/concern/fail ratings per criterion plus prioritized recommendations.
  • Use Case: Before merging a .NET MAUI PR that fixes a CollectionView selection bug, run the Skill to confirm the new test actually exercises the fixed code path, uses the lightest appropriate test type, and contains no flaky patterns.

Quick Start

Ask the AI to evaluate the tests in the current pull request for coverage and quality, and it will run the context-gathering script and produce a structured evaluation report.

Frequently Asked Questions about evaluate-pr-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I evaluate test quality in a pull request?

Run the Gather-TestContext.ps1 script to collect automated context on changed files, conventions, and anti-patterns, then evaluate the tests against the nine criteria in the rubric. The output is a structured report with pass, concern, or fail verdicts per criterion.

How to check if a PR test covers the actual fix?

Trace the test's actions through the code to the fix location and ask whether the test would fail if the fix were reverted. Tests that only verify a page loads or assert on unrelated behavior are flagged as insufficient fix coverage.

When should I use unit tests instead of UI tests?

Prefer unit tests for pure logic, property changes, and event wiring; use device tests for platform-specific rendering or native API interaction; reserve UI tests for user interaction flows and screenshot verification. The Skill recommends the lightest test type that can verify the fix.

What tools are required to run the PR test evaluation script?

The script requires git, PowerShell (pwsh), and the GitHub CLI (gh) for PR context detection. It can auto-detect the base branch from the current PR or accept an explicit PR number or base branch parameter.

Why does the evaluation report no changed files?

This happens when the wrong base branch is used for the diff. Pass the -BaseBranch parameter explicitly, or provide -PrNumber so the script fetches the diff directly from the GitHub API regardless of local checkout state.

What test anti-patterns does the evaluation detect?

The script detects Task.Delay and Thread.Sleep usage, missing WaitForElement calls before interactions, obsolete APIs like Application.MainPage and Frame, inline platform #if directives, and Entry or Editor controls in screenshot tests that cause cursor-blink flakiness.