Load testing and using unit tests from other visual studio solutions

We are currently working on a pretty big system that involves the creation of many different web services. Because we want each web service to evolve on it’s own in the future we decided that we need to split each web service project into a separate solution in Visual Studio. This makes us able to treat each solution as a unit of Design, Development, Change and Deployment. Each of our web service solutions also contains a set of unit test projects that address specific sets of requirements we want to test. For this we of course use the Visual Studio Team Developer and Test functionality. Each solution contains a set of unit tests that only test at a technical level if they are up and running and performs basic tasks. On a functional level we also have many unit tests available that run certain functional scenario’s these services need to fulfill.


 


As every normal real life project we also have a bunch of non-functional requirements where one of them is of course performance. For us to assess if we meet these requirements we have a dedicated person writing load tests for our system. These load tests use the Team Test SKU and we wanted to create a set of load test scenario’s based on unit tests we already have available for the individual web services. But since this load test spans multiple web services, we don’t want to tie in these test projects into the solutions we have for a specific web service. We decided that we would have load tests in a different visual studio solution.


 


Now how can you reuse the unit tests you already have available in your current solutions? Now there is an interesting scenario J


 


We want to incorporate unit test assemblies created with the other solutions into our overall load test project. We tried at first to set a file reference to these assemblies, but they did not appear in our test lists. Unfortunately we found that the way you need to incorporate those tests from another solution is to add them as an existing item in your test project. In stead of having a reference that would get updated after every compile of the other solutions (like every external file reference), we now where faced with the fact that the assembly gets copied into your project. From that point on your assembly is disconnected from the source and updates of the assembly after compile. It also gets checked in with your project. L


The only way to work arround the fact that the dll gets disconnected from your solution in terms of updates is to add the existing item as a reference in stead of a copy. This is done by clicking the down arrow by the add button, and selecting the option “add as link“. Now it will always refer to the file at it’s original location.


 


I must say, that I not quite understand why the visual Studio Test team decided this way of incorporating the assemblies, while setting a reference feels so natural.