反向测试范围 [英] Reverse test coverage

查看:62
本文介绍了反向测试范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找自动执行以下任务的方法.

I am looking for the way to automate the following task.

给出覆盖率报告,找出哪些测试覆盖了特定的方法/功能.如果可以指定特定的类和行号,那就更好了.

Given the coverage report, find out which tests cover particular method / function. Even better if I can specify specific class and line number.

运行时间不是很紧要,只要可以在几个小时内完成即可.我正在考虑一个接一个地运行每个测试,并将覆盖率记录收集到数据库中.只是徘徊,如果那里有人遇到类似的问题并有现成的解决方案.

The running time is not very imoprtant as long as it could be done within few hours. I am thinking of running each test one by one and collecting the coverage records in a database. Just wandering if there is someone out there who faced a similar problem and has a ready made solution.

我们的项目是中等大小,大约有100个单元测试用例.

Our project is medium sized with about 100 unit test cases.

P.S.为了阐明我们的项目是基于Java的,但我也希望了解这方面的其他平台.

P.S. To clarify our project is Java based, but I am also looking to see what other platforms have in this regard.

推荐答案

OpenCover (.NET代码覆盖率)已经为MSTest,NUnit和xUnit支持此功能(可以添加其他测试框架).运行时间仅比正常运行时间长一点.

OpenCover (.NET Code Coverage) already supports this feature for MSTest, NUnit and xUnit (other test frameworks can be added). Running time is only fractionally longer than running normally.

这篇关于反向测试范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