简体   繁体   English

NUnit与夜间构建,如何轻松获取错误?

[英]NUnit with night build, how to get errors easily?

We have a lot of unit tests but they aren't run every night. 我们有很多单元测试,但它们不是每晚都运行。 I have setup some batch files that compile all the code from the SVN repository and I would like to run NUnit. 我已经设置了一些批处理文件来编译SVN存储库中的所有代码,我想运行NUnit。 This is not a big problem because I can call it from the batch file after the compilation BUT the output is stored in the network drive and I need to open it every morning to check if errors happen. 这不是一个大问题,因为我可以在编译后从批处理文件中调用它,但输出存储在网络驱动器中,我需要每天早上打开它来检查错误是否发生。 This is where the problem is. 这就是问题所在。

Do you have a better way to do the same thing that will take the code from the repository, execute test and tell me in a "more fast convenient way" if errors appears? 您是否有更好的方法来执行相同的操作,从存储库中获取代码,执行测试并在出现错误时以“更快捷方便”的方式告诉我?

Update I have installed Team City 4.0 and it work like a charm. 更新我安装了Team City 4.0,它就像魅力一样。 Maybe Cruise Control .Net could have been done the same, but Team City website/documentation/features looked better. 也许Cruise Control .Net本来可以这样做,但Team City网站/文档/功能看起来更好。

Sounds like you need a build server. 听起来你需要一个构建服务器。 See Cruise Control .Net 请参阅Cruise Control .Net

We have recently started using TeamCity with our projects, and so far it seems great. 我们最近开始在我们的项目中使用TeamCity,到目前为止看起来很棒。 We are using it with Subversion and NUnit, aswell as running an external program which makes the final install file of the application. 我们将它与Subversion和NUnit一起使用,以及运行外部程序,该程序生成应用程序的最终安装文件。 The projects and build configurations are really easy to set up. 项目和构建配置非常容易设置。

What about Team City ? Team City怎么样? I am still searching and I have see their product that looks to be able to do what I am searching for. 我仍在搜索,我看到他们的产品看起来能够做我正在寻找的东西。

Why CruseControl.Net get so much vote when I see this Matrix , Team City looks to be better... 为什么当我看到这个Matrix时 ,CruseControl.Net获得了如此多的投票,Team City看起来更好......

Check out What is the best way to send an email from a batch file? 查看从批处理文件发送电子邮件的最佳方法是什么?

All you need to do is extend this to type the log file into the tempory email file. 您需要做的就是扩展它以将日志文件键入临时电子邮件文件。

type NUnitLogFile.txt>>tmp.txt

We have a nightly test driver based on FIT with a special fixture for running NUnit on DLLs. 我们有一个基于FIT的夜间测试驱动程序,带有一个用于在DLL上运行NUnit的特殊夹具。 The testing fixture captures the output and looks for the final summary line that says how many tests passed and failed. 测试夹具捕获输出并查找最终汇总行,该汇总行说明已通过多少次测试并失败。

A corollary question we are facing is how to conveniently display the full NUnit output in HTML without mucking about with gross amounts of XSLT... Any utilities out there that convert console-NUnit output to HTML? 我们面临的一个必然结论是如何方便地在HTML中显示完整的NUnit输出而不会遗漏大量的XSLT ...那里有将控制台-NUnit输出转换为HTML的任何实用程序?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM