Hi List,

a while back we briefly discussed
(http://lists.amdatu.org/pipermail/amdatu-developers/2010-October/000025.html)
the need for unit/integration testing and coverage measurement. At
this point we have a (kind of shaky) pax itest suite without coverage
measurement, about 26755 loc covered by no more then 52 junit test and
no policy/guidelines on the matter. This deeply concerns me and after
doing some refactorring on code not under junit test for AMDATU-263 I
thought it time to reopen this discussion and at least come to a
documented consensus/guideline.

Not going to re-itterate on the rationale for unit testing or the
difference in purpose, scope and applicability between unit and
integration testing. I think unit testing is good (to an extend) for
the numerous reasons documented all around the web and is especially
valuable to a fine grained component/service model such as ours where
any particular integration most probably only tests a subset of the
lower level use cases of a unit. At the sometime you can allready
observe how heavy the itest suite is becoming and I think it is
unreasonble for a developer to have to rely on executing it fully each
dev cycle to convince him/herselve that a local refactor does not
violate the basic contract of the unit. Even now when it is still
possible to do it on a local machine which may very well may change at
some point due to external integrations (cloud / Iaas / etc).

Therefore I'd like to propose that we complement our guidelines with a
'unit test unless' policy. it should roughly say that all (business)
code must have a reasonable degree of coverage, eg 75% and IMHO even
basic service lifecycle (but I may be overplaying my hand here). It's
easy, its light weight, its invaluable (literaly) on a large
codebase... its common sense! I know there are some different opinions
on the matter but I'd like to here them all, discuss them and come to
a policy because if we do not implement a guideline now we will never
be able go back and deal with it for these rest of the codebase
lifecycle.

WDYT
Bram

Reply via email to