使用 cc.net 执行测试时进程超时但未显示任何错误
当通过 cc.net 运行时,nunit 测试失败,提示进程超时。 进程已被杀死 通过 nUNit 或 VS 时一切正常。
此外,即使构建是干净的,cc.net 也会显示先前构建的结果。
有什么帮助吗?
nunit tests fails when run through cc.net saying process timeout. Process has been killed
All works fine when through nUNit or VS.
Also cc.net will then show the results of previous build even if the build is a clean one.
Any help plz.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
默认超时为 600 秒。 如果您的测试开始超出该范围,则构建将失败且没有任何指示。 您可能需要增加 cc.net nunit 任务的超时
The default timeout is 600 seconds. If your tests start to exceed that the build will fail with no indication. You may need to up the timeouts for your cc.net nunit task
如果您看到以前构建的结果,可能是因为您没有删除以前构建的结果。
例如,我的 NUnit 测试结果写入名为 {foo}-results.xml 的文件:
在我的任务中,我的构建文件中有一个步骤,删除整个“bin\debug”目录,以便我的结果始终是当前的。
If you are seeing the results from a previous build, it is probably because you are not deleting the results from your previous build.
For example, my NUnit test results are written to files with the name {foo}-results.xml:
In my tasks, I have a step in my build file that deletes the entire "bin\debug" directory so that my results are always the current ones.
一种可能性是您遇到权限问题。 CruiseControl 可能在服务帐户下运行,并且具有与您的用户帐户不同的权限(我假设您使用该用户帐户手动运行测试)。尝试以服务帐户登录计算机,然后查看是否可以运行单元测试通过 VS 或 NUnit。
One possibility is that you have a permission issue. CruiseControl is perhaps running under a service account and has different permissions than your user account (which I'm assuming you use to manually run the tests.) Try logging into the machine as the service account, then see if you can run the unit tests through VS or NUnit.
如果测试有断言,例如 Debug.Assert(此处的某些内容),我已经看到这种情况发生。 当我在 CC.Net 中发生这种情况时,CC.Net 构建会弹出一个断言消息框。 由于没有人关闭构建服务器上的消息框,因此 NUnit 测试超时。
I've seen this happen if a test has an assertion, e.g. Debug.Assert(something here). When this happens to me in CC.Net, the CC.Net build pops up a message box for the assertion. Since no one closes out the message box on the build server, the NUnit test times out.