【发布时间】:2011-02-27 03:04:26
【问题描述】:
如何让 NUnit GUI 运行程序识别/使用我的 App.config 文件?我已经尝试将它放在我项目的顶部文件夹中,并且与我的功能文件位于同一文件夹中。以下是我的 App.config 文件的内容:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow"/>
</configSections>
<specFlow>
<runtime detectAmbiguousMatches="true"
stopAtFirstError="false"
missingOrPendingStepsOutcome="Error" />
</specFlow>
</configuration>
具体来说,我试图告诉 NUnit 在缺少或未决步骤时产生失败结果,这就是我为此指定“错误”的原因。这实际上在我使用 TestDriven.net 时可以正常工作,但在我使用 NUnit GUI 运行程序时却不行。 GUI 始终显示一个绿色条,并将测试显示为 Inconclusive 而不是 Error 或 Failed。
我正在使用这个命令行参数启动 GUI:
E:\Program Files\NUnit 2.5.5\bin\net-2.0\nunit.exe "E:\ACSreader new work\ACSreader2 Working Copy\trunk\ACSreader2\ACSreader2.sln" /config:Test
【问题讨论】:
-
我发现问题是特定于 NUnit GUI 运行器,所以我更新了我的原始帖子