Running test in lab management “Error adding test case, there is no test with specified id

One of the most exiting capability of Lab Environment is the ability to

1) Record a Coded Ui Test
2) Assign it to a test
3) Run the test in an lab management virtual environment.

It is possible that running the test will return an error, and in the log you find an error like

Error adding test case [xx] to test run: There is no test with specified Id {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}.

The error is due to the fact that you are running your test against a build that does not contain the coded UI Test associated with the Test case. This is a common error if you:

1) register the coded UI Test
2) assign to a Test Case 
3) go to MTM and run the test, without changing the build.

To solve this error: queue a build, verify that the build succeeded, then change the build associated with the test plan.

image

Be sure that the build in use is one that contains the test associated with automation, then run the test again and everything should succeed.

Alk.

Published by

Ricci Gian Maria

.Net programmer, User group and community enthusiast, programmer – aspiring architect – and guitar player :). Visual Studio ALM MVP

2 thoughts on “Running test in lab management “Error adding test case, there is no test with specified id”

  1. What I’ve never quite understood with Testing Center is just how it links the test to the build in use. So I presume this means that all the test cases within the test plan (manual and automated) must be run against this build? So you can’t split it out and have different test cases within a test plan run against different builds (or test environments for that matter)?

  2. This post shows you an example of how the build is used. Lab management use the build to look for automation test associated with the test case. A test case could have some automated test, each one has a coded ui test associated, and the build number is used to grab the test to run.

    Then it is used as a reference, there is no good in running some test against a build and another set of tests against another build. For this reason MTM permits you to associate a build number to the test suite.

    The build actually deployed on the lab environment is managed by the automated build, and have no link with this value, this is how I got the error in the post.

    alk.

Leave a Reply

Your email address will not be published.