Skip to content

Restore [CombinatorialData] in dotnet-watch.Tests using Combinatorial.MSTest#54944

Merged
Evangelink merged 2 commits into
mainfrom
evangelink-restore-combinatorial-watch-tests
Jun 24, 2026
Merged

Restore [CombinatorialData] in dotnet-watch.Tests using Combinatorial.MSTest#54944
Evangelink merged 2 commits into
mainfrom
evangelink-restore-combinatorial-watch-tests

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Follow-up to #54903.

That PR migrated dotnet-watch.Tests from xUnit to MSTest.Sdk (MTP). As an unwanted side effect, it removed the use of combinatorial test data — every [CombinatorialData] method was replaced with hand-expanded [DataRow(...)] lists, which are verbose and easy to get out of sync with the parameter space.

This PR restores the combinatorial style using Combinatorial.MSTest — the MSTest-native port whose attribute surface ([CombinatorialData], [CombinatorialValues], [CombinatorialRange]) matches Xunit.Combinatorial. This is the same package already consumed by test/dotnet.Tests, and its version flows through central package management (eng/dependabot/Packages.props). The xUnit Xunit.Combinatorial package is left untouched (still used by other projects).

Changes

  • dotnet-watch.Tests.csproj: add Combinatorial.MSTest PackageReference and the Combinatorial.MSTest global Using.
  • 13 test files: convert the affected methods back from [TestMethod] + explicit [DataRow(...)] lists to [TestMethod, CombinatorialData], restoring [CombinatorialValues(...)] / [CombinatorialRange(...)] parameter attributes where needed and preserving [Ignore] / [OSCondition]:
    • BrowserRefreshServerTests, EvaluationTests, CommandLineOptionsTests, LaunchSettingsTests, FileWatcherTests, AutoRestartTests, BuildParametersSelectionPromptTests, BuildProjectsTests, FileExclusionTests, MauiHotReloadTests, MetadataUpdateHandlerTests, ProjectUpdateTests, RuntimeProcessLauncherTests

All other MSTest migration changes from #54903 (the [TestMethod] attribute, MSTest assertions, lifecycle, etc.) are kept intact. Methods that originally used [InlineData] (now legitimately [DataRow]) are left unchanged.

Validation

dotnet build test/dotnet-watch.Tests/dotnet-watch.Tests.csprojBuild succeeded, 0 warnings, 0 errors.

Copilot AI review requested due to automatic review settings June 23, 2026 15:46
@Evangelink Evangelink requested review from a team and tmat as code owners June 23, 2026 15:46
….MSTest

Follow-up to #54903, which migrated dotnet-watch.Tests to MSTest and as an
unwanted side effect replaced every [CombinatorialData] test with hand-expanded
[DataRow(...)] lists. Restore the combinatorial style using the MSTest-native
Combinatorial.MSTest package (already used by test/dotnet.Tests), keeping the
[TestMethod] attribute and all other MSTest migration changes intact.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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 restores combinatorial test coverage in dotnet-watch.Tests after its xUnit → MSTest.Sdk migration by reintroducing [CombinatorialData]-style parameterization using Combinatorial.MSTest (centrally versioned), replacing verbose hand-expanded [DataRow(...)] lists.

Changes:

  • Add Combinatorial.MSTest package + global Using to dotnet-watch.Tests.csproj.
  • Convert affected MSTest [TestMethod] tests back to [TestMethod, CombinatorialData], using [CombinatorialValues] / [CombinatorialRange] where appropriate.
  • Preserve existing [Ignore] / [OSCondition] behavior while restoring combinatorial parameter spaces.
Show a summary per file
File Description
test/dotnet-watch.Tests/dotnet-watch.Tests.csproj Adds Combinatorial.MSTest reference and global Using so combinatorial attributes are available project-wide.
test/dotnet-watch.Tests/Browser/BrowserRefreshServerTests.cs Restores combinatorial coverage for LogLevel × enableHotReload.
test/dotnet-watch.Tests/Build/EvaluationTests.cs Restores combinatorial coverage for static assets and target framework selection scenarios.
test/dotnet-watch.Tests/CommandLine/CommandLineOptionsTests.cs Replaces expanded DataRows with combinatorial value sets for options/positions.
test/dotnet-watch.Tests/CommandLine/LaunchSettingsTests.cs Restores combinatorial boolean coverage for launch profile environment variable behaviors.
test/dotnet-watch.Tests/FileWatcher/FileWatcherTests.cs Restores combinatorial coverage across polling/nesting/subdirectory watcher permutations.
test/dotnet-watch.Tests/HotReload/AutoRestartTests.cs Restores combinatorial coverage for interactive/non-interactive restart flows (including ignored test).
test/dotnet-watch.Tests/HotReload/BuildParametersSelectionPromptTests.cs Uses [CombinatorialRange] to cover selection indices without enumerating [DataRow].
test/dotnet-watch.Tests/HotReload/BuildProjectsTests.cs Restores combinatorial boolean coverage for file-based app build behaviors.
test/dotnet-watch.Tests/HotReload/FileExclusionTests.cs Restores full combinatorial coverage for exclusion permutations (existing/included/kind).
test/dotnet-watch.Tests/HotReload/MauiHotReloadTests.cs Restores combinatorial boolean coverage while keeping OS gating + ignore.
test/dotnet-watch.Tests/HotReload/MetadataUpdateHandlerTests.cs Restores combinatorial boolean coverage for verbose/non-verbose exception behavior.
test/dotnet-watch.Tests/HotReload/ProjectUpdateTests.cs Restores combinatorial boolean coverage for Directory.Build.props vs normal project update.
test/dotnet-watch.Tests/HotReload/RuntimeProcessLauncherTests.cs Restores combinatorial coverage for trigger/update-location enums and boolean shared output.

Copilot's findings

  • Files reviewed: 14/14 changed files
  • Comments generated: 0

@Evangelink Evangelink force-pushed the evangelink-restore-combinatorial-watch-tests branch from 21207bc to 6adac3c Compare June 23, 2026 15:49
@Evangelink Evangelink force-pushed the evangelink-restore-combinatorial-watch-tests branch from 30a8d3a to b6b176b Compare June 23, 2026 15:52
@Evangelink Evangelink enabled auto-merge June 23, 2026 16:11
@Evangelink

Copy link
Copy Markdown
Member Author

/ba-g #54928 and some unrelated trimming issues

@Evangelink Evangelink merged commit 9b8f61f into main Jun 24, 2026
23 of 25 checks passed
@Evangelink Evangelink deleted the evangelink-restore-combinatorial-watch-tests branch June 24, 2026 18:22
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