如何从Junit测试中获取被调用的依赖。

huangapple go评论78阅读模式
英文:

How to get dependency called from Junit test

问题

获取每个 Junit 测试方法(@Test 方法)调用的方法级依赖列表的方法,换句话说,我想知道每个 Junit 测试中使用的方法列表。如果您知道任何相关工具,我将不胜感激。

英文:

For my project, I would like to know how to get list of method-level dependency called from each Junit test method(@Test method). In other words, I would like to know list of method used in each Junit test. I would appreciate if you let me know any tools for it.

答案1

得分: 0

看起来你想要一个以方法为导向的覆盖报告。

我认为没有工具能够完全满足你的需求。但是,你可以使用像JaCoCo这样的工具,独立运行测试(这可能需要一些时间),然后你可能能够分析结果并获取调用方法的列表。

英文:

It looks like you'd like to have a method oriented coverage report.

I don't think there is any tool that does exactly what you need. But using a tool such as JaCoCo and running tests independently (which will take a while) you might be able to analyze results and get a list of called methods.

huangapple
  • 本文由 发表于 2020年8月3日 03:52:08
  • 转载请务必保留本文链接:https://go.coder-hub.com/63220396.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定