|
[
Permlink
| « Hide
]
Michael Busch added a comment - 21/Nov/06 07:00 AM
The patch described above.
I attach a code coverage report of the current HEAD (revision: 477535), so people can check out how a report looks like.
The current code coverage looks not bad: 77% of the code lines are being tested by our unit tests. However, the coverage is not perfect: e. g. the PorterStemmer or IndexWriter.addIndexes(IndexReader[]) are not tested at all. Nice. I think we can't include EMMA jars int he repository, though, so you'll want to add the ability to download the Jar on the fly, just like Grant did it for the benchmark stuff.
Good idea, I could do that. But currently we don't fetch the JUnit jars either, just give a hint where to download them in case they cannot be found in the ant classpath. I did the same with the EMMA jars. Should we do it for both (JUnit and EMMA), just for EMMA or leave it like it is for now?
Sounds like my previous comment was off - if we don't distribute EMMA jars and just require the person to have them, what you have will do. How about the nightly build, if we include this on the site? I'm not familiar with it enough to comment. Yonik and Doug will know if/how things can be set up there with EMMA jars, should we include this on the site.
Care to update this for Clover, Michael? Then I can hook it into the site and the nightly builds.
Thanks, Sure Grant, I will update the patch soon to use clover instead of EMMA. Great that you will add it to the website!
Thanks, Here it is, Grant. This new patch uses Clover to generate code coverage reports. Simply add clover.jar to the ant classpath, do a "clean" and run the target "test". During compiling Clover will automatically instrument all classes under src/java.
After the junit tests are done, execute the new target "generate-clover-reports". Clover will generate the html report in build/test/clover/reports. Note: If clover.jar can not be found in the ant classpath then "test" will simply print an info message, saying that code coverage reports are disabled, and exeute the junit tests like it did before this patch. I'm not familiar w/ clover, but here's what I did, when trying out your patch (which works):
1. applied the patch Is there anyway to turn off clover other than removing the jar? It seems like it takes quite a bit longer to run the tests and I was thinking I may just want to enable it when running nightly, but that most people wouldn't want it on by default even though they may have clover in there ANT lib. Otherwise, the patch looks good and I will commit it once we figure out whether being able to turn it off is important to people and how to do it. OK, I committed this, with a minor change so that it is off by default (thanks Erik, for the ANT info).
To run, you need three things: Thanks, Micheal. I will incorporate this into the nightly build per http://issues.apache.org/jira/browse/LUCENE-708 Committed the change. Linked to the reports from the Resources -> Developers page on the documentation. Current report was generated on 12/16/06. Once Lucene 708 is resolved, these reports will be updated nightly.
Thanks Michael! |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||