[Webtest] [dev] source cleanup: test folder
Dierk Koenig
webtest@lists.canoo.com
Mon, 11 Oct 2004 19:02:19 +0200
Lets try to make a balance sheet for benefit/drawbacks
of a separate test folder:
Benefits
+1 Tests are of different nature than production code is.
Moving them away keeps things of same nature in the same place
(aka cohesion).
+1 Separating test from production code for deployment/packaging
is easier and more reliable than the pattern-based approach.
+2 When browsing production code only or test code only it is easier
to concentrate on that aspect only and get an overview.
Drawbacks
-1 Two identical folder structures have to be maintained.
-2 Developers are not any longer constantly reminded that there is
a test that accompanies the code. Testing awareness is likely
to drop.
-1 When browsing production code developers do not instantly see
that there is a test describing its behaviour. As a unit test
also serves as documentation, this documentation is more effort
to look at.
-1 A test class and its production class deal with the same issue.
Moving them apart is less cohesive.
-1 Test class and production class typically change together.
Moving them apart breaks the OO rule of "keeping together what
changes together".
___
Current Score: +4 -6 = -2
cheers
Mittie