1

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.

4
  • What if the error message is correct? Are you sure your "other system" can do coded UI tests? Commented May 12, 2014 at 9:19
  • 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? Commented May 12, 2014 at 9:37
  • @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. Commented May 12, 2014 at 10:02
  • DaN , I have updated my question . Well can you please tell me , if its possible and if so y am getting this error Commented May 12, 2014 at 10:07

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

7 Comments

Hi Ryan, thanks a lot for your reply. I will try it out and get back to you. One doubt, when i was googling for answers one guy suggested that the testsettings file is need for running from remote system. If a person is provided the dll of the coded ui project he can run it in test agent using mstest.exe.Correct me if i am wrong.
Sorry, I thought you were trying to run it remotely (from dev pc to test pc). If someone will manually start the tests on that other environment, you shouldn't need to change any testsettings files or install any agents, because it would be essentially executed locally. However, if you're pointing to the right path, then I would suggest adding the .dll specified in your question to the GAC, using a utility like GACUTIL.
Hi Ryan sorry for the late response. i was out of town. You said test agents are not required, is that so? I will make the situation more clear. I have created a coded UI test for a website. I build the project and provide you the dll. You are trying to run the test cases from you local system and your system doesn't have VSPremium/Ultimate installed. As per what i have understood by googling you will have to install test agent and inside test agent you will have to use mstest to execute the test cases. I hope i have made my situation clear. Thanks for the prompt responses.
Yeah, I was mistaken. MSTEST.exe is packaged with the Agent, so by installing the agent, you'll install mstest. Have you tried this and it still fails?
Strictly speaking, it is possible. I haven't tried it personally, but blog.anthonybaker.me/2013/05/… goes into some detail about it.
|
1

Please have Microsoft Test Agent installed in that system.

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.