-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dependencies and targeting for a custom VS test provider #10743
Comments
Hello, what is your goal? I am assuming you want to integrate a new testing framework? Or a whole new way of running tests? You most likely don't want to implement ITestRuntimeProvider. Instead you want to implement test discoverer and test executor. Example of that is here: https://github.com/nohwnd/intent You should ship it as netstandard2.0. And don't forget to name the dll *.TestAdapter.dll to be discovered. For object model you should choose the version that is equal to the oldest VS you want to support, and use it as ref (not ship it). |
Its something like implementing a new testing framework
Thanks, but I need the
I've tried that, with v17 of the obj model (for vs 2022), but still don't see my provider being instantiated. Anyway, I suspect that what I'm seeing isn't an issue with the test platform - but is something I'm either not doing or doing wrong, so I'll close this ticket. Thanks! |
Hi. I'm looking at writing a custom test provider for VS2022. Briefly, I have two questions:
Microsoft.VisualStudio.TestPlatform.ObjectModel
should I be using, and from where?More details:
I originally just tried stubbing
ITestRuntimeProvider
in a .NET 8 dll project using v17.12.0 ofMicrosoft.VisualStudio.TestPlatform.ObjectModel
, Using a test project with a custom.runsettings
file I was able to see that my dll was being loaded but the provider wasn't being instantiated.Looking at
Microsoft.VisualStudio.TestWindow.dll
that ships with VS I can see that its built for .NET framework 4.6.2 and gives its AssemblyVersion attribute as 15.0.0.0. So I hypothesized that maybe the test runtime was using the .net framework and couldn't load .NET assemblies. I tried building anITestRuntimeProvider
stub as a framework assembly with v15.0.0.0 ofMicrosoft.VisualStudio.TestPlatform.ObjectModel
from nuget - but this doesn't appear to provide a definition ofITestRuntimeProvider
(although VS's private version does).So now I don't know whether my initial .NET 8 approach was correct,, or whether I should use the framework with a different reference source for the ObjectModel dll. Or something else that I'm currently unaware of.
I'd appreciate any clarification on this. Thanks.
The text was updated successfully, but these errors were encountered: