首页 文章

如何将代码覆盖率结果发布回TFS 2013

提问于
浏览
1

Scenario:

我们正在尝试在我们的TFS中启用代码覆盖,到目前为止,构建摘要结果已成功显示覆盖的代码块,如下图所示,但问题是每次我们单击 Coverage Results link(图中箭头向下)它没有显示已覆盖的内容的详细信息,并在浏览器中显示错误,即使测试结果In / Out文件夹在构建服务器中也有代码覆盖文件 .

Setup:

enter image description here

MSTest Settings (Local.testsetting)

enter image description here

Test Run

enter image description here

Build Definition
enter image description here

Test Results
enter image description here

Build Summary:

enter image description here

After clicking Coverage Results:
enter image description here

Question : 为什么构建摘要中的TFS 2013项目集合 Coverage Results link (红色箭头向下)不显示已覆盖的内容的代码覆盖率详细信息,即使在构建服务器TFS 2010中生成了代码覆盖率文件?我们在设置中错过了什么才能实现?

1 回答

  • 1

    你需要
    1) . 打开构建定义,转到 Process - > 3.Test - > Automated Test - >在 Add/Edit Test Run 对话框中,将 Options 设置为“ Enable Code Coverage ” .
    2) . 在构建定义中选择.testsettings文件 .

    enter image description here

    你也可以查看Ralph Jansen在这个问题上的回复TFS 2013 - No Code Coverage Results

    此外,还可以检查您是否在Web门户中打开此代码覆盖率链接 .


    Update

    添加相关的截图

    enter image description here

相关问题