'How to create an adapter for the Visual Studio Test Explorer? [duplicate]
I'm a bit stuck with the problem of creating a custom adapter for the Visual Studio test explorer. (Btw I'm using VS 2019). I need to create my own test framework, for sure, with my own test attributes, that the Test Explorer can detect. Just a little bit of information I could find while researching and I tried the suggested solutions but it didn't work for me:
- Create a project and implement ITestRunner and ITestDiscoverer. Copy the output .dll to "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Extensions". Of course, it created a test adapter for test running and executed my tests well, but not discovered any one using Visual Studio.
- Create a nuget package from this project and add it to a target project.
- Download source code of NUnit and tried to analyze but, actually, I didn't find any point that describes a test discovering for the Test Explorer of VS. But if I try to create a nuget package locally from this source project of NUnit, it works. All test can be found by test explorer using NUnit test attribute.
Can anyone help me, what is a right way to do the integration with the Visual Studio Test Explorer?
Solution 1:[1]
Late to the party, but for anyone coming afterwards:
you might want to look at this previous SO question and e.g. this answer of mine.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | superjos |