nutch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jérôme Charron" <jerome.char...@gmail.com>
Subject Re: Add ".settings" to svn:ignore on root Nutch folder?
Date Fri, 07 Apr 2006 21:31:14 GMT
> An end-to-end unit test would help coverage a lot: something that
> performs a simple crawl and runs queries against it.  Ideally this would
> start an in-process web server serving test content, crawl that content,
> then start a web server serving queries.  This could be run in both
> local and pseudo-distributed mode.

I agree this kind of functional tests are needed.
But having a lot of unit tests on basis classes has a lot of advantages:
1. If limit cases (null params, and so on) are tested it provides a kind of
specification.
So if a developper changes such limit cases then unit tests fails, and we
immediatly know that we are not backward compatible.
2. Finding class level bugs is really more easy with unit tests rather than
with functional tests (it is really painful to find a bug in a low level
class such as StringUtil with functional tests, whereas it can be quickly
checked by a good unitary test)
In other words the most code is covered by unit tests, the more it is easy
to find problems that occurs during functional tests.

But sure, some tests that requires a lot of contextual objects are not easy
to implement and functional tests are the solution.
(we can perhaps plan to integrate such tests for 1.0)

Jérôme

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message