How would I resolve "Error adding test case [12345] to test run: File does not exist. Could not find file..."?

StackOverflow https://stackoverflow.com/questions/21581437

Question

I am using TFS Build with template LabDefaultTemplate.11.xaml and attempting to run some tests in our test environment. In Microsoft Test Manager I have setup an environment, test plan and test case. During the test run portion of the build I receive the following in the test run log:

Error adding test case [1234] to test run: File does not exists. Could not find file \MyServer\Stage\Build123\My.Test.Assembly.dll

The path given in the error message is the correct path to the staging directory. The assembly is the correct test assembly that is the associated automation to the test case.

Important fact: We don't copy our assemblies directly in our stage directory. Instead we stage a package (a zip file basically) of all the assemblies.

It appears that the test run is expecting the assembly to be in the root of the staging directory.

Here are my questions:

Can I specify the test run to look in a different location for the test assembly?

Or Do I have to have the test assemblies in the root stage folder?

Was it helpful?

Solution 2

I found how to change the directory. I figured it out via this msdn forum post.

Basically, I had to edit the LabDefaultTemplate.11.xaml build template.

  1. Find the Running Tests activity under Run Tests on Environment -> Run Tests -> Running Tests
  2. Look for TestDirectory under Properties
  3. Change it to the folder you need (it defaults to BuildLocation)

enter image description here

OTHER TIPS

Try adding your test assembly to the deployment section in your automated test settings. Open your automated test setting, goto Advanced > Deployment; add your assembly file to the test setting.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top