fix: make TestUtilities a proper xUnit test-discovery target#96
Merged
fix: make TestUtilities a proper xUnit test-discovery target#96
Conversation
VSCode C# Dev Kit treats any assembly under tests/ with xUnit references as a test discovery target. Without Microsoft.NET.Test.Sdk + xunit.runner.visualstudio, testhost fails to resolve transitive packages (e.g. Ardalis.Result) and discovery aborts repeatedly. Add the test SDK + runner and switch back to the full xunit package. Drop IsTestProject=false (no longer accurate). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the AHKFlowApp.TestUtilities project to behave like a proper xUnit test-discovery target (for VS Code C# Dev Kit) by adding the .NET test SDK and Visual Studio test runner packages and removing the IsTestProject=false override.
Changes:
- Remove
IsTestProject=falsefromtests/AHKFlowApp.TestUtilities. - Add
Microsoft.NET.Test.Sdkandxunit.runner.visualstudiopackage references to support discovery/execution in VS Code.
Test Results2 tests 2 ✅ 5s ⏱️ Results for commit 2b91072. ♻️ This comment has been updated with latest results. |
SummarySummary
CoverageAHKFlowApp.API - 61.4%
AHKFlowApp.Application - 98.1%
AHKFlowApp.Domain - 100%
AHKFlowApp.Infrastructure - 100%
AHKFlowApp.TestUtilities - 57.5%
AHKFlowApp.UI.Blazor - 76%
Per-assembly thresholds: Domain line≥85% br≥70% · Application line≥85% br≥45% · Infrastructure line≥70% br≥50% · API line≥57% br≥50% · UI.Blazor line≥65% br≥28% |
Matches pattern used in all other test projects; prevents runner from flowing transitively to projects that reference TestUtilities. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
VSCode C# Dev Kit treats any assembly under tests/ with xUnit references as a test discovery target. Without Microsoft.NET.Test.Sdk + xunit.runner.visualstudio, testhost fails to resolve transitive packages (e.g. Ardalis.Result) and discovery aborts repeatedly.
Add the test SDK + runner and switch back to the full xunit package. Drop IsTestProject=false (no longer accurate).
Summary
Brief description of changes.
Checklist
dotnet test)dotnet build)