我们正在使用通过karma测试运行器执行的茉莉花测试框架。一切都在我的本地工作正常,但在团队服务(以前的VSO)中,当我们尝试执行测试用例时,所有测试用例都成功执行但代码覆盖率即使在通过抛出以下错误启用后也是空的
PhantomJS 2.1.1 (Windows 8 0.0.0): Executed 139 of 139 SUCCESS (1.389 secs / 1.41 secs)
TOTAL: 139 SUCCESS
Finished 'test' after 1.05 min
C:\Program Files\nodejs\npm.cmd install istanbul
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14
npm WARN paalar@1.0.0 No description
npm WARN paalar@1.0.0 No repository field.
C:\Program Files\nodejs\node.exe ./node_modules/istanbul/lib/cli.js cover --report cobertura --report html -i .\src\*.ts ./node_modules/jasmine/bin/jasmine.js JASMINE_CONFIG_PATH=node_modules/jasmine/lib/examples/jasmine.json **/*specs.ts
Started
No specs found
Finished in 0.001 seconds
No coverage information was collected, exit without writing coverage information
Starting 'Publish-CodeCoverage' cmdlet...
Fetched BuildId '656'.
System.ArgumentException: File 'C:\a\1\s\coverage\cobertura-coverage.xml' does not exist or is not accessible.
at Microsoft.TeamFoundation.DistributedTask.Task.CodeCoverage.SummaryReader.ReadSummaryFile(String summaryXmlLocation)
at Microsoft.TeamFoundation.DistributedTask.Task.CodeCoverage.CoberturaSummaryReader.GetCodeCoverageSummary(String summaryXmlLocation)
at Microsoft.TeamFoundation.DistributedTask.Task.CodeCoverage.PublishCodeCoverageCmd.TryGenerateAndPublishCodeCoverageSummary()
at Microsoft.TeamFoundation.DistributedTask.Task.CodeCoverage.PublishCodeCoverageCmd.ProcessRecord()
构建代码覆盖率的定义