简体   繁体   English

是否可以找出由 TFS 上的选定个人签入的变更集的单元测试代码覆盖率?

[英]Is it possible to find out unit test code coverage for changesets checked in by select individuals on TFS?

I am trying to monitor the unit test code coverage of code checked in by certain individuals in the team.我正在尝试监视团队中某些人签入的代码的单元测试代码覆盖率。 Is this possible through TFS?这可以通过 TFS 实现吗?

A workaround would be to check code coverage of the build before that particular changeset and after the changeset, given that your build definition has code coverage enabled.解决方法是在特定变更集之前和变更集之后检查构建的代码覆盖率,前提是您的构建定义启用了代码覆盖率。 That way you will be able to see if overall code coverage has improved or not.这样你就可以看到整体代码覆盖率是否有所提高。

Seems you want to know if changed code has been covered by tests of a specific changeset.似乎您想知道更改的代码是否已被特定变更集的测试覆盖。

Unfortunately, there's no out of the box functionality from TFS or Visual Studio to get what you want.不幸的是,TFS 或 Visual Studio 没有开箱即用的功能来获得您想要的。 The code coverage reports and analysis in Visual Studio and TFS don't take into consideration what code has changed--they only tell you about code coverage for the entire project or solution. Visual Studio 和 TFS 中的代码覆盖率报告和分析不考虑哪些代码发生了变化——它们只告诉你整个项目或解决方案的代码覆盖率。

There is a Code Churn and Code Coverage perspectives from the TFS data warehouse. TFS 数据仓库有代码搅动和代码覆盖的观点 However, it also won't help much.但是,它也无济于事。 As the code churn perspective only tracks lines of code that changed , not including which methods or spelling were changed.由于代码搅动透视图仅跟踪更改的代码行,不包括更改了哪些方法或拼写。

If you really need this feature, you may ask a feature request in uservoice , TFS Admin will kindly review it.如果你真的需要这个功能,你可以在uservoice 中提出一个功能请求,TFS Admin 会友好地审查它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM