On Jan 24, 2007, at 1:01 AM, Yonik Seeley (JIRA) wrote:
Yonik Seeley commented on SOLR-104:
-----------------------------------
Oh, and where possible, it would be nice to have some unit tests.
Yes, please! Lots and lots of unit tests :)
I'm really enamored by code coverage analysis to point to where there
is a deficiency in unit tests.
For Java Lucene, we have nightly Clover reports:
<http://lucene.apache.org/java/docs/clover/index.html>
Let's get that set up for Solr too.
[solrb note: we're using rcov and currently have 100% code
coverage from the unit/functional test suite, and that includes
firing up an actual Solr instance to test the few bits of code that
cannot easily be tested otherwise]
Servlet related stuff is probably too hard, but things like
stream.body should be easy.
It is harder to test things that rely on a container, but there are
many techniques to make it easier with mocks, or for real using
Cactus. If we can get some code coverage running and see where the
gaps are, we can focus our attention on those areas and get coverage
somehow.
Erik