Failed to set SetUp method when running tests from teamcity

I successfully run tests locally through nunit. But when I try to run them through teamcity, some tests are passed, but some failed, indicating the following error.

Failed to execute SetUp method. System.Runtime.InteropServices.COMException: Creating a COM component instance with CLSID {0002DF01-0000-0000-C000-000000000046} from IClassFactory failed due to the following error: 800704a6. in WatiN.Core.IE.CreateNewIEAndGoToUri (Uri uri, LogonDialogHandler logonDialogHandler, Boolean createInNewProcess) in WatiN.Core.IE..ctor () in test.Setup () in C: \ Tests.vb: line 14

+2
source share
2 answers

, , 1, #, , VB.NET.

#, , , , - WatIn.IE, : IE var ie = new IE (url, true) "" WatIn "createInNewProcess", IE .

, , , VB.NET - . #, IE "TearDown". # :

public static void CloseInternetExplorers()
{
  var processes = from process in Process.GetProcesses()
                  where process.ProcessName == "iexplore"
                  select process;

  foreach (var process in processes)
  {
    while (!process.HasExited)
    {
      process.Kill();
      process.WaitForExit();
    }
  }
}
+2

Nunit teamcity? .

0

All Articles