mailRe: unit tests vs... the current test_suite


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Edward d'Auvergne on October 30, 2006 - 18:48:
> I would suggest to add three directories within the 'test_suite'
> directory: 'unit_tests', 'system_tests', and 'regression_tests'.

I would suggest that the unit tests are kept with their Module as it
makes it easier to check what test goes with what, avoids name clashes
and allows you to quickly check that there is one unit test per module...

I would strongly prefer a separate directory tree of files to prevent clutter. I've seen many projects take this approach where the tests are dislocated from the main tree and very much prefer the isolation. This is what I've done with the current function/system tests. If the separation ever causes the tests to get out of sync with the main tree, then these will instantly cause a failure of the test suite and hence synchronisation between different directory trees won't be an issue.


>> as a general note you ought to write the unit tests first  ;-) before
>> coding if you want to stick to the 'true philosophy' of this methodology
>>
>> so the idea is
>> 1. suggest feature
>> 2. define relevant unit tests
>> 3. code unit tests
>> 4. code feature
>> 5. check / correct / add more unit tests as needed
>
>
> Too late for most of relax ;)  Retrofitting will be difficult.


Though as Murray Rust points out not impossible ;-)

I will probably need help with this. If we can implement the unit test + function test framework, then the tests can be added when the code is combed through for the proposed redesign (I say proposed because it is still up for discussion).

Edward



Related Messages


Powered by MHonArc, Updated Tue Oct 31 05:41:40 2006