Question

I am now working on a visual studio package project, currently all our tests just simulates the way we interact with visual studio with windows open and close, menus selection, button click and so on.I think these tests can be classified as integrated test and they highly depends on the devenv.exe process. For pure unit test, I just want to test one of my business logic and mock other dependencies.Although visual studio SDK contains a test library under the path VisualStudioIntegration\Common\Source\CSharp\UnitTest in SDK folder, I found it a too simple project, too young to be used in my project. When I tried to write unit test from scratch, I got a lot of problems with mocking VSX interfaces. Also there is so little resources about VSX unit test, Can anyone give me some hints or links about this? Any help is appreciated.

Was it helpful?

Solution

In my case, I needed to launch and control Visual Studio from a control program to run some developer studies.

Basically, why not just have your tests run your plugin in the experimental hive on a programmatic instance?

This was a helpful resource for launching an instance of Visual Studio through COM: http://blogs.msdn.com/b/kirillosenkov/archive/2009/03/03/how-to-start-visual-studio-programmatically.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top