1

我正在使用带有 Typescript 和 nUnit 的 Chutzpah 版本 3.2.3。

我能够成功运行单元测试。但是当我对相同的单元测试进行代码覆盖时,我得到了

Error: Timeout occurred when executing test file

我不知道从哪里开始寻找修复它。一天以来,我一直在努力解决这个问题,非常感谢任何线索。

下面是我的 chutzpah.json

{
"Framework": "qunit",
"TestHarnessLocationMode": "Custom",
"TestHarnessDirectory": "../example.exampleTest.Client.Excel.Web/App",

"Compile": {
    "Mode": "External",
    "Extensions": [ ".ts" ],
    "ExtensionsWithNoOutput": [ ".d.ts" ],
    "SourceDirectory": "../../Example.exampleTest/",
    "OutDirectory": "../../Example.exampleTest/"
}

}

4

1 回答 1

3

我能够通过具体说明代码覆盖范围中包含哪些文件以及排除哪些文件来解决该问题。下面是我更新的 chutzpah.json

{
"Framework": "qunit",
"EnableCodeCoverage ": "true",
"CodeCoverageIncludes": [
    "*Orchestrator*",
    "*Transformer*",
    "*Processor*"
],
"CodeCoverageExcludes": [
    "*\\Example.Example.Client.Excel.Web\\App\\Workstreams\\AX-AX\\*",
    "*\\Example.Example.Client.Excel.Web\\App\\Workstreams\\CS\\v1.0\\CS-ICS\\*",
    "*\\Example.Example.Client.Excel.Web\\App\\Workstreams\\CAD-CAD\\*",
    "*\\Example.Example.Client.Excel.Web\\App\\AddInModules\\*",
    "*\\Example.Example.Client.Excel.Web\\Scripts\\*",
    "*\\Example.Example.Client.Excel.Web\\Mocks\\*"
],

"TestFileTimeout":"200000", 
"Compile": {
    "Mode": "External",
    "Extensions": [ ".ts" ],
    "ExtensionsWithNoOutput": [ ".d.ts" ],
    "SourceDirectory": "../../Example.Example/",
    "OutDirectory": "../../Example.Example/"
}
}
于 2014-12-24T06:05:03.663 回答