Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
<a href="http://emma.sourceforge.net" target="_blank" rel="nofollow">EMMA</a>: an open-source code coverage toolkit
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
----------------<br />SCJP, SCWCD
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Originally posted by Pradeep Bhat:
Lasse, What is your opnion on using JProbe for code coverage?
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by matt or:
Could anyone so me what the basic block is.
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Originally posted by matt or:
How can I collect the percentage of basic block coverage??
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
My article (the original topic of this thread...) describes how to automate code coverage reporting by integrating it into your Ant build script using three different products (two of which are open source).Originally posted by matt or:
How can I automatic this process? any technique should be used?
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
<a href="http://emma.sourceforge.net" target="_blank" rel="nofollow">EMMA</a>: an open-source code coverage toolkit
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
JCoverage failed if I specified too many classes to be instrumented -- seemingly due to Windows command-line limits. That was a bummer. Another problem is that it complains about inner classes not being compiled w/debug though they are.
Originally posted by Lasse Koskela:
Looking good. Vlad, will we see those nice green and red bars in EMMA soon?
<a href="http://emma.sourceforge.net" target="_blank" rel="nofollow">EMMA</a>: an open-source code coverage toolkit
Originally posted by Vlad Roubtsov:
Clearly, "green and red bars" are the most important feature in a coverage tool
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Originally posted by Lasse Koskela:
Of course not. Everyone knows they're only the second most important feature in a coverage tool
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Originally posted by Lasse Koskela:
Right after Ant support
<a href="http://emma.sourceforge.net" target="_blank" rel="nofollow">EMMA</a>: an open-source code coverage toolkit
Most of the popular code coverage tools don't care about whether the code is executed by a set of JUnit tests or by a user manually launching the application and doing whatever he wishes. The key is that the code coverage tool has injected necessary logging statements into your .class files so that when that particular code is executed, the event is logged into a log file.Originally posted by Prashant Jain:
Now I need to integrate this program with a tool which allows me to measure the code coverage. Most of the code coverage tools drive JUnits it seems.
I read the documentation of EMMA and I know I can use it in my scenario.Are there any other options as well that I could consider?
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Cheers, Sathya Srinivasan - SCJP 1.2, SCWCD 1.2, SCMAD 1.0
Co-Author of Whizlabs SCMAD Certification Exam Simulator and SCMAD Exam Guide Book
Originally posted by Bryan Long:
With Emma or any of the other coverage tools, do the ant tasks provide any mechansim to have the build fail if a certain coverage level is not met? From the doc on emma, it looks like you can specify failure metrics but they only apply to the generated report.
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]