CruiseControl.Net、MSBuild 和 NUnit
CruiseControl.Net 文档建议不要使用 NUnit 任务,而是建议在构建脚本中调用 NUnit。
我正在努力找出实现这一目标的最佳方法。
我已在我的解决方案中添加了一个“RunTests”项目,该项目使用 NUnit MSBuild 社区任务来执行测试。
我想向该项目添加一个“测试”目标,以便我可以使用目标“Build;Test”针对整个解决方案运行 MSBuild。然而,MSBuild 不喜欢这样,报告该解决方案不包含测试目标。
我应该做什么?我不完全清楚为什么 CruiseControl.Net 建议我们不使用 NUnit 任务。如果我确实将对 NUnit 的调用封装在 MSBuild 项目中,我不完全确定是否应该从 CC.Net 调用 MSBuild 两次(一次用于构建所有内容,一次用于调用测试)。如果我应该将构建和测试合并到对 MSBuild 的一次调用中,我该如何实现这一目标?
任何提示都感激不尽。
沙
The CruiseControl.Net documentation advises against using the NUnit task, suggesting instead that NUnit is called within the build script.
I'm trying to work out what is the best way to achieve this.
I've added a 'RunTests' project to my solution which uses the NUnit MSBuild Community Task to execute the tests.
I wanted to add a 'Test' target to this project so that I could run MSBuild against the whole solution with the targets "Build;Test". However, MSBuild didn't like this, reporting thet the solution didn't include a Test target.
What should I be doing? I'm not entirely clear why CruiseControl.Net suggests we don't use the NUnit task. If I do wrap up the calls to NUnit within a MSBuild project, I'm not entirely sure if I should be calling MSBuild twice from CC.Net (once to build everything and once to call the test). If I should be combining the Build and Test within one call to MSBuild, how do I achieve this?
Any tips gratefully received.
Sandy
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您没有理由不能从 ccnet 项目中多次调用 MSBuild。在我们的项目中,我们首先调用MSBuild编译代码。第二个调用使用 MSBuild 脚本来运行我们的单元测试和代码分析。
There is no reason why you can't have several calls to MSBuild from your ccnet project. In our projects, we have the first call to MSBuild compile the code. The second call uses an MSBuild script that runs our unit tests and code analysis.