Skip to content

Add "tests" Copilot skill with test discovery and source-to-test mapping#11014

Open
simonrozsival wants to merge 5 commits intomainfrom
testing-skill
Open

Add "tests" Copilot skill with test discovery and source-to-test mapping#11014
simonrozsival wants to merge 5 commits intomainfrom
testing-skill

Conversation

@simonrozsival
Copy link
Copy Markdown
Member

Summary

Adds a Copilot skill for running, discovering, and recommending tests in the dotnet/android repository.

Key features:

  • Run tests — knows build prerequisites, test assemblies, filter syntax, and how to interpret results for every test type in the repo
  • Discover tests — lists available test suites organized by tier
  • Recommend tests for code changes — maps source file paths to relevant test suites, so users can ask "which tests should I run for this change?"
  • Renames Tier 1/Tier 2 terminology to Standalone/Full-build for clarity
  • Prompts the user before attempting a full repo build when the local SDK is missing

Files changed:

  • .github/skills/run-tests/SKILL.md — skill definition with workflows
  • .github/skills/run-tests/references/test-catalog.md — test area catalog

simonrozsival and others added 2 commits March 25, 2026 09:38
…uild

The skill previously told Copilot to silently skip tests when the local
SDK was not built, without asking the user. This caused confusion because
users expected all tests to run.

Changes:
- Split tests into Tier 1 (standalone, plain dotnet test on .csproj) and
  Tier 2 (requires local SDK via dotnet-local.sh)
- Tier 1 tests run immediately without any build prerequisites
- When Tier 2 tests are requested but SDK is missing, the skill now
  instructs Copilot to use ask_user to let the user choose YES (full
  build) or NO (skip Tier 2)
- Added 15 standalone test projects to the test catalog with their
  dotnet test commands
- Added tier labels to all test catalog sections

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add ability to recommend tests for code changes (source-to-test mapping)
- Add test discovery/listing workflow
- Rename Tier 1/Tier 2 to Standalone/Full-build for clarity
- Add source path to test suite mapping table

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@simonrozsival simonrozsival added the copilot `copilot-cli` or other AIs were used to author this label Mar 25, 2026
- Rename skill from 'run-tests' to 'tests' for broader scope
- Reduce SKILL.md from 304 to 87 lines following Copilot skill best practices
- Trust Claude's existing knowledge; only document repo-specific details
- Move source-to-test mapping into compact table
- Keep test-catalog.md as detailed reference (progressive disclosure)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@simonrozsival simonrozsival marked this pull request as ready for review March 25, 2026 15:52
Copilot AI review requested due to automatic review settings March 25, 2026 15:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new GitHub Copilot skill intended to help contributors run, discover, and select appropriate tests in the dotnet/android repo by documenting test tiers, commands, and a source-to-test mapping.

Changes:

  • Introduces a new tests skill definition describing workflows for running, discovering, and recommending tests.
  • Adds a test catalog reference document mapping test areas to projects/assemblies, filters, prerequisites, and device requirements.
  • Documents “Standalone” vs “Full-build” test tiers and provides command examples for common suites.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
.github/skills/tests/SKILL.md Defines the Copilot skill behavior, tier definitions, and source-to-test mapping.
.github/skills/tests/references/test-catalog.md Provides the detailed catalog of test suites, commands, and prerequisites used by the skill.

simonrozsival and others added 2 commits March 26, 2026 09:29
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
RunTests.targets was deleted in e987ac4 (PR #8720), so this
make target no longer works.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@simonrozsival simonrozsival changed the title Add run-tests Copilot skill with test discovery and source-to-test mapping Add "tests" Copilot skill with test discovery and source-to-test mapping Mar 26, 2026
@simonrozsival
Copy link
Copy Markdown
Member Author

Addressing review comments:

  • SKILL.md table formatting: No || prefixes — tables use standard | ... | syntax. No change needed.
  • SingleProjectTest description: Fixed — it's Android single-project, not MSIX. ✅
  • make run-ji-tests: Good catch — RunTests.targets was deleted in Remove xabuild completely #8720 so this is a dead target. Replaced with dotnet test guidance. ✅
  • Skill name mismatch: Directory and name: field are both tests — consistent. Updated PR title to match.
  • test-catalog.md table formatting: Same as GREF logging is broken in multi-process apps #1 — no || prefixes exist. No change needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

copilot `copilot-cli` or other AIs were used to author this

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants