I try to run some javascript unit tests (in addition to my Nunit tests) on a project in TeamCity, by using Watin. I am not very familiar with either Watin or Teamciy, so forgive me if I have missed some vital information along the way.
Anyway: When I run the test in Visual Studio 2008, it succeeds, but when I try to run it on teamcity it crashes during the setup method with the following message:
System.IO.FileNotFoundException : Creating an instance of the COM component with
CLSID {0002DF01-0000-0000-C000-000000000046} from the IClassFactory failed due to the
following error: 8007007e.
at WatiN.Core.IE.CreateNewIEAndGoToUri(Uri uri, IDialogHandler logonDialogHandler,
BooleancreateInNewProcess)at WatiN.Core.IE..ctor(String url)
This is where it fails:
private IE _ie;
[TestFixtureSetUp, RequiresSTA]
public void TestFixtureSetUp()
{
_ie = new IE();
_ie.ShowWindow(NativeMethods.WindowShowStyle.Hide); <------ FAILS HERE!
}
I've tried the tip found in this thread, about running the TC agent from the bat-file. It had no effect on this issue, however. Does anyone have a clue why I can't get IE to fire up on the build server? By the way: I have annotated my test method with [Test, RequiresSTA]