我的代码如下NUnit测试...NUnit使用WatiN进行测试,从Dev10运行正常,但是当NUnit从“C: Program Files(x86) NUnit 2.5.5 bin net-2.0 nunit.exe”启动时
string url = "";
url = @"http://localhost/ClientPortalDev/Account/LogOn";
ieStaticInstanceHelper = new IEStaticInstanceHelper();
ieStaticInstanceHelper.IE = new IE(url);
ieStaticInstanceHelper.IE.TextField(Find.ById("UserName")).TypeText("abc");
ieStaticInstanceHelper.IE.TextField(Find.ById("Password")).TypeText("defg");
ieStaticInstanceHelper.IE.Button(Find.ById("submit")).Click();
ieStaticInstanceHelper.IE.Close();
在右键单击DEV10项目(视觉工作室10),选择[测试用] [NUnit的2.5],这个测试代码,没有任何问题上运行。我安装了TestDriven。 当从C:\ Program Files(x86)\ NUnit 2.5.5 \ bin \ net-2.0 \ nunit.exe打开NUnit,然后打开我的测试DLL时,NUnit报告以下文本错误和故障
... LoginAsWellKnownUserShouldSucceed:
System.Runtime.InteropServices.COMException : Error HRESULT E_FAIL has been returned from a call to a COM component.
Aside Aside ...右键单击Dev10中的源代码cs文件并选择Run Test,运行测试... 上述测试实际上是TechTalk.SpecFlow 1.3步骤的一部分,我有NUnit 2.5。 5.10112,安装,我已经安装了华廷20.20, 我有以下App.config中为我的测试DLL
开始尖括号已被删除...你如何获得XML在
configuration>
configSections>
sectionGroup name="NUnit">
section name="TestRunner" type="System.Configuration.NameValueSectionHandler"/>
/sectionGroup>
/configSections>
NUnit>
TestRunner>
add key="ApartmentState" value="STA" />
/TestRunner>
/NUnit>
appSettings>
add key="configCheck" value="12345" />
/appSettings>
/configuration>
以前有人打过吗? NUnit测试显然运行在TestDriven的NUnit 2.5.5中,但是在Dev10和TestDriven外部运行NUnit 2.5.5时不会运行?
嗯...是什么DEV10? – 2010-05-18 12:12:55
Dev10 = VisualStudio10;我仍在努力通过这一个; TestDriven使用nunit-x86而不是nunit.exe;也玩删除所有的IE插件;也玩弄了用于watin的IE,我认为这是真正的问题 - 这是非常...不可靠的... ... – user206890 2010-05-19 20:34:59