Certain errors can be encountered for any test that can run automatically, which means any test type other than manual. These errors are frequently related to the deployment of tests. When a test is deployed, the file that contains it is copied to another folder, either to a location on the local computer or to a remote computer. For more information, see Test Deployment.
For unit tests, for example, the .dll file that was built from the test project is the file that must be deployed. If this binary file cannot be deployed, any unit tests that it contains are immediately marked as Failed in the Test Results window when you run them.
To fix this error, verify that the files are available on your local computer and that there were no build errors the last time that you rebuilt your test binaries.
Not only binary files can be deployed. You might specify that a particular file, such as a data file, is required by a test and must therefore be deployed with the test. At deployment time, if this file cannot be found because it has been moved or deleted, the test cannot run correctly and an error occurs. Also see Details by Test Type for information about this error with regard to generic tests.
To investigate this error, first note the files and folders specified on the Deployment page of the dialog box used to edit test run configurations. For more information, see How to: Specify a Test Run Configuration. Then check those files and folders on disk to make sure they are present and that their names are identical.
Your solution may have multiple run configuration files. If this is the case, make sure that you examine the run configuration that was active when the test error occurred. To determine which run configuration was active, examine the Test Run Details page for that test run. For more information, see the section "Test Run Details Page" in Test Results Reported.
For more information about active run configuration files, see How to: Apply a Test Run Configuration.