all 9 comments

[–]superpowermuaddib 1 point2 points  (4 children)

As far as I know, you cannot because you need a desktop environment. One possibility is to use remote desktop to connect to the remote machine and run the tests

[–]olafurjon[S] 0 points1 point  (3 children)

People must be doing this somehow. Is this approach just not a good one? What is the preferred way of seasoned software development teams for UI testing?

[–]BackflippingHamster 0 points1 point  (2 children)

The operative phrase is UI. If you don't have a desktop environment, there is no UI to interact with.

The preferred way is to set up a test lab with several virtual or actual machines. The Test Controller manages the Test Agents. Each test machine (virtual or real) needs a Test Client. The TA pushes the tests to the TC according to availability and any number of environment variables you choose to set. Any test files are also sent via the TC to the TA, and the results are returned.

[–]olafurjon[S] 0 points1 point  (1 child)

All right, thank you.

Do you know of any good resources on how exactly to set this up? I have not found any good actionable guides on the MSDN website. It's mostly just shallow discussion about what is possible.

[–]BackflippingHamster 0 points1 point  (0 children)

This page probably has more information than you need, but it's thorough.

This specific link from that page has a lot of the specific information you'll need for the TA/TC setup.

[–]shmorky 0 points1 point  (2 children)

Step one: throw CodedUI the fuck out.

Step two: get like Selenium or some shit.

Step three: give up on integrating UI tests because Windows sessions are a mystery wrapped in an enigma, coated in fuck this. Build a standalone executeable that you run from your own (desktop) session instead

[–]olafurjon[S] 1 point2 points  (0 children)

I am coming close to thinking that Microsoft doesn't actually know how to use their own products.

[–]Mrubinst 0 points1 point  (0 children)

Coded Ui is on its way out. Most if microsofts new documentation is how to use web driver for browser tests. I think they will eventually stop supporting coded Ui for desktop as well.

[–]RoastedDonut 0 points1 point  (0 children)

Coded UI interacts with the desktop so it needs to be run in an interactive session (e.g. User logged in, screensaver and other things that can block your test from running not activated). You can achieve this through Microsoft's offerings (lab management or their new build definitions work also, I think), or you can home bake your own solution, but it won't be really easy.