views:

369

answers:

2

I want to use CruiseControl.net as a service and have it launch the Fitnesse test runner as a task to run a bunch of acceptance tests using the watin fixture which starts IE. Oh and I want to do this all on a virtual server.

The above all works fine if I'm not running CC.Net as a service (ie. log in to the server via remote desktop and launch the CCNet.exe from the desktop).

I'm pretty sure just marking the CC.Net service as "allow interaction with desktop" won't be enough (it's a virtual server so there may not even be a winstation0). Though I haven't specificially tried this (in the past I tried running Fitnesse as a service and it couldn't start IE via the watin fixture... so I'm pretty confident that more that "allow interaction with desktop" will be needed).

I'm thinking I'll need a .exe that can create a winstation, log on as a specific user, and then launch IE (actually maybe just a shellexecute so I would not be limited to just ie).

Has anyone done anything similar in the past? Any specific pitfalls? Is this worth doing... or should I just do a remote desktop and then disconnect?

Note that the overall goal here is to have a reliable CC.Net process that invokes Fitnesse which in turn invokes IE.

A: 

You could also run CC.Net from the commandline (instead of running it as a service). Works great.

Jeroen van Menen
+1  A: 

In my experience you need to have someone logged on at the console for IE to be able to be started from a service.

If this is running on a server in a secure location you could just set it to automatically logon as explained in this article http://support.microsoft.com/kb/324737

If you want to be a bit cleverer, you can set up an automated startup task that will lock the machine on startup as well. http://forums.techarena.in/windows-xp-support/621461.htm

The only exception to this that I have found is SWEA (http://webiussoft.com/) "SWEA automates Web Browser and provides solution for functional test and regression test automation."

We run SWEA tests on our build server running CruiseControl.NET as a service.

I have no idea why SWEA can work as a service, whilst nothing else can :-(

Bigwave