Testing Winforms application via teamcity

May 6, 2011 at 10:20 AM


Thanks to the White testing Winforms UI became really simple. But I would like to run White tests using Teamcity. And when I try to do it I get the following exception

Test(s) failed. White.Core.UIItems.UIActionException : Couldn't find window with title Form1 in process 2956, after waiting for 5000 ms

I tried to check `Allow service to interact with desktop` in TeamCity Build agent service, but it didn't help neither.  I saw Using with Continuous Integration topic, but it's not clear enough. Can you please explain what I should do to make teamcity run tests properly?

Thanks in advance.

Oct 16, 2012 at 12:26 PM

I am also Facing the same problem now.

I have opened the WPF Application window. now i want to do  some operation. but it fails to find the window. I cant automate the Login Window as there are lot of issues in identifying the UserName and Password Textbox. so i have to Automate test cases after Login to the Application.

Oct 16, 2012 at 1:47 PM



havbe you read the part Configuration here you can increase the timeouts



Oct 16, 2012 at 6:04 PM

I believe this is not the case here. You most probably are using Vista or Windows 7 systems to run your tests. Your teamcity agent runs as a service and what you are hitting is session 0 isolation. You can read more here :



To test - is this the case run your agent from command line instead of service and check if it works. One of the solutions is described here but I didn't test that.



Services in those systems just wasn't designed to interact with desktop. Same thing will happen on CruiseControl build server when using is as a service.