Fix test infrastructure: enable test execution and fix TestHelper path resolution#171
Merged
Merged
Conversation
…h resolution Set 'IsTestProject=true' in tests.csproj so that the arcade build system actually runs the tests. Fix TestHelper.ProjectDir resolving to artifacts/bin/tests/ instead of the source tests/ directory. With the arcade build system, the test assembly output goes to artifacts/bin/tests/Debug/net10.0/. The old logic walked up from the assembly location and stopped at the first directory named 'tests', which matched artifacts/bin/tests/ — a directory that doesn't contain the actual test data files. Add an IsTestsProjectDir helper that also checks for tests.csproj, ensuring we find the source tests/ directory with the real TestData. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes test execution under the Arcade build by correctly marking the tests project as a test project and making TestHelper.ProjectDir resolve to the source tests/ directory (instead of artifacts/bin/tests/...) so that test data files are found reliably.
Changes:
- Mark
tests/tests.csprojwithIsTestProject=trueso Arcade test discovery/execution runs this project. - Update
TestHelper’s project-directory discovery to require both atests/directory name and the presence oftests.csproj.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
tests/tests.csproj |
Enables Arcade to treat this as a runnable test project. |
tests/TestHelper.cs |
Makes ProjectDir resolution robust against artifacts/bin/tests/... paths by validating tests.csproj presence. |
The net472 test target verifies netstandard2.0 compatibility with .NET Framework consumers, but it cannot run on macOS since the .NET SDK doesn't include the net472 test host there. Condition the target so bare 'dotnet test' works on all platforms. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jonathanpeppers
approved these changes
Apr 28, 2026
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.
Set 'IsTestProject=true' in tests.csproj so that the arcade build
system actually runs the tests.
Fix TestHelper.ProjectDir resolving to artifacts/bin/tests/ instead of
the source tests/ directory. With the arcade build system, the test
assembly output goes to artifacts/bin/tests/Debug/net10.0/. The old
logic walked up from the assembly location and stopped at the first
directory named 'tests', which matched artifacts/bin/tests/ — a
directory that doesn't contain the actual test data files.
Add an IsTestsProjectDir helper that also checks for tests.csproj,
ensuring we find the source tests/ directory with the real TestData.