By default, your build agent runs as a service. This means that it fully runs in the background and does not interact with the user interface.
To run Coded UI Tests (or any other test that interacts with the user interface), you need to run the build agent interactively. This means that the build agent runs as a real program that you can see. Running in this mode, the agent can interact with the user interface.
TFS " ". .
. .
Update
vNext , . , . (, Visual Studio, Azure SDK ..).
: https://.visualstudio.com/_admin/_AgentPool
, ConfigureAgent.cmd. . , , :

, , . . .