VS 2010 introduced a surprise for us – the deployment feature is disabled by default. Let me explain with this post how this hits everyone running coded tests and how to resolve the problem.
Here is a common scenario one can hit the problem with:
1. Add and record a WebUI Test Studio test in Visual Studio 2010.
2. Convert a step to code.
3. Go to Test View and run the test – you may get an error similar to the following one:
As you may note VS looks for the .dll in the TestResults and it’s Out folder by default. However it doesn’t copy the needed .dll there if the deployment is disabled (again, by default).
As stated in the error message above (we catch the exception to point users to the solution) one needs to enable the deployment setting from the Test Settings. Here are the steps and an image to point to the option:
1. Locate and open (double-click on) the .settings file (the equivalent of the .testrunconfig in VS 2008). By default you will find it under the Solution Items. This will load the Test Settings UI.
2. Choose the Deployment options.
3. Check the “Enable deployment” checkbox.
Next click to Apply the change and close the dialog. Rebuild the project and run the test again. The error is gone and the test runs fine.
You can also read more about the deployment mode in the VSTS Test forums here. I hope this helps!
Subscribe to be the first to get our expert-written articles and tutorials for developers!