Running Automated User Acceptance Tests using TeamCity

Hi

We have created a suite of automated user acceptance tests using the WebAii test automation framework.  WebAii creates the tests as plain NUnit tests that you can run using NUnit console.  I'm attempting to get the tests to execute via TeamCity but to no avail.  I can run the tests manually on the build agent but when I launch the build from TeamCity it refuses to execute the tests.  After some discussion with the WebAii folks, they replied by saying that I need to make sure that the account the service runs under has "Interactive Desktop Permissions" for WebAii to take control of the mouse etc.  I subsequently changed the TeamCity Buildagent service to run as Local System Account with the "Allow service to interact with desktop" checkbox set to true.  Unfortunately the tests still do not execute :-(

Is there anyting special that I can/need to do to get this working via TeamCity?  As this stage I'm not sure whether the problem is TeamCity/WebAii related.  WebAii assures me that they have numerous other clients who are running the tests via a CI server.

Thanks

5 comments
Comment actions Permalink

Try to start agent via agent.bat script and see whether your tests will run.

0
Comment actions Permalink

Thanks Pavel

Running the build agent via the batch file solved the problem   Is there any difference between running the build agent via the batch file vs the service that I need to be aware of?

0
Comment actions Permalink

The difference is in permissions granted by operating system. There are no differences at the TeamCity level: implementation is the same.

Also build agent started as service cannot access network mapped paths by assigned letters but it can access such paths in uniform format: \\server\folder. This limitation also is OS specific and is not related to our code.

0
Comment actions Permalink

Hi Pavel et al,

Can you elaborate on what you mean by "permissions granted by operating system"?

To run the tests, first we build the code, then run the tests (pretty standard).
Before, when we ran the tests through the service, the build step would always complete (and then the GUI tests would fail)
Now, the build step fails. The last time I ran it, it said "LINK error LNK1181: cannot open inupt file ____.lib"
I did a search for ___.lib, and it was living on a local drive, in a folder that was on the path.

Is this due to the process having less permissions than it would normally have?
Is there a way to give the process Administrator privileges?

We are running the tests on a Windows Server 2003 Virtual Machine.

Thanks a lot for any help you can give!
Jason A.

0
Comment actions Permalink

Just make sure the user logged in when running the console has the permissions required to do a build.  A good rule of thumb: if a user can do the build manually, that user should be able to run the agent in console mode so that TC can successfully run the build.  In our case, the user that runs the TC agent is a service/generic account (like 'DOMAIN\builder') that has admin privilige on the agent and the necessary read/write privilege across network shares where appropriate for our builds.

0

Please sign in to leave a comment.