使用 nunit-console 在多个程序集中运行单元测试
我想一次性在所有测试组件中运行快速测试,以获得方便的统一输出。
我当前的批处理文件如下所示,它运行测试:但许多测试失败(当单独指定程序集时它们通过)。我怀疑这是由于无法访问某些测试所需的 app.config 造成的。
@echo off
setlocal enabledelayedexpansion
set myvar="d:\path-to-nunit\nunit-console-x86.exe"
for /r D:\path-to-root-of-working-copy\ %%i In (*.Test.Unit.dll) DO set myvar=!myvar! "%%i"
set myvar=!myvar! /domain=Multiple /framework=net-4.0
call %myvar%
有人能想到我的方法可能存在的问题吗?我正在调查并将在发现更多信息后更新问题。
I would like to run the fast tests in all the test assemblies in one go, to get a convenient unified output.
My current batch file looks like this, it runs the tests: but many of the tests fail (they pass when the assemblies are specified individually). I suspect this is due to an inability to access the app.config required for some of the tests.
@echo off
setlocal enabledelayedexpansion
set myvar="d:\path-to-nunit\nunit-console-x86.exe"
for /r D:\path-to-root-of-working-copy\ %%i In (*.Test.Unit.dll) DO set myvar=!myvar! "%%i"
set myvar=!myvar! /domain=Multiple /framework=net-4.0
call %myvar%
Can anyone think of any possible problems with my approach? I am investigating and will update the question as I find more.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
升级到最新版本的 NUnit(并在所有解决方案项目中引用它)解决了该问题。
Upgrading to the latest version of NUnit (and referencing it in all solution projects) fixed the issue.