Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running UI automation tests on build server

We use UI Automation and Nunit to create tests UI tests for WPF application. We've created tests that work fine when you run them from a local machine. Those tests never run successfully on our build server (using TeamCity). Build always hang after opening application window. But if I am logged in (remote desktop), on our build server all UI Automation tests also run successfully. So I am guessing that it probably has something to do with running active windows session. Any ideas how to convince our build server to create active windows session or any other solutions for making those tests run on build server?

like image 770
andreja Avatar asked May 05 '09 14:05

andreja


People also ask

Can we automate UI testing?

Introduction. User interface (UI) testing is a process used to test if the application is functioning correctly. UI testing can be performed manually by a human tester, or it can be performed automatically with the use of a software program. Automated UI testing is the automation of manual test tasks.

How should UI tests be tested?

UI testing is centered around two main things. First, checking how the application handles user actions carried out using the keyboard, mouse, and other input devices. Second, checking whether visual elements are displayed and working correctly.

Which frameworks do you use to automate the UI testing?

Selenium WebDriver: Selenium WebDriver is most used and helpful in running the Selenium tests across the browser. Selenium RC: Selenium RC helps write test cases in different programming languages to automate UI tests for web applications against any HTTP website.


2 Answers

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?

like image 52
Lieven Keersmaekers Avatar answered Sep 30 '22 15:09

Lieven Keersmaekers


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.

like image 30
kay.herzam Avatar answered Sep 30 '22 17:09

kay.herzam