Skip to content

Add TUnit-focused eval scenarios for dotnet-test-frameworks - #699

Merged
Evangelink merged 2 commits into
mainfrom
dev/amauryleve/tunit-eval-scenarios
May 28, 2026
Merged

Add TUnit-focused eval scenarios for dotnet-test-frameworks#699
Evangelink merged 2 commits into
mainfrom
dev/amauryleve/tunit-eval-scenarios

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Adds evaluation scenarios that demonstrate the value of the expanded TUnit coverage in #677.

New scenarios (5)

# Scenario Exercises content added by #677
1 Convert cross-framework assertions to TUnit syntax TUnit column in the Assertion APIs table ( + "" + �wait Assert.That(x) + "" + + + "" + IsEqualTo + "" + / + "" + IsTrue + "" + / + "" + IsNull + "" + / + "" + IsAssignableTo + "" + / + "" + Contains + "" + / + "" + Throws<T> + "" + )
2 Diagnose silently-passing TUnit test with missing + "" + �wait + "" + The TUnit-specific paragraph about forgotten + "" + �wait + "" + causing tests to pass silently
3 Refactor TUnit try/catch to native exception assertion New TUnit example block ( + "" + .Throws<T>().WithMessage(...) + "" + / + "" + .ThrowsExactly<T>() + "" + )
4 TUnit lifecycle hooks at test / class / assembly / session scope New TUnit setup/teardown rows ( + "" + [Before(Test|Class|Assembly|TestSession)] + "" + )
5 TUnit skip mechanisms — attribute, assembly-wide, and dynamic Expanded TUnit skip row ( + "" + [Skip] + "" + , + "" + [assembly: Skip] + "" + , + "" + Skip.Test() + "" + )

