简体   繁体   English

Java方法调用/行静态

[英]Java method calls / line statics

I have different input data for a Java application. 对于Java应用程序,我有不同的输入数据。

Is there an easy way to see which methods and at best which code path are "touched" when using a certain set of input data? 使用一组特定的输入数据时,是否有一种简单的方法来查看“触摸”了哪些方法以及最好的代码路径?

Best solution would give some statics on how much of the code paths are run with that set of example data. 最佳解决方案将为使用该组示例数据运行多少代码路径提供一些静态信息。

The thing you're looking for is a Code Coverage Tool . 您正在寻找的是代码覆盖率工具 There are many available, and the major ones are listed here on Wikipedia: Java Code Coverage Tools . 有很多可用的工具,主要的工具在Wikipedia上列出: Java代码覆盖率工具

We're using EclEmma for that. 我们正在为此使用EclEmma It's a code coverage tool for Eclipse IDE. 它是Eclipse IDE的代码覆盖工具。 If you don't want to use eclipse, you can just use EMMA . 如果您不想使用eclipse,则可以使用EMMA

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

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