Skip to content

How does dotnet know the test framework? #2171

Answered by bradwilson
ShuiRuTian asked this question in General
Discussion options

You must be logged in to vote

The VS Test engine (which we plug into) finds test adapters by looking for NuGet package references that contain assemblies whose name ends in .testadapter.dll and it exposes types that implement the discovery and execution interfaces. It then dynamically loads that test adapter, and asks it to perform discovery on the assembly.

It even supports multiple test adapters in the same project. We validate that this works in our integration tests: https://github.com/xunit/xunit.integration/tree/main/test-explorer

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ShuiRuTian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants