Is there a Java code coverage tool that records the number of calls to strings and methods?

Hope the title describes what I need. The closest I found, Cobertura , it looks like it will record the number of times that a given line of code is called, but I did not find anything in everything to calculate how often the method is called.

+5
source share
6 answers

Plugins are available if you are using an IDE, such as eclipse. Check this: - http://www.eclipse.org/articles/Article-TPTP-Profiling-Tool/tptpProfilingArticle.html

+1
source

Eclipse - , , , , .

+1
+1

VisualVM ( Sun/Oracle JDK) .

" " :

( ), .

+1

, .

0

Our Java (Counting) Profiler comes close to what the OP wants.

It counts the entries in each base unit in Java code; this includes method entry points and any auxiliary blocks for controlling operators (if, while, try, ...). This provides the same effective result as counting the execution of individual "lines" (not sure what this means in the Java program, but we will let it go) with significantly less overhead.

Account data can be processed as coverage data; nonzero means covered.

0
source

All Articles