Was Re: "stuff", a general request for help, now 'Ideas on correct use of PyUnit in Unit Tests'

Tres Seaver tseaver at starbase.neosoft.com
Sat May 13 13:07:29 EDT 2000


In article <391C0024.3BF9EFAD at uab.edu>, Shae Erisson  <shapr at uab.edu> wrote:
<snip>
>If you ascribe to the Extreme Programming methodology, UnitTests come
>from User Stories. User Stories are 'functional requirements' that the
>client has given you. Therefore, I think UnitTests should not test the
>code, they should test that the functional requirements are passed.

XP distinguishes between "unit tests", which programmers write to test their
code, and "functional tests", which customers write (or help write) to
ensure that the "user stories" which a development increment was supposed
to deliver are in fact present. The major point here is that *all* unit tests
*must* run without failure before any work is checked in;  functional tests
are only required to run at the "acceptance" meeting at the end of an
increment.

XP mandates that developers who find a bug (intentional plural,
see "Pair Programming") first write a new unit test which exercises / demon-
strates the bug, then fix the bug, then rerun *all* tests to verify both
that the bug was fixed and that no new bugs were introduced.  Likewise
new features:  write the test which exercises the feature, add the feature,
run all tests.

Tres.
-- 
---------------------------------------------------------------
Tres Seaver        tseaver at digicool.com     http://www.zope.org
Digital Creations



More information about the Python-list mailing list