I'm attempting to automate Coded UI tests.
My test controller launches the tests on a remote test server, which I normally access via a Remote Desktop connection.
Is it possible to run the Coded UI tests without having to connect via remote desktop?
Currently, the tests only run when I have connected via Remote Desktop, and the window must be open. When I close the Remote Desktop session, the tests do not run.
If it isn't possible to run coded UI tests without remote desktop, how can I automate connecting via remote desktop?
Thanks
this is very easy please check this blog post here this thing is explained in very simple way How to schedule Microsoft coaded UI test execution when you don’t have MS TFS
ii. Click rebuild if a release was already built
After successfully building coded UI project navigate to release folder of project and copy testAutomated.dll named with your project name
Place this dll on remote machine where you want to schedule your test execution
Place .dll in some directory of remote machine e.g I am placing in D:\coadedUitest
Install Miscosoft Test agent from this link on this machine where you want to execute test . http://www.microsoft.com/en-us/download/details.aspx?id=38186
After installing test agent verify MS test is present in location
Open note pad and enter following text D: cd coadedUitest set mstestPath="C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE" %mstestpath%\mstest /testcontainer:testAutomated.dll
Save it with .bat extension
Open .bat file by double clicking it to verify tests are executed or not
After successful execution open windows task scheduler and create a scheduled task to run this created .bat file.
http://testingtoolstecniques.blogspot.com/2014/11/how-to-schedule-microsoft-coaded-ui.html
UPDATE:
Using the VSO or TFS2015 build system no longer need a remote connection for the tests to run. Create a build or a release running the task "Visual Studio Test Agent Deployment", then run the "Run Functional Tests" Task.
The best approach would probably be, create a build that drops your build artifacts, then create a release that deploys the site from the artifacts and runs the Coded UI Tests against that site.
NOTES: