title: Executing coded UI test from a target machine's mstest(standalone). Dll's/Files needed!! :(
body: <p>i set up <strong>mstest</strong> on <strong>target machine as standalone program</strong> without installing visual studio. So i copied the files(*.exe's,dll's) mstest needed to the target machine and register all dlls in gac which mstest needs to run unit tests.</p>
  
  <p><strong>Works fine so far for normal unit tests.</strong> </p>
  
  <p>Acually i try to setup mstest to run coded ui test. I copied some new dll's to the target machine:  </p>
  
  <pre><code>- Microsoft.VisualStudio.QualityTools.CodedUITestFramework.dll
  - Microsoft.VisualStudio.TestTools.UITest.Common.dll,TestTools.UITest.Extensions.dll
  - Microsoft.VisualStudio.TestTools.UITesting.dll
  - Microsoft.VisualStudio.HostingProcess.Utilities.Sync
  </code></pre>
  
  <p>But when i try to <strong>execute a test on cmd.exe via mstest.exe</strong> on my target machine, <strong>the test will run but always fail</strong> (works fine on my local machine, Visual Studio 2012). Its a pretty simple test:</p>
  
  <pre><code>  - just click on "Start", 
    - type in "calc press enter" 
  </code></pre>
  
  <p>Both machines use the same operating system.</p>
  
  <p>I guess MSTest.exe <strong>still needs some dll's</strong> to perform codedUiTests. The bad thing is the  missing dll's arent show up in cmd.exe, no errors, no hints just nothing :/ 
  <br>The test runs like normal but will fail all tests.</p>
  
  <p><strong>cmd-output:</strong></p>
  
  <pre><code>Microsoft (R) Test Execution Command Line Tool Version 11.0.50727.1
  Copyright (c) Microsoft Corporation. All rights reserved.
  
  Loading D:\Users\Jenkins\Desktop\CodedUITestProject1\CodedUITestProject1\bin\Debug\CodedUITestProject1.dll...
  Starting execution...
  
  Results               Top Level Tests
  -------               ---------------
  Failed                CodedUITestProject1.CodedUITest1.CodedUITestMethod1
  0/1 test(s) Passed, 1 Failed
  
  Summary
  -------
  Test Run Failed.
    Failed  1
    ---------
    Total   1
  Results file:  C:\VS2011Stub\Common7\IDE\TestResults\Jenkins_MSGP166C 2013-05-24 12_36_28.trx
  Test Settings: Default Test Settings
  </code></pre>
  
  <p><br><strong>Does anyone know what files mstest.exe needs to run codeduitests in a correct way?</strong></p>
  
  <p><strong>Edit:</strong> I checked the *.trx file and copied the missing dll's to my target machine.</p>
  
  <p>I tried to run the test again, it failed again. I was checking the trx file again and got an awesome message :/</p>
  
  <pre><code>  &lt;Results&gt;
      &lt;UnitTestResult executionId="4652eeb1-e1b4-4782-a288-dbd4bb0bda5a" testId="484ddbfe-fdc6-0f5d-9e7b-bab4da5b5905" testName="CodedUITestMethod1" computerName="MSGP166C" duration="00:00:00.0887388" startTime="2013-05-24T16:30:24.1716290+02:00" endTime="2013-05-24T16:30:24.6266745+02:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Failed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="4652eeb1-e1b4-4782-a288-dbd4bb0bda5a"&gt;
        &lt;Output&gt;
          &lt;ErrorInfo&gt;
            &lt;Message&gt;Error calling Initialization method for test class CodedUITestProject1.CodedUITest1: System.IO.FileNotFoundException: Das System kann die angegebene Datei nicht finden. (Ausnahme von HRESULT: 0x80070002)&lt;/Message&gt;
            &lt;StackTrace&gt;    bei System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
     bei System.Reflection.Assembly.LoadFile(String path)
     bei Microsoft.VisualStudio.TestTools.UITest.Framework.UITestExtensionPackageManager.LoadAssembly(String assemblyFile)
  &lt;/StackTrace&gt;
          &lt;/ErrorInfo&gt;
        &lt;/Output&gt;
      &lt;/UnitTestResult&gt;
    &lt;/Results&gt;
  </code></pre>
  
  <p><strong>So what Assembly is missing now??</strong> It was not mentioned.</p>
  
  <p><br><br>Thanks in Advance</p>