I am starting to work with WatiN to test my web interface. The problem I am facing is this: When I run the tests from TestDriven.net, I have no problem. If I use the ReSharper test run, I get this predictable AppartmentState exception.
I tried using the various parameters described here: http://watin.sourceforge.net/apartmentstateinfo.html#testdriven . Nothing helps.
Any suggestions?
- Resharper watin. , , nunit:
http://watin.sourceforge.net/apartmentstateinfo.html#nunit
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> <!-- Valid values are STA,MTA. Others ignored. --> <add key="ApartmentState" value="STA" /> </TestRunner> </NUnit> </configuration>
NUnit 2.5 RequiresSTA .
Resharper 5.1 VisualStudio 2010 Ultimate, , Resharper, " Shadow-Copy" ( Resharper → Options → Tools → Unit Testing). , , - , dll (: assemblyname.dll.config).
Source: https://habr.com/ru/post/1711746/More articles:Silverlight Stretch ComboBox Content - xamlCreating a ticket in BMC Remedy via Java - javaCreating Excel program documents - javaMySQL UPDATE primary key query is sometimes extremely slow - mysqlWhere to place custom and third-party classes in a CakePHP project? - phpсоздание обертки jsonp для json-данных - jsonRegister factory class in Autofac using web.config - autofacВызов службы Windows с удаленного компьютера - c#Parallel MATLAB and Logging - parallel-processingUsing cscope on MacOS X - macosAll Articles