Error of running Nunit test

Topics: ASP.NET 2.0, Controls
Mar 22, 2014 at 12:56 PM
Hi, all.

I downloaded BlogEngine.NET 2.9 source code. Then I want to run the BlogEngine.Tests.dll in Nunit. But the tests cannot run successfully. The error message is like this:

at WatiN.Core.IE.CheckThreadApartmentStateIsSTA()
at WatiN.Core.IE.CreateNewIEAndGoToUri(Uri uri, IDialogHandler logonDialogHandler, Boolean createInNewProcess)
at BlogEngine.Tests.BeTest.SetUp() in c:\rtur\src\Codeplex\be\BlogEngine\BlogEngine.Tests\BeTest.cs:line 18

I checked the source code and found the [STAThread] above the main() method in BeTest.cs. I think the source code is correct and I have not changed it at all. But why the test in Nunit is wrong ?

My environment is as follows:
OS : Windows 8.1
IE: version 11.0.9600
IDE: VS 2012