Tests succeed when run from Test View but fail when run from test list editor or command line

Viewed 1022

I have a test suite, comprised of both unit tests and integration tests, in a project using C# on .NET 4.0 with Visual Studio 2010. The test suite uses MSTest. When I run all tests in solution (either by hitting the button in the testing toolbar or using the Ctrl-R A shortcut chord) all of the tests, integration and unit, pass successfully.

When I either attempt to run the same tests from the command line with mstest (explicitly using the only .testsettings file present) or attempt to run them from the Test List Editor or using the .vsmdi file the integration tests fail.

The integration tests test the UI and so have dependencies on deployment items and such, whereas the unit tests do not. However, I cannot seem to pin down what is actually different between these two methods of running the tests.

When I inspect the appropriate Out directories from the test run, not all of the files are present.

What would cause some of the files that deploy correctly in one situation from Visual Studio to not deploy correctly in another?

1 Answers
Related