无法弄清楚为什么当我单独调用 .dll 文件时我的 nunit 测试失败但是当我通过 nunit-console-x86.exe 调用下面的 .nunit 文件时
我怀疑它与配置文件有关。其中一些测试需要此配置文件中的配置信息。有些没有,似乎那些没有通过的。
有没有办法告诉 nunit-console.exe 在加载单个 dll 时使用配置文件?命令行参数中没有任何内容表明这是可能的,这让我只需要定义一个新的配置部分,其中只包含我想要运行的测试子集。
<NUnitProject>
<Settings activeconfig="Debug" />
<Config name="Debug" appbase="..\UnitTest" configfile="Local.config" binpathtype="Auto">
<assembly path=".\bin\Debug\UnitTest.dll" />
<assembly path=".\bin\Debug\DBUnitTests.dll"/>
<assembly path=".\bin\Debug\Processors.dll"/>
</Config>
<Config name="Release" binpathtype="Auto">
<assembly path=".\bin\Release\UnitTest.dll" />
</Config>
</NUnitProject>