1
votes

I have a test case i.e created using coded UI. I want to run the test using MStest. I am able to run the test case in my system, but when i try to run in another system , it throws this error "Unable to load the test container 'C:******************\bin\Debug***.dll' or one of its dependencies. Error details: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestTools.UITesting, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified."

Can anyone pls tell me why? I tried the answer from this question running mstest from command line against visual studio 2012 native c++ tests, but stil its not working

I am trying to run these coded UI test in a system that has visual studio Professional 2012 only(where coded Ui is not possible , if i am rt).

A question in stack overflow mentioned the same issue, but the solution is to add a dll(Microsoft.VisualStudio.TestTools.UITesting) but where, was not specified.

2
What if the error message is correct? Are you sure your "other system" can do coded UI tests? - nvoigt
It may seem like a dumb question forgive me. As far as i know , coded UI can be done in either Ultimate or Premium VS . So i want to know if its possible to run the test in a machine that has no vs or no Ultimate or premium is installed? - A J
@AJ: if that's what you want to know, you should make that clear in your question. Right now you have no indication that this is your goal, or that there is a significant difference between the two systems. - Dan Puzey
DaN , I have updated my question . Well can you please tell me , if its possible and if so y am getting this error - A J

2 Answers

2
votes

To execute the tests on a machine that is not set up for development of coded ui, you need to install the Visual Studio Test agent on that machine, and a Visual Studio controller to manage the agent. There's a great article here about configuring that environment.

After installing and configuring those, create a new TestSettings file in your project that points to the controller and the agents assigned to it. After you've configured it, select the file by navigating to it from this menu:

how to select test settings file
(source: microsoft.com)

Keep in mind that you cannot debug your tests on agents. You must run the tests.

1
votes

Please have Microsoft Test Agent installed in that system.

http://www.microsoft.com/en-us/download/details.aspx?id=38186