In a complex VS2008 solution I have three unit test projects. As they operate on the same test database it is important that the test projects are executed one after the other. It is not important which project first, just that one is finished before the other starts.
If I want to execute them all, there are several ways to do that, which lead to different results:
- I have a test list .vsmdi file where the tests are ordered by project. If I open the list and execute the tests from the test list editor, everything is fine.
- If I open the Test View window, sort the tests by project and run them, again everything is fine.
- However if I run the tests by selecting 'Test -> Run -> All Tests in Solution' from the menu, they get executed in random order where some of them fail, as one of the other test projects already manipulated the test db.
So the question is, what determines the unit test sequence when using the third approach? Is there a way to specify a default test list in the .testrunconfig?
As there are workarounds, the issue is not critical at all. But any thoughts are welcome. Thanks.