I get the following exception when I try to run the SpecFlow test:
In CurrentThread, you need ApartmentState to set InternetStation Automation to ApartmentState.STA.
I have already added the following code in App.config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="NUnit">
<section name="TestRunner" type="System.Configuration.NameValueSectionHandler"/>
</sectionGroup>
</configSections>
<NUnit>
<TestRunner>
<add key="ApartmentState" value="STA" />
</TestRunner>
</NUnit>
</configuration>
I use VS 2010 and make my application run as version 3.5.
I also use the nUnit tool GUI!
source
share