title: How to Run UI Test by TFS2015?
body: <p>I upgraded my TFS-2013 to TFS-2015 and then define new build definition with 3 steps </p>
  
  <ol>
  <li>MSBuild   </li>
  <li>Visual Studio Test Agent Deployment </li>
  <li>Visual Studio Test 
  using test agent</li>
  </ol>
  
  <p>I selected test group for the second step and add username and password 
  for the third step. I selected the test group and test drop folder which contains test DLLs and I added the DLL file name which contains coded UI test method to test assembly.</p>
  
  <p>when I tried to deploy test agent I found this log :</p>
  
  <blockquote>
    <p>[debug]Calling Invoke-DeployTestAgent DistributedTests: Starting to deploy and configure test agent on test machines. DistributedTests:
    Inputs provided are: DistributedTests: Machines: TestPC3
    DistributedTests: Username: user123 DistributedTests: Machine Group
    name: testui DistributedTests: Run as process: True DistributedTests:
    Login Automatically: True DistributedTests: Disable Screen saver: True
    DistributedTests: Agent location:
    \user-pc\drop_Location\vstf_testagent.exe DistributedTests: Update
    test agent: True DistributedTests: Run test agent as DataCollection
    only : False DistributedTests: Path to script that installs test agent
    on remote machine:
    G:\agentui\tasks\DeployVisualStudioTestAgent\1.0.2\TestAgentInstall.ps1
    DistributedTests: Path to script that configures test agent on remote
    machine:
    G:\agentui\tasks\DeployVisualStudioTestAgent\1.0.2\TestAgentConfiguration.ps1
    DistributedTests: Path to script that checks if test agent is
    installed on remote machine:
    G:\agentui\tasks\DeployVisualStudioTestAgent\1.0.2\CheckTestAgentInstallation.ps1
    DistributedTests: Creating DTL client  DistributedTests: Getting
    Machine Group with name = testui project = TestBuildLifeCycle
    DistributedTests: Got Machine Group with name = testui project =
    TestBuildLifeCycle DistributedTests: Cleaning up tags from machines
    DistributedTests: Removing tag 'Microsoft-AgentsForVS' on machine
    'TestPC3' DistributedTests: Getting list of machines from machinename
    completed DistributedTests: Updating environment resources with
    TestAgent tag DistributedTests: Test Agent is being copied to:
    C:\Users\userFolder\AppData\Local\Temp\2c15a489-7765-4a41-b78e-09197ee5d2c8\vstf_testagent.exe
    DistributedTests: Preparing for copying files from
    C:\Users\userFolder\AppData\Local\Temp\2c15a489-7765-4a41-b78e-09197ee5d2c8\vstf_testagent.exe
    to $env:SystemDrive\TestAgent  DistributedTests: Setting up Copy task
    for Agent : TestPC3  DistributedTests: Total machines where task
    CopyFilesToTestAgent needs to be run : 1 DistributedTests: Task
    'CopyFilesToTestAgent' on machine 'TestPC3' is being run
    DistributedTests: Task 'CopyFilesToTestAgent' on machine 'TestPC3'
    completed. DistributedTests: Task 'CopyFilesToTestAgent' for machine
    TestPC3's Status : Failed DistributedTests: Task
    'CopyFilesToTestAgent' for machine TestPC3's Log :
    System.AggregateException: Failed to create working directory on the
    machine. Consult the logs below for details of the error.  An object
    at the specified path C:\Users\J3CA7~1.JSH does not exist.</p>
  </blockquote>
  
  <p>I used administrator's credentials and solved this issue by install agent manual but need to make it able to edit the agent 
  I've noticed that the process tries to copy test agent to temp folder in appData and then try to copy this agent to c:\testAgent but it failes </p>