【问题标题】:Tests are hanging (ChutzpahTimeoutException)测试挂起 (Chutzpah TimeoutException)
【发布时间】:2012-10-30 19:15:50
【问题描述】:

我已经安装了 Chutzpah 并在我的计算机上运行了几次,然后我重新启动并尝试从 Visual Studio 中的扩展程序运行时出现这种错误命令

>chutzpah.console /wait /path C:\Projects\CP\Testing\RESAAS.JavaScriptTestSuite\Specs

Chutzpah Error: Chutzpah.Exceptions.ChutzpahTimeoutException: Timeout occured when running C:\Projects\CP\Testing\RESAAS.JavaScriptTestSuite\Specs\User\RegistrationSpec.js
at Chutzpah.TestRunner.HandleTestProcessExitCode(Int32 exitCode, String inputTestFile) in c:\Dev\chutzpah\Chutzpah\TestRunner.cs:line 217
at Chutzpah.TestRunner.InvokeTestRunner(String headlessBrowserPath, TestOptions options, TestContext testContext, TestRunnerMode testRunnerMode, ITestMethodRunnerCallback callback) in c:\Dev\chutzpah\Chutzpah\TestRunner.cs:line 200
at Chutzpah.TestRunner.<>c__DisplayClass2.<ProcessTestPaths>b__1(PathInfo testFile) in c:\Dev\chutzpah\Chutzpah\TestRunner.cs:line 143
While Running:C:\Projects\CP\Testing\RESAAS.JavaScriptTestSuite\Specs\User\RegistrationSpec.js



Chutzpah Error: Chutzpah.Exceptions.ChutzpahTimeoutException: Timeout occured when running C:\Projects\CP\Testing\RESAAS.JavaScriptTestSuite\Specs\User\SendMessageSpec.js
at Chutzpah.TestRunner.HandleTestProcessExitCode(Int32 exitCode, String inputTestFile) in c:\Dev\chutzpah\Chutzpah\TestRunner.cs:line 217
at Chutzpah.TestRunner.InvokeTestRunner(String headlessBrowserPath, TestOptions options, TestContext testContext, TestRunnerMode testRunnerMode, ITestMethodRunnerCallback callback) in c:\Dev\chutzpah\Chutzpah\TestRunner.cs:line 200
at Chutzpah.TestRunner.<>c__DisplayClass2.<ProcessTestPaths>b__1(PathInfo testFile) in c:\Dev\chutzpah\Chutzpah\TestRunner.cs:line 143
While Running:C:\Projects\CP\Testing\RESAAS.JavaScriptTestSuite\Specs\User\SendMessageSpec.js

=== 0 total, 0 failed, took 0.00 seconds ===

如果我在 Visual Studio 中单击一个文件上的单个测试并要求它在浏览器中运行,它实际上会正确执行,但由于我们有 100 多个文件,我不能对所有文件使用此方法。

任何见解将不胜感激。网上好像很难找到参考资料。

【问题讨论】:

  • 我看到你在这里发布了同样的问题 (chutzpah.codeplex.com/workitem/72)。您能否附上一个示例 zip,我可以在那里重现您的问题。这将有助于测试和找出您的问题。
  • 我实际上无法通过公司政策分享这一点,但我的同事运行相同的代码库没有看到错误,所以我真的在寻求任何故障排除提示。 @MatthewManela 顺便说一句,我看到有一个新的 v2.2,但我在 Codeplex 中看不到下载链接。
  • 2.2.1 是chutzpah.codeplex.com/releases/view/96824。如果您可以创建一个与您的代码相似的示例来重现该问题,那将很有帮助。
  • 嗨@MatthewManela 非常感谢您的关注,但无论如何,即使我的同事也无法复制,所以我认为它的相关性不大,可能非常本地化,有一些坏文件,我很确定甚至不是测试本身

标签: visual-studio-2010 chutzpah


【解决方案1】:

在 2.0 版本中有 /timeoutMilliseconds 选项。将此设置为更高的值,默认为 5000 (ms)

【讨论】:

  • 需要注意的是默认是3秒。出于某种原因,我的构建机器需要 2-3 秒。这解决了我的问题! +1
  • chutzpah.json 配置文件中还有一个“TestFileTimeout”属性。
【解决方案2】:

刚刚跳回 1.4 版(以匹配我的同事)并且错误都消失了,因为我没有使用任何新功能,这很好。

【讨论】:

    猜你喜欢
    • 2014-04-15
    • 2013-04-12
    • 1970-01-01
    • 1970-01-01
    • 2022-10-04
    • 1970-01-01
    • 1970-01-01
    • 2013-03-17
    • 1970-01-01
    相关资源
    最近更新 更多