Last week I was testing the Coded UI Test feature of Visual Studio 2010. But when I ran the test in an lab management virtual environment, the test returned an error. In the error log I found the following error message:
Error adding test case [xx] to test run: There is no test with specified Id {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}.
I found out that the error was caused by the fact that I was running the test against a build that didn’t contain the coded UI Test associated with the Test case. The problem was that I scheduled a new test run in the Microsoft Test manager without changing the build.
To solve the error I queued a build, verified that the build succeeded, then changed the build associated with the test plan. So be sure that your test plan is always up to date with the correct build.