Open immeraufdemhund opened 9 years ago
Hi, was this idea considered? Is it possible? Right now, OpenCover uses its own test explorer pane, can it be merged into the existing test explorer?
Hi Aleksander, it's a great idea indeed, it would also avoid a lot of development to create and maintain adapters for the different unit test frameworks.
I did some investigation to see if it's possible to interact with test adapters installed by a user, but until now I couldn't find anything yet. I'm not sure if it's possible to do it from a visual studio extension. There is documentation available about test adapters in visual studio, but most of it focuses on how to implement a test adapter, not use them from another plugin. If you have (or someone else has) info about how this can be done, that would be great! It would definitely improve OpenCover.UI and could potentially add support for many more test frameworks
My initial idea was to run the tests from Test Explorer itself. I had tried a lot of things to make it work using that. I could add a context menu item to the test explorer and on click of which, I could execute the tests. However I faced a lot of problems while implementing this, some of them didn't have any solution at all. I am not able to recall them right now. I will let you guys know if I'm able to do so. As far as I know, VS doesn't support adding functionalities to test adapters.
Finally, I ended up dropping the idea of integrating this with the Test Explorer.
From a high level how do you hook into the execution of the test to get the coverage? Does the Test Explorer not have a Context? How about maybe looking into how the static code analyzers look at the code and see if you can use that to get your code coverage?
I don't have Nunit installed but instead use the Nunit test adapter to run my tests. Maybe instead of depending on the test executables, rely on the test adaper