Commit Graph

85 Commits

Author SHA1 Message Date
Amaury Levé 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
2026-05-13 11:49:18 +00:00
Amaury Levé e6cf308357 Add eval scenario for filter-syntax [trait] query language pattern (#638)
* Add eval scenario for filter-syntax [trait] query language pattern

Add a run-tests scenario that exercises the xUnit v3 query filter language
with [traitName=traitValue] syntax (--filter-query), covering the uncovered
[CodePattern] [trait] at line 113 of filter-syntax SKILL.md.

New fixture: mtp-xunit-v3-query with multiple test classes and traits
(Smoke, Regression, Unit) to test combined class-pattern + trait filtering.

* Address review feedback for xUnit v3 query eval coverage

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-05-11 18:46:23 +00:00
Amaury Levé 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>
2026-05-11 13:23:21 +00:00
Amaury Levé 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
2026-05-11 13:07:01 +00:00
Amaury Levé 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
2026-05-11 14:46:11 +02:00
Amaury Levé 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
2026-05-11 13:51:11 +02:00
Aditya Mandaleeka 9433a31e67 Initial port of evals to Vally (#615) 2026-05-06 10:11:45 -07:00
Amaury Levé 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.
2026-04-23 16:24:48 +02:00
Amaury Levé dee829b89c Fix eval timeout for MSTest.Sdk scenario by pre-warming NuGet cache (#548)
The 'Migrate MSTest.Sdk v3 project using ManagedType and TestTimeout'
scenario times out on CI because MSTest.Sdk/4.1.0 resolution takes 40+
seconds on cold NuGet cache. Each agent session may call dotnet build
multiple times, easily exceeding the 240s timeout.

Add a 'dotnet restore' setup command that runs before the agent starts
(outside the timeout window), pre-warming the NuGet cache and obj/
directory so subsequent builds complete in ~2s.
2026-04-23 11:33:45 +00:00
Amaury Levé cb7c10bd32 fix mstest sdk eval timeout (#558)
* Fix timeout in MSTest.Sdk v3-to-v4 eval scenario 9

The fixture csproj had MSTest.Sdk/3.8.0 while the prompt claimed the user
already upgraded to 4.1.0. This mismatch caused the model to edit the
csproj and run dotnet build, triggering slow MSTest SDK NuGet downloads
that exceeded the 240s timeout on CI.

- Update fixture csproj to MSTest.Sdk/4.1.0 to match the prompt
- Add specific CS error codes to the prompt so the model provides direct
  fixes instead of building
- Update rubric item to reflect the project already being on 4.1.0

* Fix CI timeout in migrate-mstest-v3-to-v4 eval scenario

Reduce scope of the 'Fix multiple v4 breaking changes' scenario:
- Remove 3 lower-signal breaking changes from the fixture (AreEqual params,
  IsInstanceOfType out param, Properties.Contains) to cut agent work
- Add max_turns: 5 to cap agent iterations
- Lower timeout from 240 to 180 seconds

* Strengthen net6.0 scenario prompt for reliable skill activation
2026-04-21 09:48:13 +02:00
Copilot 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>
2026-04-21 07:24:59 +00:00
Amaury Levé 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
2026-04-21 09:12:45 +02:00
Amaury Levé 96489b425e eval(dotnet-test): add evaluations for dotnet-test-frameworks skill (#563) 2026-04-20 19:39:40 +00:00
Amaury Levé 7740b2b53c Improve migrate-mstest-v1v2-to-v3 evals to differentiate from baseline (#547)
Five scenarios were performing at or below stock Copilot because prompts
gave away answers and rubric items tested knowledge the baseline LLM
can deduce from the code alone.

Changes per scenario:

- Fix DataRow type mismatch: added double-to-float mismatch, vaguer
  prompt, rubric tests both mismatch types and latest-3.x knowledge
- Migrate .testsettings to .runsettings: added code coverage data
  collector to fixture, rubric tests correct TestTimeout mapping
  (<MSTest><TestTimeout> not <TestSessionTimeout>) and collector mapping
- Migrate MSTest v2 NuGet to v3: vaguer prompt (forces model to read
  csproj), rubric tests metapackage/MSTest.Sdk recommendation and
  Microsoft.NET.Test.Sdk dependency awareness
- Fix Assert.AreEqual overload errors: removed exact error code from
  prompt, added mixed-type and interface-reference cases, rubric tests
  correct generic type parameter selection
- Handle dropped TFM: changed to multi-target (net5.0;net462;
  netcoreapp3.1), rubric tests that model knows which TFMs are still
  supported and doesn't upgrade them indiscriminately
2026-04-20 21:33:07 +02:00
Copilot c14d90d28e Align MSTest v2→v3 eval assertions/rubric with fixture semantics (#550)
* Initial plan

* Align MSTest v2->v3 eval rubric with fixture assertions

Agent-Logs-Url: https://github.com/dotnet/skills/sessions/055e6526-4b7d-4457-9004-2c8c99969cd1

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>
2026-04-20 14:59:37 +02:00
Amaury Levé 17df9a10eb Fix code-testing-agent eval timeout by removing unused NuGet packages (#551)
The ContosoUniversity test fixture had 17 unused NuGet packages (bootstrap,
jQuery, Modernizr, Antlr4, WebGrease, Microsoft.Build.Tasks.Core, etc.)
that bloated NuGet restore and build time. The multi-agent test generation
pipeline performs multiple build/test cycles, causing cumulative delays
that exceeded the 2400s scenario timeout on CI.

Changes:
- Remove 17 unused PackageReference entries from ContosoUniversity.csproj
- Remove stale ItemGroup entries (Global.asax, Scripts, compile removes)
- Remove NU1701 warning suppression (no longer needed)
- Increase command_timeout from 180s to 300s for dotnet test assertion
  (accounts for first-time restore + build + test + coverage collection)
2026-04-20 12:53:45 +00:00
Amaury Levé 7a2e91ce94 Fix mtp-hot-reload eval timeouts by removing expect_tools: bash (#546)
The 5 failing scenarios were timing out because expect_tools: [bash]
forced the agent to execute terminal commands. The hot reload workflow
involves 'dotnet run' which starts a test host that blocks indefinitely
waiting for file changes, causing the scenario to exhaust its timeout.

These scenarios test whether the model provides correct guidance (package
name, env var, commands), not whether it actually executes them. The
output_matches assertions already verify the response content.

Removed expect_tools from:
- Suggest hot reload for failing test in MTP project (SDK 9)
- Suggest hot reload for failing test in MTP project (SDK 10)
- Enable hot reload when package already installed
- Suggest launchSettings.json configuration for hot reload
- Negative: VSTest project cannot use MTP hot reload

Also reduced timeouts since scenarios no longer need to wait for command
execution.
2026-04-20 12:12:39 +02:00
Amaury Levé 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)
2026-04-20 10:09:15 +02:00
Amaury Levé f46275e64e Add evaluation tests for test-migration and test-quality-auditor agents (#543)
test-migration eval (4 scenarios):
- Auto-detect MSTest v2 on VSTest and recommend migration path
- Detect xUnit v2 and route to xUnit v3 migration
- Execute targeted MSTest v2 to v3 migration
- Non-activation: decline test writing request

test-quality-auditor eval (4 scenarios):
- Comprehensive audit of weak test suite (multi-skill pipeline)
- Targeted anti-pattern review
- Assertion quality analysis
- Non-activation: decline test generation request

Includes fixture projects with intentional quality issues:
- MSTest v2 project on VSTest for migration detection
- xUnit v2 project for migration detection
- ShoppingCart test suite with anti-patterns (assertion-free, tautological,
  catch-and-swallow, Thread.Sleep, shallow assertions, missing coverage)
2026-04-17 20:29:24 +02:00
Amaury Levé d7b80a806b Fix SDK 9.0.200 global.json pinning causing eval timeouts (#542)
Add rollForward: latestFeature to all global.json entries that pin SDK 9.0.200
so that any 9.0.xxx SDK satisfies the requirement. Without this, machines with
only 9.0.3xx installed fail all dotnet commands during evaluation, causing the
model to burn its entire timeout budget on failed bash retries.
2026-04-17 18:07:33 +00:00
Amaury Levé c18d4260de Fix timeout in MSTest.Sdk v3-to-v4 eval scenario 9 (#544)
The fixture csproj had MSTest.Sdk/3.8.0 while the prompt claimed the user
already upgraded to 4.1.0. This mismatch caused the model to edit the
csproj and run dotnet build, triggering slow MSTest SDK NuGet downloads
that exceeded the 240s timeout on CI.

- Update fixture csproj to MSTest.Sdk/4.1.0 to match the prompt
- Add specific CS error codes to the prompt so the model provides direct
  fixes instead of building
- Update rubric item to reflect the project already being on 4.1.0
2026-04-17 18:05:14 +00:00
Amaury Levé 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
2026-04-13 15:59:41 +02:00
Cathy Sullivan 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>
2026-04-07 18:27:11 +02:00
Youssef Victor 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>
2026-04-01 16:44:20 +02:00
Jan Krivanek 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)
2026-03-30 17:57:08 +02:00
Amaury Levé 51d29a086f Improve test skills (#428) 2026-03-30 15:08:33 +02:00
Amaury Levé 17fe01321d Promote crap-score and test-anti-patterns from experimental to dotnet-test (#434) 2026-03-24 18:11:49 +00:00
Amaury Levé e354d43534 Improve test skills (#423)
* Increase timeout

* Fix activation issues

* Improve further
2026-03-23 13:23:55 +01:00
Amaury Levé 0846e6015d Improve MSTest migration skills (#387) 2026-03-20 18:17:10 +01:00
Amaury Levé ae0b6a1d86 Add mtp-hot-reload skill for iterative test fixing with MTP hot reload (#389) 2026-03-17 15:53:34 +00:00
Amaury Levé 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
2026-03-17 14:25:45 +01:00
Amaury Levé 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>
2026-03-17 08:26:01 +00:00
Amaury Levé 2a8388dd71 Add VSTest to MTP migration skill (#373)
* Add VSTest to MTP migration skill

New migrate-vstest-to-mtp skill in the dotnet-test plugin covering:

- Framework-specific MTP runner enablement (MSTest, NUnit, xUnit.net)
- Directory.Build.props centralization of OutputType, runner properties
- MSTest.Sdk UseVSTest removal
- NUnit3TestAdapter 5.0.0+ upgrade requirement
- xunit v2 to xunit.v3 upgrade requirement
- dotnet test CLI argument translation (--logger to --report-trx, --collect
  to --coverage, --blame-crash to --crashdump, --blame-hang to --hangdump)
- xUnit.net --filter syntax migration to --filter-class/--filter-trait/
  --filter-query
- global.json native MTP mode (.NET 10+) vs TestingPlatformDotnetTestSupport
  VSTest-bridge mode (.NET 9 and earlier)
- Azure DevOps VSTest@3 to DotNetCoreCLI@2 pipeline migration
- MTP extension NuGet packages (TrxReport, CrashDump, HangDump, CodeCoverage)
- Exit code 8 behavioral difference (--ignore-exit-code 8,
  TESTINGPLATFORM_EXITCODE_IGNORE)

Includes 10 eval scenarios with tiered timeouts (240-360s), 5 fixture
directories, plugin.json, marketplace.json entries, CODEOWNERS, and
README.md updates.

* Fix codeowners

* Improve

* Improve further

* Improve prompt

* Improve further the description

* Address review comments
2026-03-16 23:56:48 +01:00
Amaury Levé ab201ee691 Fix eval source file resolution to use eval directory (#374)
* Fix eval source file resolution to use eval directory

The SetupWorkDir method resolved setup file 'source:' paths relative to the
skill directory (plugins/.../skills/<name>/), but eval.yaml files live under
tests/. The ../../../../ relative paths resolved correctly but were rejected
by the path traversal security check because the resolved path escaped the
skill directory boundary.

Fix by preferring the eval directory as the base for source resolution when
evalPath is available, falling back to skillPath for backward compatibility
with scenarios embedded in SKILL.md files.

Also update run-tests eval.yaml source paths from
'../../../../tests/dotnet-test/run-tests/fixtures/...' to 'fixtures/...'
(relative to the eval directory where the fixtures actually live).

This was causing all 11 source-based run-tests scenarios to get zero fixture
files, making the agent find an empty workspace and fail to evaluate.

* Address review: extract ResolveSourcePath helper, add warning, fix remaining eval.yaml paths

- Extract source-resolution and path-traversal check into internal
  ResolveSourcePath helper for testability
- Emit a clear warning when file.Source is set but no base directory
  is available (instead of silently continuing)
- Add unit tests covering: evalPath-based resolution, skillPath fallback,
  null paths warning, traversal rejection, and evalPath preference
- Fix path traversal patterns in analyzing-dotnet-performance and
  clr-activation-debugging eval.yaml files (same issue as run-tests)
2026-03-16 16:24:45 +00:00
Amaury Levé 7afa81f831 Run tests supports platforms and frameworks (#343) 2026-03-12 21:29:37 +01:00