Updated scenarios (2)

  • Identify TUnit framework — rubric now distinguishes + "" + [ClassDataSource<T>] + "" + as a fixture/data source rather than a class marker (TUnit is convention-based, like xUnit), aligning with the test-class-marker correction in TUnit Fixes & Improvements #677.
  • Identify integration tests — adds a TUnit Project D using a live + "" + SqlConnection + "" + and requires recommending + "" + [Category(\"Integration\")] + "" + for TUnit (the new entry in the integration-markers section).

Validation

Ran + "" + skill-validator evaluate --runs 2 + "" + against the SKILL.md from #677 with model + "" + claude-opus-4.6 + "" + :

New TUnit scenario Baseline → With skill (Isolated) Δ
Convert assertions to TUnit syntax 1.5/5 → 4.0/5 🟢 +2.5
TUnit skip mechanisms 2.5/5 → 5.0/5 🟢 +2.5
TUnit lifecycle hooks 4.0/5 → 5.0/5 🟢 +1.0
Refactor TUnit try/catch 2.5/5 → 3.0/5 🟢 (Plugin: 2.5 → 4.0) +0.5 / +1.5
Diagnose silently-passing TUnit test 4.0/5 → 4.5/5 🟢 (Plugin: 4.0 → 5.0) +0.5 / +1.0

Verdict: + "" + 1/1 skills passed validation + "" + . The judge specifically caught the baseline hallucinating non-existent TUnit APIs (e.g. + "" + Assert.Skip(...) + "" + ) where the skill content correctly produces + "" + Skip.Test(...) + "" + .

  • "" + skill-validator check --plugin ./plugins/dotnet-test + "" + also passes.

Notes

  • Should be merged together with TUnit Fixes & Improvements #677 (or after it) — the TUnit assertion column, + "" + [Before(Assembly)] + "" + rows, and + "" + Skip.Test() + "" + references the rubric checks for only exist once TUnit Fixes & Improvements #677 is in.
  • Rubric items are outcome-focused (avoid vocabulary overfitting per + "" + OverfittingDetection.md + "" + guidance); negative rubric items guard against the LLM defaulting to NUnit/xUnit syntax in TUnit answers.

Adds 5 new evaluation scenarios and tightens 2 existing scenarios to
exercise the expanded TUnit coverage in dotnet-test-frameworks/SKILL.md
(see #677).

New scenarios:
- Convert cross-framework assertions to TUnit syntax (await / IsEqualTo /
  IsTrue / IsNull / IsAssignableTo / Contains / Throws<T>)
- Diagnose silently-passing TUnit test with missing await (debugging
  mystery framed without naming the pitfall)
- Refactor TUnit try/catch to native exception assertion (Throws<T>()
  / ThrowsExactly<T>() / WithMessage)
- TUnit lifecycle hooks at test / class / assembly / session scope
- TUnit skip mechanisms — attribute, assembly-wide [assembly: Skip],
  and dynamic Skip.Test(...)

Updated scenarios:
- Identify TUnit framework: rubric now distinguishes [ClassDataSource]
  as a fixture/data source rather than a class marker (TUnit classes
  are convention-based, like xUnit)
- Identify integration tests: adds a TUnit Project D using live
  SqlConnection and requires recommending [Category("Integration")] for
  TUnit

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 28, 2026 11:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR expands the dotnet-test-frameworks evaluation coverage with TUnit-focused scenarios, aligning the eval suite with the broader TUnit documentation improvements planned in #677.

Changes:

  • Updates existing TUnit identification and integration-test scenarios with corrected TUnit expectations.
  • Adds new scenarios for TUnit assertions, missing await, exception assertions, lifecycle hooks, and skip mechanisms.
  • Strengthens rubrics to guard against fallback to MSTest/xUnit/NUnit syntax.
Show a summary per file
File Description
tests/dotnet-test/dotnet-test-frameworks/eval.yaml Adds and updates skill-validator eval scenarios covering TUnit-specific framework behavior.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread tests/dotnet-test/dotnet-test-frameworks/eval.yaml
@github-actions

Copy link
Copy Markdown
Contributor

Skill Coverage Report

Plugin Skill Covered Coverage
dotnet-test dotnet-test-frameworks 4/5 80%
Uncovered: dotnet-test/dotnet-test-frameworks
  • [CodePattern] Assert.AreEqual (line 61)

@Evangelink

Copy link
Copy Markdown
Member Author

/evaluate

Apply the same updated and new scenarios as in eval.yaml to the parallel

eval.vally.yaml so both pipelines exercise the new TUnit-focused checks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
github-actions Bot added a commit that referenced this pull request May 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Skill Validation Results

Skill Scenario Quality Skills Loaded Overfit Verdict
dotnet-test-frameworks Cross-framework assertion equivalence mapping 5.0/5 → 5.0/5 ℹ️ not activated (expected) ✅ 0.13 [1]
dotnet-test-frameworks Identify TUnit framework and its unique attributes 5.0/5 → 5.0/5 ℹ️ not activated (expected) ✅ 0.13 [2]
dotnet-test-frameworks Replace try-catch with framework-native exception assertions 5.0/5 → 5.0/5 ℹ️ not activated (expected) ✅ 0.13 [3]
dotnet-test-frameworks Skip annotations across all four frameworks 5.0/5 → 5.0/5 ✅ dotnet-test-frameworks; tools: report_intent, skill / ℹ️ not activated (expected) ✅ 0.13 [4]
dotnet-test-frameworks Convert NUnit lifecycle methods to xUnit equivalents 5.0/5 → 5.0/5 ℹ️ not activated (expected) ✅ 0.13 [5]
dotnet-test-frameworks Identify integration tests by markers and code patterns 5.0/5 → 5.0/5 ℹ️ not activated (expected) ✅ 0.13 [6]
dotnet-test-frameworks Convert cross-framework assertions to TUnit syntax 1.7/5 → 4.0/5 🟢 ✅ dotnet-test-frameworks; tools: report_intent, skill / ℹ️ not activated (expected) ✅ 0.13 [7]
dotnet-test-frameworks Diagnose silently-passing TUnit test with missing await 4.7/5 → 4.0/5 🔴 ✅ dotnet-test-frameworks; tools: report_intent, skill / ℹ️ not activated (expected) ✅ 0.13 [8]
dotnet-test-frameworks Refactor TUnit try/catch to native exception assertion 2.3/5 → 3.3/5 🟢 ℹ️ not activated (expected) ✅ 0.13 [9]
dotnet-test-frameworks TUnit lifecycle hooks at test, class, assembly, and session scope 4.0/5 → 4.3/5 🟢 ✅ dotnet-test-frameworks; tools: report_intent, skill / ℹ️ not activated (expected) ✅ 0.13 [10]
dotnet-test-frameworks TUnit skip mechanisms — attribute, assembly-wide, and dynamic 3.0/5 → 3.3/5 🟢 ✅ dotnet-test-frameworks; tools: report_intent, skill / ℹ️ not activated (expected) ✅ 0.13 [11]

[1] ⚠️ High run-to-run variance (CV=103%) — consider re-running with --runs 5. (Plugin) Quality unchanged but weighted score is -2.3% due to: tokens (12923 → 17586)
[2] ⚠️ High run-to-run variance (CV=162%) — consider re-running with --runs 5. (Isolated) Quality unchanged but weighted score is -0.1% due to: efficiency metrics
[3] (Plugin) Quality unchanged but weighted score is -2.8% due to: tokens (13194 → 17864), time (10.6s → 15.1s)
[4] ⚠️ High run-to-run variance (CV=119%) — consider re-running with --runs 5. (Isolated) Quality unchanged but weighted score is -4.6% due to: tool calls (0 → 1), tokens (12777 → 17800)
[5] ⚠️ High run-to-run variance (CV=190%) — consider re-running with --runs 5
[6] ⚠️ High run-to-run variance (CV=73%) — consider re-running with --runs 5. (Plugin) Quality unchanged but weighted score is -2.6% due to: tokens (13440 → 18102), quality
[7] ⚠️ High run-to-run variance (CV=92%) — consider re-running with --runs 5
[8] ⚠️ High run-to-run variance (CV=117%) — consider re-running with --runs 5. (Plugin) Quality unchanged but weighted score is -3.4% due to: tokens (12915 → 17577), quality, time (9.5s → 11.9s)
[9] ⚠️ High run-to-run variance (CV=111%) — consider re-running with --runs 5
[10] ⚠️ High run-to-run variance (CV=60%) — consider re-running with --runs 5. (Plugin) Quality unchanged but weighted score is -4.4% due to: quality, tokens (13372 → 18054), time (14.0s → 18.3s)
[11] ⚠️ High run-to-run variance (CV=76%) — consider re-running with --runs 5. (Plugin) Quality unchanged but weighted score is -6.8% due to: quality, tokens (12859 → 17577)

Model: claude-opus-4.6 | Judge: claude-opus-4.6

🔍 Full Results - additional metrics and failure investigation steps

To investigate failures, paste this to your AI coding agent:

For PR 699 in dotnet/skills, download eval artifacts with gh run download 26573818883 --repo dotnet/skills --pattern "skill-validator-results-*" --dir ./eval-results, then fetch https://raw.githubusercontent.com/dotnet/skills/9bcb42533d638d60b7f4d850139a82e7e3d172c9/eng/skill-validator/src/docs/InvestigatingResults.md and follow it to analyze the results.json files. Diagnose each failure, suggest fixes to the eval.yaml and skill content, and tell me what to fix first.

▶ Sessions Visualisation -- interactive replay of all evaluation sessions

@Evangelink
Evangelink enabled auto-merge (squash) May 28, 2026 12:24
@Evangelink

Copy link
Copy Markdown
Member Author

/evaluate

@Evangelink
Evangelink merged commit b9db51d into main May 28, 2026
36 checks passed
@Evangelink
Evangelink deleted the dev/amauryleve/tunit-eval-scenarios branch May 28, 2026 12:30
github-actions Bot added a commit that referenced this pull request May 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Skill Validation Results

Skill Scenario Quality Skills Loaded Overfit Verdict
dotnet-test-frameworks Cross-framework assertion equivalence mapping 5.0/5 → 5.0/5 ℹ️ not activated (expected) ✅ 0.15 [1]
dotnet-test-frameworks Identify TUnit framework and its unique attributes 5.0/5 → 5.0/5 ✅ dotnet-test-frameworks; tools: report_intent, skill / ℹ️ not activated (expected) ✅ 0.15 [2]
dotnet-test-frameworks Replace try-catch with framework-native exception assertions 5.0/5 → 5.0/5 ℹ️ not activated (expected) ✅ 0.15 [3]
dotnet-test-frameworks Skip annotations across all four frameworks 5.0/5 → 5.0/5 ✅ dotnet-test-frameworks; tools: report_intent, skill / ℹ️ not activated (expected) ✅ 0.15 [4]
dotnet-test-frameworks Convert NUnit lifecycle methods to xUnit equivalents 5.0/5 → 5.0/5 ℹ️ not activated (expected) ✅ 0.15
dotnet-test-frameworks Identify integration tests by markers and code patterns 5.0/5 → 5.0/5 ℹ️ not activated (expected) ✅ 0.15 [5]
dotnet-test-frameworks Convert cross-framework assertions to TUnit syntax 2.0/5 → 4.0/5 🟢 ✅ dotnet-test-frameworks; tools: report_intent, skill / ℹ️ not activated (expected) ✅ 0.15 [6]
dotnet-test-frameworks Diagnose silently-passing TUnit test with missing await 4.7/5 → 4.7/5 ✅ dotnet-test-frameworks; tools: report_intent, skill / ℹ️ not activated (expected) ✅ 0.15 [7]
dotnet-test-frameworks Refactor TUnit try/catch to native exception assertion 2.0/5 → 2.7/5 🟢 ℹ️ not activated (expected) ✅ 0.15 [8]
dotnet-test-frameworks TUnit lifecycle hooks at test, class, assembly, and session scope 4.0/5 → 4.3/5 🟢 ✅ dotnet-test-frameworks; tools: report_intent, skill / ℹ️ not activated (expected) ✅ 0.15 [9]
dotnet-test-frameworks TUnit skip mechanisms — attribute, assembly-wide, and dynamic 3.0/5 → 3.7/5 🟢 ✅ dotnet-test-frameworks; tools: report_intent, skill / ℹ️ not activated (expected) ✅ 0.15 [10]

[1] (Plugin) Quality unchanged but weighted score is -2.6% due to: tokens (12928 → 17579), time (12.0s → 15.8s)
[2] (Isolated) Quality unchanged but weighted score is -19.7% due to: judgment, tokens (13127 → 27969), tool calls (0 → 2)
[3] (Plugin) Quality unchanged but weighted score is -2.4% due to: tokens (13200 → 17857), time (13.2s → 16.3s)
[4] ⚠️ High run-to-run variance (CV=143%) — consider re-running with --runs 5. (Isolated) Quality unchanged but weighted score is -20.7% due to: judgment, quality, tool calls (0 → 1), tokens (12778 → 17808)
[5] ⚠️ High run-to-run variance (CV=133%) — consider re-running with --runs 5. (Plugin) Quality unchanged but weighted score is -1.2% due to: tokens (13446 → 18103)
[6] ⚠️ High run-to-run variance (CV=366%) — consider re-running with --runs 5. (Plugin) Quality dropped but weighted score is +3.1% due to: efficiency metrics
[7] ⚠️ High run-to-run variance (CV=319%) — consider re-running with --runs 5. (Isolated) Quality unchanged but weighted score is -5.2% due to: tool calls (0 → 1), tokens (12890 → 18027), time (8.8s → 11.4s)
[8] ⚠️ High run-to-run variance (CV=675%) — consider re-running with --runs 5. (Plugin) Quality improved but weighted score is -4.1% due to: tokens (12890 → 23329)
[9] ⚠️ High run-to-run variance (CV=123%) — consider re-running with --runs 5. (Isolated) Quality improved but weighted score is -22.3% due to: judgment, quality, tool calls (1 → 2), tokens (22094 → 28547), time (17.7s → 24.8s)
[10] ⚠️ High run-to-run variance (CV=295%) — consider re-running with --runs 5

Model: claude-opus-4.6 | Judge: claude-opus-4.6

🔍 Full Results - additional metrics and failure investigation steps

To investigate failures, paste this to your AI coding agent:

For PR 699 in dotnet/skills, download eval artifacts with gh run download 26574476045 --repo dotnet/skills --pattern "skill-validator-results-*" --dir ./eval-results, then fetch https://raw.githubusercontent.com/dotnet/skills/87eeda8682adae91947d71829ba746db48b5f9f9/eng/skill-validator/src/docs/InvestigatingResults.md and follow it to analyze the results.json files. Diagnose each failure, suggest fixes to the eval.yaml and skill content, and tell me what to fix first.

▶ Sessions Visualisation -- interactive replay of all evaluation sessions

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants