mirror of
https://github.com/dotnet/skills.git
synced 2026-09-20 09:49:54 +08:00
eval-exec-opus48
104 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
2a193300ca |
Replace 'terminal' with 'bash' and 'powershell' in agent tools (#660)
The skill-validator only recognizes 'bash' and 'powershell' as built-in shell tools, not 'terminal'. Update the four affected agents in the dotnet-test plugin to use both for cross-platform support. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
b0c2336d49 |
Tighten crap-score boundary to fix coverage-analysis plateau activation (#652)
Dashboard data showed coverage-analysis failing to activate in 8/10 recent scheduled plugin-mode runs for the 'Coverage plateau diagnosis' scenario, while activating reliably in isolated mode. PR #647 added positive triggers to coverage-analysis but did not address sibling attention competition. The crap-score description matched the plateau prompt almost as well as coverage-analysis (it advertised 'evaluate whether complex methods have sufficient test coverage' + 'Requires code coverage data (Cobertura XML)') without redirecting project-wide / stuck-coverage diagnosis to coverage-analysis. With 22 sibling skills competing for attention this overlap is enough to suppress activation altogether. Tighten the crap-score frontmatter to: - Scope positive triggers to a named method, class, or single source file (the actual eval surface — see tests/dotnet-test/crap-score/ eval.yaml, all 3 scenarios target OrderService.cs). - Add explicit DO NOT USE FOR redirects covering project-wide coverage analysis, coverage plateau / stuck coverage, what's blocking coverage, and where to add tests across a project — all of which point at coverage-analysis. skill-validator check passes (22 skills, 11 agents, 1 plugin). Aggregate dotnet-test description size: 14,932 chars (limit 15,000). markdownlint passes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
3d59e44c7e |
Fix coverage-analysis activation for plateau diagnosis prompts (#647)
* Fix coverage-analysis activation for plateau diagnosis prompts coverage-analysis SKILL.md: - Trim verbose implementation details (provider detection, ReportGenerator) that consumed description budget without aiding skill activation - Add explicit USE FOR keywords: coverage stuck, coverage plateau, can't increase coverage, what's blocking coverage code-testing-agent SKILL.md: - Add 'diagnosing coverage plateaus or CRAP score computation (use coverage-analysis)' to DO NOT USE FOR boundary to prevent test-generation skill from intercepting diagnostic prompts * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Strengthen code-testing-agent activation; harden coverage-analysis isolated mode Address eval regressions reported on PR #647 (run 25813728646): 1. code-testing-agent: `Generate tests for ContosoUniversity ASP.NET Core MVC app` was NOT ACTIVATED in plugin mode (detectedSkills=[], skillEventCount=0, invokedAgents=[]). The model bypassed the skill system entirely. - SKILL.md description: restructure to use the proven `Use when user says ...` pattern with quoted trigger phrases (matching the run-tests skill that consistently activates), make the link to the code-testing-generator sub-agent explicit, and tighten DO NOT USE FOR clauses. - eval prompt (eval.yaml + eval.vally.yaml): make the request pipeline-shaped (`project-wide, multi-file test generation task`, `scaffold a new test project`) so the model recognizes it as multi-step work that benefits from the orchestrated pipeline. Explicitly request coverlet.collector + a Cobertura XML run so rubric criterion 1 (`high line coverage as reported by the Cobertura XML in TestResults/`) becomes achievable without overfitting. 2. code-testing-tester agent + code-testing-extensions/dotnet.md: open a scoped exception to the `skip coverage tools` rule. Default behavior stays the same, but when the user/harness explicitly asks for a Cobertura/XML coverage artifact, the agent may add coverlet.collector to the generated test csproj so the harness's coverage command produces output. The agent still does not run the coverage command itself. 3. coverage-analysis SKILL.md: add a `User-visible output is mandatory` guard at the top of the Workflow section. The latest eval showed isolated mode producing literally `(no output)` in 2 of 3 scenarios — the agent ran Compute-CrapScores.ps1 / Extract-MethodCoverage.ps1 / ReportGenerator in parallel, then the session ended without ever surfacing findings. The guard tells the agent to always return a partial summary instead of ending silent, and to deprioritize ReportGenerator HTML when budget is tight. (Plugin-mode quality is already strong: 4.3 / 4.3 / 5.0 — no regression risk there.) Aggregate dotnet-test plugin description size: 14,925 chars (limit 15,000). skill-validator check passes (22 skills, 11 agents, 1 plugin); markdownlint passes for all 4 modified files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Restore MSTest modernization exclusion in code-testing-agent description * Fix isolated-mode coverage-analysis: emit summary before optional ReportGenerator The previous workflow encouraged the agent to run `dotnet tool install` for ReportGenerator in parallel with the CRAP scoring scripts (Phase 2 "Steps 3 and 4 in parallel" + Phase 3 "Steps 5 and 6 in parallel"). In isolated mode that pattern reliably crashed the session with "Failed to persist session events: timeout while waiting for mutex to become available" right after the scripts returned valid data, so the agent never produced the user-facing summary. Restructure the workflow into 5 phases: - Phase 1 (Setup) - unchanged - Phase 2 (Test execution) - skip when Cobertura XML already exists - Phase 3 (Analysis) - run only the two PowerShell scripts, no RG - Phase 4 (User-facing summary) - MANDATORY, must be the next assistant response after Phase 3, before any RG work; also save coverage-analysis.md as a secondary follow-up - Phase 5 (ReportGenerator HTML/CSV) - strictly optional, post-summary, skipped by default for existing-Cobertura and plateau-diagnosis paths Also update references/output-format.md so the Reports section marks RG artifacts as "Not generated (optional - request HTML reports to enable)" when Phase 5 has not run, and update references/guidelines.md so the "show and open the markdown report" rule explicitly defers to the user-facing assistant response. Targets the isolated-mode regressions in PR #647 eval: - Project-wide coverage with existing Cobertura: 1.0/5 -> expected 3+ - Coverage plateau diagnosis: 1.0/5 -> expected 3+ - Run coverage from scratch: 2.3/5 -> expected steady or up Verified: skill-validator check --plugin ./plugins/dotnet-test passes; markdownlint-cli2 clean on all 3 modified files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address PR #647 review comments 1. Prerequisites: distinguish the from-scratch path (needs NuGet for the coverage-provider package install + optional internet for ReportGenerator) from the existing-Cobertura path (needs neither). 2. Add Step 2c "Discover or accept existing Cobertura XML" so the existing-data path actually has $coberturaFiles populated before Phase 3, instead of relying on Phase 2's discovery (which it skips). Also clarify Step 2's destructive Remove-Item only manages the skill-owned coverage-analysis/ subdirectory. 3. references/output-format.md: replace the unconditional "Reports saved to: <coverageDir>/reports/" line with one that always points at <coverageDir>/ (markdown summary + raw Cobertura) and only mentions reports/ if Phase 5 ran. 4. Have Compute-CrapScores.ps1 emit OVERALL_LINE_COVERAGE and OVERALL_BRANCH_COVERAGE from the Cobertura root attributes, and update Phase 4 to read those values directly from the script's output. The Phase 4 mandatory-summary rule no longer requires a separate XML parse before composing the response. Verified: skill-validator check --plugin ./plugins/dotnet-test passes; markdownlint-cli2 clean on all modified files; Compute-CrapScores.ps1 smoke-tested on a synthetic Cobertura XML (emits OVERALL_LINE_COVERAGE:75, OVERALL_BRANCH_COVERAGE:50 alongside HOTSPOTS). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Apply suggestion from @Evangelink * Address unresolved coverage-analysis and eval review comments * Refine follow-up review feedback from validation * Tighten coverage aggregation fallback notes and counters * Clarify pre-response save instruction wording --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> |
||
|
|
42afc2688d |
Add Go, Java, Rust, Ruby, Swift, and Kotlin extensions to code-testing-extensions (#650)
* Add Go, Java, Rust, Ruby, Swift, and Kotlin extensions to code-testing-extensions Adds six new language-specific guidance files to the code-testing-extensions skill, modeled on the existing python.md and typescript.md structure. Each new extension covers: investigate-first rule, toolchain detection, build commands, test commands (with framework variants), lint command, project layout/imports, common errors with fixes, mocking rules, dependency installation as last resort, and a Skip Coverage Tools footer. SKILL.md is updated to advertise the new files in the discovery table. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address review feedback and fix markdownlint issues - rust.md: replace # code span (MD038) with quoted text - java.md: clarify wildcard-import guidance to avoid contradicting the explicit-imports template - java.md: scope 'class must be public' to JUnit 4 only (JUnit 5 allows package-private) - java.md: correct Mockito final-class fix to inline mock maker (default in 5+, mockito-inline for 3.x/4.x); remove incorrect mockito-subclass suggestion - kotlin.md: same Mockito final-class correction - kotlin.md: replace nonexistent testScheduler.testDispatcher() with StandardTestDispatcher(testScheduler) - kotlin.md: rephrase coroutines-test dependency guidance to avoid contradiction - kotlin.md: correct cross-module 'internal' fix; @VisibleForTesting does not widen Kotlin visibility - ruby.md: replace numbered block parameter '_1' with '|f| require f' (works on Ruby < 2.7) - swift.md: Swift Testing requires Swift 6/Xcode 16, not 5.10 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
f532cf1d94 |
Add coverage-touching and self-referential assertion heuristics (#635)
* Add coverage-touching and self-referential assertion heuristics
- test-anti-patterns: add 'Coverage touching' and 'Self-referential assertion'
as named Critical-severity anti-patterns in the detection catalog
- assertion-quality: add 'Tests with self-referential assertions' metric and
a calibration rule distinguishing tautological from valid round-trip assertions
- Add eval scenarios for both new heuristics in test-anti-patterns (coverage-
touching ProductCatalog facade, self-referential SerializerTests)
- Add eval scenario and fixture for self-referential assertions in
assertion-quality (ConfigTests with identity/round-trip patterns)
* Fix test-anti-patterns activation: rewrite description with USE FOR keyword list
The skill was not activating in any eval scenario because the description
used narrative prose instead of the explicit 'USE FOR:' / 'DO NOT USE FOR:'
keyword list pattern that well-activating sibling skills use (run-tests,
writing-mstest-tests). Restructured the description with trigger phrases
matching common user prompts.
* Fix eval activation, timeouts, and add missing vally scenarios
- test-anti-patterns/eval.vally.yaml: increase timeout 2m→5m, add
coverage-touching and self-referential scenarios with constraints
- assertion-quality/eval.vally.yaml: add self-referential scenario
with environment files, broaden assertion pattern
- test-anti-patterns/eval.yaml: add setup.files to all 6 scenarios
to create workspace files that trigger skill discovery/activation
- assertion-quality/eval.yaml: increase timeouts 120→300 for
self-referential and decline-request scenarios, broaden
self-referential assertion pattern
- Create fixture files for mixed-severity, well-written,
coverage-touching, and self-referential test-anti-patterns scenarios
* Address review comments: fix test names and use source references
- Rename ThrowsArgumentException to ThrowsArgumentOutOfRangeException in
PaymentProcessorTests.cs fixture and inlined code in eval.yaml and
eval.vally.yaml to match the actual exception type being asserted.
- Replace inline csproj content blocks with source references to existing
fixture files for UserRepo, Payments, and CatalogService scenarios in
eval.yaml to avoid drift between fixtures and eval setup.
* Address review comments: pin MSTest versions, use source refs, fix naming
- Pin MSTest to 3.8.2 in all fixture .csproj files, add standard
properties (ImplicitUsings, Nullable, IsPackable)
- Replace inline csproj content blocks with source references to
fixture files to avoid content drift
- Create missing .csproj fixtures for flaky-coupled, duplicate-magic,
and assertion-quality self-referential scenarios
- Fix test method names: ThrowsArgumentException ->
ThrowsArgumentOutOfRangeException to match the actual assertion
* Fix activation, eval timeouts, and per-skill description limits
Address remaining issues from PR #635 eval scoreboard
(run 25677669933) and skill-validator failures:
1. test-anti-patterns activation (was NOT ACTIVATED in BOTH plugin and
isolated mode for ALL 6 scenarios — model answered everything from
inline code without ever needing the skill):
- eval.yaml + eval.vally.yaml: drop the giant inline `csharp` blocks
from every prompt. Each prompt now names the workspace files
explicitly (`Audit `Foo.Tests/FooTests.cs` for .NET test
anti-patterns ...`) and asks for the skill's signature deliverable
(severity-ranked list with concrete code-level fixes). The model
must read the workspace, which gives it a chance to consult the
skill — and the skill's structured-findings format is the actual
value-add over inline analysis.
- All 6 scenarios consistently get reject_tools (read-only review)
and timeout 180s.
- eval.vally.yaml: also added missing environment.files for each
scenario (was prompt-only before, no fixture on disk).
2. assertion-quality `Flag assertion-free tests` plugin-mode activation
(was bouncing to other skills because the prompt was generic `check
whether these tests verify anything useful`):
- eval.yaml + eval.vally.yaml: rewrite the prompt to name the file
(`SmokeTests/ApiEndpointSmokeTests.cs`) and explicitly request
`assertion quality and depth`, `assertion-free tests`, and
`trivial assertions like Assert.IsNotNull` — direct trigger
phrases for assertion-quality.
- assertion-quality SKILL.md: extend description with explicit USE
FOR keywords for `assertion-free tests`, `self-referential`, and
`tautological` so plugin-mode activation isn't won by sibling
skills like test-anti-patterns.
3. test-anti-patterns description size — was 1,301 chars (over the
1,024 per-skill limit) AND pushed dotnet-test plugin aggregate to
15,312 (over the 15,000 limit), failing skill-check on PR #635.
Trimmed to 779 chars; aggregate now at 14,983.
4. Vally job-level timeout (60m → 180m) was already raised on main
in commit
|
||
|
|
e1e8568375 |
Revert "dotnet-test: add unit-under-test + behaviors quality cue to code-test…" (#651)
This reverts commit
|
||
|
|
de0a97c551 |
Fix migrate-vstest-to-mtp activation for Handle exit code 8 scenario (#648)
The `Handle exit code 8 when migrating from VSTest to MTP` scenario was
not activating the migrate-vstest-to-mtp skill in plugin mode in the
latest scheduled eval (skillActivationPlugin.activated=false,
detectedSkills=[], skillEventCount=0, vally row showed `--`), even
though all 10 other scenarios in this eval activated cleanly.
Three layered fixes:
1. Prompt (eval.yaml + eval.vally.yaml): switch from past-tense
`We migrated`/`How do I fix this behavioral difference` to
present-tense migration framing — `We're migrating ... After
enabling MTP ... How do I handle this MTP behavioral difference?`.
The previous past-tense framing read as a generic post-migration CI
troubleshooting question, which the model felt confident answering
without consulting any skill.
2. SKILL.md description: add an explicit `USE FOR:` clause for MTP
behavioral differences (exit code 8, zero tests discovered,
--ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE), matching the
pattern that fixed coverage-analysis activation in
|
||
|
|
0f31228b58 |
Fix eval timeouts and skill activation for dotnet-test evals (#641)
* Fix evaluation timeouts and improve prompts for dotnet-test skills
- writing-mstest-tests: increase global vally timeout from 3m to 5m to match
the 300s eval.yaml timeout for the complex 'Modernize legacy test patterns' stimulus
- code-testing-agent: increase timeout from 40m/2400s to 60m/3600s
- mtp-hot-reload: increase timeout from 6m to 10m and remove overly strict
expect_tools constraint on launchSettings stimulus
- migrate-mstest-v1v2-to-v3: rephrase prompt for assertion overload errors to
mention CS1501 and cover AreNotEqual/AreSame alongside AreEqual
* Increase eval timeouts for mtp-hot-reload and migrate-mstest-v1v2-to-v3 scenarios
* Strengthen activation prompts and add missing vally scenarios
- migrate-mstest-v1v2-to-v3: Add explicit 'MSTest v2 to v3' migration
language in .testsettings and DataRow prompts (both eval.yaml and
eval.vally.yaml)
- writing-mstest-tests: Add 'MSTest' keyword and skill-specific
terminology to all prompts that lacked activation signal
- writing-mstest-tests: Add 5 missing vally scenarios (string
assertions, comparison assertions, collection/null/reference
assertions, conditional execution, parallelization)
- Add service-registry fixture files for the collection assertions
scenario
* Improve skill activation via SKILL.md descriptions and prompt alignment
Three-pronged fix for systematic NOT ACTIVATED failures:
1. SKILL.md descriptions: Restructure writing-mstest-tests, migrate-
mstest-v1v2-to-v3, and code-testing-agent descriptions to use the
proven 'Use when user says' pattern with quoted trigger phrases
(matching the working run-tests pattern)
2. Vally prompts: Each prompt now contains at least one exact quoted
trigger phrase from its SKILL.md description to ensure strong
description-to-prompt matching
3. Specific fixes:
- writing-mstest-tests: All 15 prompts now include MSTest-specific
trigger phrases (Assert.ThrowsExactly, sealed test class, DataRow,
DynamicData, Assert.HasCount, Assert.IsInstanceOfType, etc.)
- migrate-mstest-v1v2-to-v3: Add '.NET 5 dropped' and 'framework
compatibility issues' to trigger phrases; strengthen dropped-TFM
prompt
- code-testing-agent: Add 'generate comprehensive unit tests' and
'achieve high code coverage' to trigger phrases
* Revert SKILL.md description changes that caused activation regression
The description restructuring in
|
||
|
|
f1b09eba79 |
dotnet-test: add unit-under-test + behaviors quality cue to code-testing-generator (#646)
* CTA: invocation-only baseline (dispatch mechanics, no content rules)
Experiment branch to isolate the impact of "invoke prompted subagents
more often" from the impact of "make those subagents do richer work."
Same baseline as dev/ykovalova/cta-prompt-tuning (main =
|
||
|
|
4c40b873f2 |
Add detect-static-dependencies evals for report structure, obj exclusion, and lambda statics (#640)
Cover previously uncovered skill aspects: - [Validation] All .cs files in scope were scanned (check count) - [Validation] Report includes category totals, top patterns, and affected files - [Validation] obj/ and bin/ directories were excluded - [Pitfall] Scanning obj/ or generated code - [Pitfall] Missing statics inside lambdas/LINQ - [WorkflowStep] Step 4: Present the report Three new scenarios with supporting fixtures: - Structured report with file count, categories, and top patterns - Exclude obj/bin directories (with Generated.cs decoy in obj/) - Detect statics inside lambdas and LINQ expressions |
||
|
|
6e7adc5e32 |
Add extension files for Python, TypeScript, and PowerShell (#617)
* Add Python and TypeScript extension files for code-testing pipeline First-draft language extension files following the dotnet.md pattern. These guide the polyglot test agent on build/test/lint/fix for each language. Python: pytest-focused, environment/runner detection (Poetry/PDM/uv/Hatch), public-API testing philosophy, common errors, mocking guidelines. TypeScript: package-manager detection (npm/pnpm/yarn/bun), Jest+Vitest+Mocha support, ESM/CJS guidance, TS-specific considerations, framework detection. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Revise python.md and typescript.md based on 10-agent review Key changes: - Add 'Rule #1: Investigate the repo first' as top section - Remove generic templates (anchor to wrong conventions) - Remove testing philosophy (unactionable for agent) - Fix command inconsistency (parameterize with <prefix>/<exec>) - Move dependency install to 'last resort' section - Add error-driven fixer playbook with concrete fixes - Fix Mocha --grep (test name, not file filter) - Fix ESM guidance (don't change package.json type field) - Add monorepo/workspace guidance (Nx, Turborepo) - Add framework notes (React, Express, NestJS) - Add Jest mock hoisting warning - Cut from 224+289 lines to 117+136 lines (~57% reduction) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add powershell.md extension for Pester v5 test generation Key sections: - Repo investigation first (shell target detection) - Pester v5 discovery vs run phase rules - Import patterns for modules, library scripts, and executable scripts - Cross-platform guidance (pwsh vs powershell.exe, Join-Path, casing) - Non-terminating error handling with Should -Throw - Mock scoping, -ModuleName, PesterBoundParameters - TestDrive: for file-based tests - Non-obvious assertion gotchas (Contain vs Be, Throw needs scriptblock) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Reword test infra guidance; add framework detection to dotnet.md - Reword 'do not add' to 'use existing, only introduce if none exist' - Add test framework detection table to dotnet.md (MSTest/xUnit/NUnit) - Tailor wording per language (Python defaults to pytest, TS follows scripts.test, PS defaults to Pester) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Make Python extension framework-adaptive instead of pytest-centric Rule #1 now searches for ALL test file formats (not just test_*.py), explicitly calls out custom frameworks like UTscapy, and emphasizes adopting repo conventions fully rather than layering pytest on top. Test Commands section now has a custom framework block before the pytest block, and Test File Naming defers to repo conventions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
5856011d8f | Add README.md for dotnet-test plugin (#636) | ||
|
|
d575b1faa8 |
Add eval scenarios for writing-mstest-tests skill coverage (#593)
* Add eval scenarios for writing-mstest-tests skill coverage * Fix invalid YAML and remove build-validation claim from rubric * Fix timeouts and low quality * Improve further * Increase timeout for string assertions scenario from 120s to 180s Agent-Logs-Url: https://github.com/dotnet/skills/sessions/9943a60f-070b-4bea-9912-c994d1bed428 Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> |
||
|
|
cfc293f8fe |
Fix skill activation for Assert.AreEqual overload eval scenario (#589)
The 'Fix Assert.AreEqual object overload errors after v3 upgrade' evaluation scenario was failing because: 1. The prompt said 'latest major version' without mentioning 'v3' or 'MSTest v3', missing the skill's activation keywords. 2. The project file showed MSTest 3.8.0 (post-upgrade state) with no v2 context, while the SKILL.md 'When Not to Use' said 'Project already uses MSTest v3'. 3. The prompt's 'fix compilation issues' phrasing competed with writing-mstest-tests skill activation. Changes: - Updated prompt to explicitly mention upgrading from v2 to v3 and reference MSTest v3 compatibility issues - Added XML comment in csproj showing the pre-upgrade v2 package versions - Clarified SKILL.md 'When Not to Use' to distinguish fully-migrated projects from projects with active migration errors |
||
|
|
9f531203ec |
Promote 4 experimental test skills to dotnet-test plugin (#634)
Move assertion-quality, test-gap-analysis, test-smell-detection, and test-tagging from dotnet-experimental to dotnet-test. These skills have demonstrated sufficient eval coverage, unique value beyond baseline model capabilities, and are already integrated into the test-quality-auditor agent pipeline. Changes: - Move skills and tests, dropping the exp- prefix - Update all cross-references in skill descriptions and routing tables - Update test-quality-auditor agent and eval scenarios - Update CODEOWNERS for the moved paths - Delete duplicate exp-dotnet-test-frameworks (identical to dotnet-test-frameworks) - Fix stale exp-dotnet-test-frameworks reference in exp-test-maintainability Skills held back for further iteration: - exp-mock-usage-analysis: baseline model scores 5/5 on key scenarios - exp-test-maintainability: quality gains offset by token overhead |
||
|
|
97b23ae750 |
Fix timeout for Modernize legacy test patterns evaluation (#590)
The scenario was timing out on CI because: - The 180s timeout left insufficient headroom for CI machines (local runs take 120-135s, CI machines are slower due to load, network NuGet restores, and parallel execution) Changes: - Add 'dotnet restore' setup command to pre-warm NuGet cache before the agent starts (same pattern used by migrate-mstest-v3-to-v4) - Increase timeout from 180s to 300s to accommodate CI variability |
||
|
|
e7ec5a77a0 | Fix markdownlint CI workflow (startup_failure since inception) (#629) | ||
|
|
809d0b180c |
Improve test generation quality based on SWE Atlas benchmark analysis (#599)
* Improve test quality for benchmark performance Based on SWE Atlas benchmark analysis (48.8% vanilla vs 19-34% CTA): 1. Default to Direct strategy for single-task requests — reduces multi-agent overhead that costs tokens without improving results 2. Run tests immediately in Direct strategy — catches assertion errors early instead of accumulating failures 3. Read source thoroughly before writing tests — trace actual logic and return values, not just function signatures 4. Quality over Quantity guidelines — cover stated requirements first, fewer focused tests beat many shallow ones 5. Verify tests are implementation-specific — tests that pass with an empty function body aren't testing anything useful Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Combine redundant implementation-specificity bullets into one Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
81946d2a38 | Add proxy for CTA extension files (#583) | ||
|
|
1b105d1940 |
Fix dotnet-test-frameworks skill activation for evaluations (#580)
* Fix dotnet-test-frameworks skill activation for evaluations The skill had user-invocable: false and a description saying 'DO NOT USE directly', which prevented the model from activating it during evaluation. All 6 eval scenarios default to expect_activation: true, causing SkillNotActivated failures on CI. - Remove user-invocable: false from both dotnet-test and experimental copies - Rewrite description with activation keywords matching eval prompts (assertion mapping, framework identification, skip annotations, exception assertions, lifecycle conversion, integration test markers) - Preserve note that other analysis skills also load this as reference data * Restore user-invocable: false, fix cross-refs, add expect_activation: false Address review comment: remove exp-* skill references from dotnet-test- frameworks description since those skills reference exp-dotnet-test- frameworks instead. Optimize eval results: this reference data skill's content is knowledge the model already has (baseline scores 5.0/5 on most scenarios). Direct activation adds token/time overhead without quality improvement: - Restore user-invocable: false (correct for reference data skill) - Shorten description to not trigger activation - Add expect_activation: false to all 6 scenarios The skill's value is realized when loaded by consumer skills (e.g. test-anti-patterns), not via direct user queries. |
||
|
|
4ace5459f8 |
Improve agent based on C++ testing feedback (#571)
* Improve agent based on C++ testing feedback * Rename Cpp.md to cpp.md |
||
|
|
f8e8191268 |
Add concrete pipeline examples for code-testing-agent (#572)
Add end-to-end input/output examples to anchor expected behavior for the LLM, addressing the Example Quality (2/5) review feedback. Changes: - New extensions/dotnet-examples.md with .NET-specific examples: sample source code, research output, plan output, generated test file, fix cycle walkthroughs, and final report - SKILL.md: replace one-liner examples with strategy selection table, pipeline walkthrough, and pointer to language-specific extensions - Generator agent: add strategy decision examples and sample final report - Researcher/Planner/Implementer agents: add references to extension examples for concrete output shapes Architecture keeps core agents language-agnostic — all language-specific examples live in the extensions/ folder. |
||
|
|
8651264f12 |
Fix skill activation for exit code 8 scenario (#567)
* Initial plan * Improve MTP migration skill guidance for OutputType conditions Agent-Logs-Url: https://github.com/dotnet/skills/sessions/ae2f9ae1-c8c3-4e50-95ab-ccdc08bc388b Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com> * Add eval scenario for OutputType conditioning in Directory.Build.props Agent-Logs-Url: https://github.com/dotnet/skills/sessions/734b3736-45a4-4f5d-b83c-3e6ee72fcfae Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com> * Fix skill activation for exit code 8 scenario Add 'zero tests discovered', 'MTP behavioral differences', '--ignore-exit-code', and 'TESTINGPLATFORM_EXITCODE_IGNORE' to skill description to improve activation for the exit code 8 eval scenario. Consolidate filter syntax mention to stay within 1024-char limit. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> |
||
|
|
05aeb657e6 | Add license to agent files (#568) | ||
|
|
270ef910ec |
Ensure validation runs for all strategies including Direct (#570)
Harden the test generator agent to ensure final build validation, test validation, and git commit always run — even when using the Direct strategy for small requests. Changes: - Step 1: Mandate reading language-specific extensions (e.g., dotnet.md) before writing any code. The extension contains critical project registration (dotnet sln add) and build validation guidance. - Step 2: Direct strategy now skips only Steps 3-5 (research, plan, implement sub-agents), NOT Steps 6-9. Added explicit note that Steps 6-9 are mandatory for ALL strategies. - Step 6: Clarify full-solution build must use no --framework flag to catch multi-target framework issues (e.g., net472 errors). - Step 7: Require fresh build for final test validation (no --no-build). - New Step 9: Explicit git commit with verification that the diff is non-empty. - New rules 9-11: Read extensions first, always validate+commit, preserve existing tests. Motivated by MSBench investigation showing: - Agent used Direct strategy and skipped final validation entirely - Agent never read extensions/dotnet.md (missing dotnet sln add) - Agent forgot to git commit (300 tests created, Changes +0 -0) - Agent deleted pre-existing tests while adding new ones Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
c625f09db5 |
Recommend MSBuildProjectName for OutputType conditions in MTP migration skill (#556)
* Initial plan * Improve MTP migration skill guidance for OutputType conditions Agent-Logs-Url: https://github.com/dotnet/skills/sessions/ae2f9ae1-c8c3-4e50-95ab-ccdc08bc388b Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com> * Add eval scenario for OutputType conditioning in Directory.Build.props Agent-Logs-Url: https://github.com/dotnet/skills/sessions/734b3736-45a4-4f5d-b83c-3e6ee72fcfae Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com> Co-authored-by: Amaury Levé <amauryleve@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> |
||
|
|
5826c421b4 |
Fix test-anti-patterns plugin activation by disambiguating competing descriptions (#552)
The test-anti-patterns skill was not reliably activated in plugin mode because sibling descriptions overlapped: - test-quality-auditor agent: narrowed to multi-skill audit pipelines only, explicitly excluding single-file reviews - writing-mstest-tests skill: removed 'review' and 'anti-patterns' from description, added explicit exclusion for test quality auditing - test-anti-patterns skill: expanded trigger phrases to better match review prompts (flaky tests, duplication, tests that pass without verifying) |
||
|
|
7841934a75 |
Add migrate-mstest-v3-to-v4 eval scenarios for uncovered patterns (#564)
* Add migrate-mstest-v3-to-v4 eval scenarios for uncovered patterns
Add 5 new scenarios (Goals 10-14) covering:
- Verified package update with build/test validation
- Sealed custom TestMethodAttribute with Timeout migration
- TestMethodAttribute/TestMethod display name constructor syntax
- Assert.IsInstanceOfType out parameter breaking change
- TreatDiscoveryWarningsAsErrors and behavioral changes review
Add 4 new fixture directories:
- v3-verified-migration: buildable project for end-to-end validation
- v3-sealed-timeout: sealed attr + TestTimeout.Infinite patterns
- v3-testmethod-displayname: [TestMethod/Attribute("name")] patterns
- v3-instanceoftype: Assert.IsInstanceOfType<T> out param pattern
Covers uncovered validation items (lines 449-451, 458) and code
patterns: [TestMethod], [Timeout], sealed, [TestMethodAttribute],
Assert.IsInstanceOfType.
* Improve skill description for activation and bump scenario timeouts
Rewrite migrate-mstest-v3-to-v4 frontmatter description to improve SDK
semantic matching:
- Lead with symptom (fix build errors) instead of action (migrate)
- Add error codes CS0507, CS0103, CS1061, CS1615 as trigger signals
- Add symptom phrase: tests don't compile after upgrading MSTest
- Expand breaking change keywords: sealed, DisplayName syntax,
Assert.IsInstanceOfType out parameter, TestContext.TestName
- Keep under 1024 char limit
Bump timeout 180s -> 240s for scenarios 11 (sealed attr) and 13
(IsInstanceOfType) that hit timeout during evaluation.
* Address PR review comments
- Remove unused 'using System' from OrderServiceTests.cs and TypeCheckTests.cs
- Renumber duplicate Goal 10 to Goal 15 (non-activation scenario)
- Tighten file_contains assertion to check MSTest.TestFramework and
MSTest.TestAdapter individually instead of broad '4.' match
- Tighten Timeout assertion to require int.MaxValue instead of matching
pre-migration symbol names
- Fix error code CS0507 -> CS0115 in scenario 11 prompt to match the
actual MSTest v4 error for missing Execute override
|
||
|
|
1125fe7864 |
improve(dotnet-test): enhance agent descriptions for subagent discovery (#560)
- Add 'Use when:' trigger phrases to all 7 sub-agent descriptions so parent agents can reliably discover and delegate to them - Add .testagent/ cleanup rule to generator agent to prevent ephemeral pipeline state from being committed |
||
|
|
9ab90d6400 |
feat(dotnet-test): add handoffs between orchestrator agents (#561)
- test-quality-auditor -> code-testing-generator (generate missing tests) - test-quality-auditor -> testability-migration (fix untestable code) - testability-migration -> code-testing-generator (test migrated code) - test-migration -> test-quality-auditor (audit after migration) Enables guided sequential workflows between agents with suggested next steps, per VS Code custom agent handoff pattern. |
||
|
|
a4927f1b79 |
Align writing-mstest-tests skill routing with anti-pattern disambiguation (#553)
* Initial plan * fix(dotnet-test): align writing-mstest-tests routing with anti-pattern skill Agent-Logs-Url: https://github.com/dotnet/skills/sessions/eb70209e-8e7a-4b49-820d-65e0e3fcaedc Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com> |
||
|
|
400661df09 |
run-tests: add critical rules, detection guidance, and troubleshooting (#514)
* run-tests: add critical rules, detection guidance, and troubleshooting - Add 'Critical Rules' table to prevent cross-platform VSTest/MTP mistakes - Expand Step 1 detection with explicit file-by-file lookup table - Add 'dotnet --version' as first detection action - Add Troubleshooting section with 7 common error patterns - Expand Common Pitfalls from 3 to 7 entries - Strengthen negative guidance for SDK version-specific syntax * Improve description * Improve evaluation * Add expected and rejected tools * Change * Improve do not use sections * Improve prompt * Increase eval timeouts for scenarios hitting the limit - run-tests: trx reporting MTP SDK 9 (360s -> 480s) - run-tests: blame-hang MTP SDK 10 (300s -> 420s) - run-tests: combine filter criteria VSTest (180s -> 300s) - mtp-hot-reload: hot reload SDK 9 (360s -> 480s) - mtp-hot-reload: hot reload filter (180s -> 300s) - code-testing-agent: ContosoUniversity (1800s -> 2400s) |
||
|
|
7791735b60 |
Add test-quality-auditor hub agent for .NET test suite analysis (#541)
* Add test-quality-auditor hub agent for .NET test suite analysis Introduces a new test-quality-auditor agent that triages test quality concerns to specialized analysis skills: assertion quality, test smells, anti-patterns, mock usage, test gaps, maintainability, coverage risk, and test tagging. Includes a comprehensive audit pipeline that chains multiple skills for broad health checks. * Address Copilot review: clarify diagnostic role and coverage routing - Reword intro to acknowledge file-modifying workflows (test tagging) are only used with explicit user confirmation - Clarify coverage-analysis vs crap-score: prefer coverage-analysis for project-wide analysis, reserve crap-score for targeted method/class scope |
||
|
|
f9d7faf0ee |
Add test-migration hub agent for .NET test framework and platform migrations (#540)
* Add test-migration hub agent for .NET test framework and platform migrations Introduces a new test-migration agent that auto-detects the current test framework, version, and platform, then routes to the appropriate migration skill (MSTest v1/v2→v3, v3→v4, xUnit v2→v3, VSTest→MTP). Handles multi-step migrations with commit boundaries between steps. * Align framework detection with platform-detection skill Address Copilot review: MSTest requires metapackage, Sdk, or both TestFramework+TestAdapter (not either alone). Add missing xUnit MTP package variants. |
||
|
|
3dbe832796 |
Add 'dotnet sln add' step to code-testing-implementer (#522)
* Add 'dotnet sln add' step to code-testing-implementer When a new test project is created, register it with the solution file using 'dotnet sln add' so that 'dotnet test <solution>' discovers the tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address review: improve dotnet sln add guidance - Use solution identified in research/plan rather than searching - Account for .slnf solution filter scenarios - Prefer 'dotnet test --solution' over 'dotnet test <solution>' Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Move dotnet sln add guidance to dotnet.md extension The implementer is polyglot, so 'dotnet sln add' doesn't belong there. Replace with a generic 'register with build system' step that defers to extensions/, and add the .NET-specific detail (sln/slnx/slnf handling) to extensions/dotnet.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address review: fix solution registration guidance in dotnet.md - Include .slnf in 'don't substitute' warning alongside .sln/.slnx - Qualify '--solution' flag as SDK 10+/MTP-only; fall back to positional form for older SDKs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
7e6954f9a9 |
Add testability migration skills and agent for dotnet-test (#518)
* Add testability migration skills and agent for dotnet-test Introduces three skills and one orchestrator agent to help developers incrementally replace hard-to-test static dependencies with injectable abstractions: - detect-static-dependencies: scans C# code for DateTime.Now, File.*, Environment.*, HttpClient, Console.*, Process.* and ranks by frequency - generate-testability-wrappers: generates wrapper interfaces or guides adoption of built-in abstractions (TimeProvider, IHttpClientFactory, System.IO.Abstractions) - migrate-static-to-wrapper: mechanical codemod-style bulk replacement of static call sites with wrapper calls, scoped per project/namespace - testability-migration agent: orchestrates the Detect-Generate-Migrate pipeline end-to-end Includes eval.yaml tests and fixture projects for all three skills and the agent. * Fix activation, token overhead, and eval timeouts - Expand skill descriptions with more trigger phrases for migrate-static-to-wrapper and generate-testability-wrappers to fix NOT ACTIVATED issues - Collapse verbose replacement mapping tables and constructor examples to reduce token overhead (~30% fewer tokens) - Increase generate-testability-wrappers eval timeouts from 120s to 240s to prevent timeout-impacted scoring - Soften detect-static-dependencies scenario 2 rubric to reduce run-to-run variance in plugin mode - Increase migrate-static-to-wrapper non-activation timeout |
||
|
|
7ab8006c18 |
Fix markdownlint violations in dotnet-test plugin (#513)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Youssef1313 <31348972+Youssef1313@users.noreply.github.com> |
||
|
|
93dc33da86 |
Stabilize and unify some test skills (#501)
* Deduplicate test skill references and clarify skill boundaries - Move platform-detection.md and filter-syntax.md to plugins/dotnet-test/shared/, removing 3 identical copies of each from run-tests, mtp-hot-reload, and migrate-vstest-to-mtp reference directories. - Move dotnet.md from exp-test-smell-detection/extensions/ to shared/ as dotnet-test-frameworks.md in both dotnet-test and dotnet-experimental plugins. Update exp-assertion-quality, exp-test-boilerplate-detection, exp-test-tagging, and test-anti-patterns to reference the shared file instead of inlining framework detection tables. - Differentiate test-anti-patterns (quick pragmatic review) from exp-test-smell-detection (deep formal audit with academic taxonomy) by updating descriptions and cross-referencing each other in When Not to Use sections. - Update skill-validator to allow ../../shared/ file references while still blocking other parent-directory traversals. Add tests for the new rule. * Switch from shared/ directories to hidden reference skills Replace the plugin-level shared/ directories with non-invocable reference skills (user-invocable: false) that other skills reference by name. - Create platform-detection, filter-syntax, and dotnet-test-frameworks as hidden skills under plugins/dotnet-test/skills/. These contain the detection tables and syntax references previously duplicated across run-tests, mtp-hot-reload, and migrate-vstest-to-mtp. - Create exp-dotnet-test-frameworks as a hidden skill under plugins/dotnet-experimental/skills/ for the experimental test analysis skills (exp-test-smell-detection, exp-assertion-quality, etc.). - Update all consuming skills to reference these by skill name in backtick notation instead of file links. - Revert the skill-validator ../../shared/ exception — no longer needed since all references now use the standard skill name mechanism. * Merge exp-test-boilerplate-detection into exp-test-maintainability exp-test-maintainability was only 6 calibration rules with no workflow. exp-test-boilerplate-detection had the full 5-category detection workflow, examples, calibration, and validation. Merge the boilerplate content into exp-test-maintainability (the broader, more user-facing name) and add the two unique maintainability rules (DisplayName guidance, DataRow vs DynamicData preference) to Category 3. - Replace exp-test-maintainability SKILL.md with the merged content - Move test fixtures from exp-test-boilerplate-detection to exp-test-maintainability - Merge eval.yaml scenarios (4 total: 2 from each original skill) - Delete exp-test-boilerplate-detection skill and tests - Update all cross-references in exp-test-smell-detection, dotnet-test-frameworks, exp-dotnet-test-frameworks, and CODEOWNERS * Add cross-references to test-anti-patterns for deep mock and duplication analysis Point users to exp-mock-usage-analysis from the Over-mocking entry and to exp-test-maintainability from the Duplicate tests entry. * Add exp-dotnet-test-frameworks to CODEOWNERS * Improve run-tests SDK 10 MTP detection for blame-hang scenario Inline the critical SDK 10 detection signal (global.json test.runner) directly in Step 1 instead of deferring entirely to the platform-detection skill. This makes the distinction between SDK 10 (no -- separator) and SDK 8/9 (requires -- separator) more prominent. Add a quick detection summary table, strengthen the Common Pitfalls entry for SDK 10 with a blame-hang-timeout example, and keep the platform-detection skill reference for the full detection logic. * Improve skill activation keywords in descriptions - exp-test-maintainability: Add 'suggest a better test structure', 'consolidate similar test methods', 'convert copy-paste tests to data-driven parameterized tests' to match prompts like 'each new case needs a whole new method, suggest a better structure'. - test-anti-patterns: Add 'review tests', 'find test problems', 'check test quality', 'audit tests for common mistakes' to match review-style prompts that don't use the word 'anti-pattern'. - run-tests: Add 'hang timeout', 'blame-hang', 'blame-crash', 'TUnit' to match SDK 10 blame scenarios and TUnit filter scenarios that were intermittently not activating. |
||
|
|
42e29303b4 |
Add coverage-analysis skill to dotnet-test plugin (#499)
* Add coverage-analysis skill to dotnet-test plugin Adds an automated, project-wide code coverage and CRAP score analysis skill for .NET projects. Complements the existing crap-score skill (which is manual/targeted for single methods) with an end-to-end pipeline: - Auto-detects solution structure and test projects - Detects coverage provider (Microsoft.Testing.Extensions.CodeCoverage or Coverlet) per test project and selects the correct dotnet test arguments - Runs coverage collection, generates reports via ReportGenerator - Calculates CRAP scores per method via bundled PowerShell scripts - Surfaces risk hotspots ranked by danger (complex + uncovered code) - Produces actionable recommendations with projected score improvements Boundary with crap-score: coverage-analysis is project-wide and automated; crap-score is targeted and LLM-directed. The frontmatter descriptions cross-reference each other so the skill router disambiguates correctly. Includes eval.yaml with 3 scenarios (existing data analysis, from-scratch coverage collection, coverage plateau diagnosis) and shared buildable fixtures. Fixes #457 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update plugins/dotnet-test/skills/coverage-analysis/SKILL.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Address PR review: coverage output path and scoped tool install - Add --coverage-output $rawDir to all MS CodeCoverage dotnet test commands (unified, .NET 9, .NET 10+, and mixed-project modes) so Cobertura XML lands in the expected directory for downstream search - Replace dotnet tool install --global with --tool-path scoped to the coverage output directory to avoid mutating the user environment Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix Cobertura XML fixture line numbers to match StudentService.cs FindById starts at line 101 (was 88), Search starts at line 109 (was 96). Updated both partial-coverage and plateau fixtures. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Wrap Get-ChildItem pipelines in @() for single-result array safety PowerShell returns a scalar FileInfo (not array) when a pipeline yields exactly one result, making .Count return null. Wrapping in @() ensures the result is always an array so .Count works reliably for the common single-test-project case. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove CODEOWNERS change - not needed for this PR The existing /plugins/dotnet-test/ and /tests/dotnet-test/ wildcards already route reviews to @dotnet/dotnet-testing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address review: .csproj fallback, cross-platform paths, .sln header - Add .csproj fallback discovery in Step 1 when no .sln found (emit ENTRY_TYPE:Project) to match documented behavior - Fix ProjectReference backslash to forward slash in test fixture .csproj - Remove leading blank line from ContosoUniversity.sln fixture Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add plateau/stuck trigger language to frontmatter description The skill was NOT ACTIVATED for the 'Coverage plateau diagnosis' eval scenario because the frontmatter description (used by the skill router) lacked plateau-related keywords. The prompt 'coverage is stuck' and 'what's blocking me' didn't match the existing description text. Add 'stuck', 'plateaued', and 'blocking improvement' to the frontmatter Use-when sentence so the skill router activates for plateau diagnosis prompts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Make CRAP scores mandatory, add existing-data shortcut path The plateau eval scenario scored 1/5 on CRAP scores across all modes because the LLM shortcut the workflow when existing Cobertura XML was provided — it read the XML directly and gave a quick diagnostic answer without computing CRAP scores or following the output template. - Add existing-data guidance at top of Workflow section: skip test execution but still run CRAP score computation (Steps 5-6) - Add mandatory CRAP rule to guidelines.md: Risk Hotspots table is required in every output regardless of analysis mode Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update plugins/dotnet-test/skills/coverage-analysis/SKILL.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> |
||
|
|
ae9e2b4302 |
Add SKILL for xunit.v3 migration (#484)
* Add SKILL for xunit.v3 migration * eval.yaml, to be reviewed * Add run_command_and_assert to eval.yaml for dotnet test validation Agent-Logs-Url: https://github.com/dotnet/skills/sessions/8e1539d5-327e-4216-9a01-5aa062e53608 Co-authored-by: Youssef1313 <31348972+Youssef1313@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix eval * Update plugins/dotnet-test/skills/migrate-xunit-to-xunit-v3/SKILL.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix eval.yml * Update eval * Update skill * Increase timeout * Update eval.yaml * Update plugins/dotnet-test/skills/migrate-xunit-to-xunit-v3/SKILL.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update plugins/dotnet-test/skills/migrate-xunit-to-xunit-v3/SKILL.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update tests/dotnet-test/migrate-xunit-to-xunit-v3/eval.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> |
||
|
|
e4670b33a1 |
[PoC] Code testing agent + tests PoC (#433)
* Add code testing agent agents + tests PoC * Remove AssertionEvaluator.cs change (moved to dev/jankrivanek/agents-evals) |
||
|
|
51d29a086f | Improve test skills (#428) | ||
|
|
17fe01321d | Promote crap-score and test-anti-patterns from experimental to dotnet-test (#434) | ||
|
|
e354d43534 |
Improve test skills (#423)
* Increase timeout * Fix activation issues * Improve further |
||
|
|
0846e6015d | Improve MSTest migration skills (#387) | ||
|
|
e0e1a91d90 |
Extract shared references and add cross-refs for dotnet-test skills (#414)
* Extract shared references and add cross-refs for dotnet-test skills - Extract platform detection logic into run-tests/references/platform-detection.md (shared by run-tests, mtp-hot-reload, migrate-vstest-to-mtp) - Extract filter syntax reference into run-tests/references/filter-syntax.md (shared by run-tests, mtp-hot-reload, migrate-vstest-to-mtp) - Add cross-references between skills in When Not to Use / Related Skills sections - run-tests SKILL.md reduced from 364 to 191 lines * Fixes |
||
|
|
6face98ff6 |
Change agents and skills fields in plugin.json to array format for Claude Code CLI compatibility (#407)
* Initial plan * Remove agents string field from plugin.json and handle array format in parser Claude Code CLI validates `agents` as array-of-strings per its plugin manifest schema. Our plugin.json files had `"agents": "./agents/"` (a string), which caused "agents: Invalid input" validation errors on install. Remove the field from the 3 affected plugin.json files — agents are still discovered by convention from the `agents/` directory. Also make ParsePluginJson resilient to both string and array formats for forward-compatibility. Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com> * Remove `agents` string field from plugin.json for Claude Code CLI compatibility Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com> * Change agents field to array format in plugin.json, update validator to read array-first with string fallback Plugin.json files now declare agents as an array of file paths: "agents": ["./agents/foo.agent.md", "./agents/bar.agent.md"] ParsePluginJson reads the array first (preferred, Claude Code schema), falls back to a string path (legacy). PluginInfo gains an AgentPaths field. Validator and discovery use the array when present, else fall back to directory-based convention. Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com> * Simplify agents to directory-path array form ["./agents/"], handle directories in array entries Per Copilot CLI spec, agents field values are "Path(s) to agent directories" — no need to list individual files. Use ["./agents/"] to mirror how skills uses "./skills/". Updated validator and discovery to handle both directory and file entries in the array. Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com> * Delete .nuget/nuget.exe * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Convert skills field to array format in plugin.json, update validator to handle both forms Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com> * Align AgentPaths null checks to use { Count: > 0 } pattern for consistency Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com> * Change `agents` and `skills` fields in plugin.json to array format for Claude Code CLI compatibility Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com> * Delete .nuget/nuget.exe * Consolidate SkillsPath/SkillPaths and AgentsPath/AgentPaths into single array fields Remove dual string/array fields from PluginInfo. The parser now normalizes legacy string values into single-element arrays, so all downstream code uses only SkillPaths and AgentPaths (IReadOnlyList<string>). This eliminates all array-vs-string fallback branching. Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com> Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> |
||
|
|
ae0b6a1d86 | Add mtp-hot-reload skill for iterative test fixing with MTP hot reload (#389) | ||
|
|
c55e4f222b |
Add MSTest migration skills (v1/v2→v3, v3→v4) (#377)
* Add MSTest migration skills (v1/v2→v3, v3→v4) New dotnet-test plugin with two step-by-step migration skills: - migrate-mstest-v1v2-to-v3: covers assembly ref (v1) and NuGet (v2) projects, assertion overload changes, DataRow constructors, .testsettings replacement, timeout unification, and MSTest.Sdk adoption. - migrate-mstest-v3-to-v4: covers Execute→ExecuteAsync, CallerInfo constructors, ClassCleanupBehavior removal, TestContext.Properties generic change, Assert API changes, ExpectedExceptionAttribute removal, dropped <net8.0 TFMs, and behavioral changes (DisableAppDomain, TestCase.Id, TreatDiscoveryWarningsAsErrors). Includes eval.yaml test scenarios and fixtures for both skills, plugin.json, and CODEOWNERS entries. * Fixes * Improve results * Improve * Improve description * Copy fix for path * Bump timeout |
||
|
|
92d830ff48 |
Add writing-mstest-tests skill with eval scenarios (#378)
* Add writing-mstest-tests skill with eval scenarios Add a new skill for writing modern MSTest 3.x/4.x unit tests covering: - Test class structure (sealed, AAA pattern, naming conventions) - Modern assertion APIs (Assert.Throws, IsInstanceOfType, collection asserts) - Data-driven tests (DataRow, DynamicData with ValueTuples) - Async tests with cancellation and timeout patterns - Test lifecycle (constructor init, TestContext injection) - Anti-pattern detection and modernization Includes 10 eval scenarios across 4 goal categories with fixture files for both modern MSTest and legacy anti-pattern test projects. MSTest.Sdk version is recommended via global.json msbuild-sdks instead of inline in the project file, ensuring all test projects get bumped together. * Fixes * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Apply suggestion from @Evangelink * Apply suggestion from @Evangelink --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> |