Running UI automation tests on build server

不羁的心 提交于 2019-12-03 13:14:45
Lieven Keersmaekers

You don't have many options. I will list the two I know, the most preferred option first:

  • Set up a virtual machine on your build server. Your builds execute in the virtual machine. You can lock the host (aka your buildserver) keeping things secure.
  • Keep someone logged on all the time. This offcourse creates a security problem. You can alleviate this problem a little by removing the mouse, keyboard and the screen and only access the buildserver through RDP or something similar.

Edit

Take a look at this TestComplete FAQ item: Can TestComplete execute scripts when the computer is locked?

OK, I'm just guessing here.

Try and run the TeamCity service with a local build server user instead of the system account. Maybe you have to login with that account once, before starting a new build.

It definatley sounds like you need to run your tests with an interactive session as opposed to a service. Adding the "Allow Service to interact with desktop" might help, but this is not supported in Vista any more apparently.

If you can run your builds interactivley as a command line, not a serivice that should work too.

We used to run our UIAutomation tests using the visual studo 2008 load agent to distribute them, running as a command line tool on VM's with no problem.

I also agree that you probably should't be running UI tests on a build server a part of your daily build.

Build always hang after opening application window.

Tests that instantiate the UI? That's not going to work, e.g. if you get a modal dialog the build will hang. This is the reason the MVP pattern was invented, to isolate the active presentation code from a concrete view.

Are you using a mock view in your automated tests?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!