Home » Questions » Computers [ Ask a new question ]

How to get started writing a code coverage tool? [closed]

How to get started writing a code coverage tool? [closed]

"Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.












Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed last year.





Improve this question





Looking for books or other references that discuss actually how to write a code coverage tool in Java; some of the various techniques or tricks - source vs. byte code instrumentation.

This is for a scripting language that generates Java byte code under the hood."

Asked by: Guest | Views: 393
Total answers/comments: 3
Guest [Entry]

You can also get the source from a Open Source code coverage tool and learn from it.
Guest [Entry]

Thxm, Mc! http://asm.objectweb.org/ is another one. Excellent documentation on byte code instrumentation, but nothing "directly" aimed at writing a coverage tool - just some hints or ideas.
Guest [Entry]

You might also want to use something like BCEL to analyse which lines of source actually exist in the byte-code. You don't want to report that things like blank lines and comments haven't been covered.