Reverse test coverage [closed]

夙愿已清 提交于 2021-01-29 05:40:33

问题


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.

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

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


回答1:


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.



来源:https://stackoverflow.com/questions/16346224/reverse-test-coverage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!