Ebdon.Net

Unit Testing

Front Page | Recent Changes | Title Index | Amateur Radio | Software Development
» Find Page » Worked All Britain » Front Page » Watson W7900 » Unit Testing
There are some very good unit testing packages available. For C++ my preferred choice is the Boost Test Library.

But for any of the unit testing packages to work we have to ensure that the software is testable. (Or levelisable, as John Lakos would call it). This is much easier to do with new code than with an existing code-base that was not written with testability in mind. Dependencies between components can prevent each one from being separately tested. I favour hierarchically testing components, so a simple and clean (acyclic) dependency graph is the ideal starting point. Note that by component I mean a coherent unit of code, e.g. a class or cluster of classes, not necessarily a programme or COM component. There's a clear parallel between loose coupling and testability - which is a bonus, as loose coupling also promotes extensibility and maintainability.

Terry Ebdon, December 2002

|

 File under: Category Software Development.

Front Page | Recent Changes | Title Index | Amateur Radio | Software Development
Print this page
Find page by browsing, searching or an index
Edited March 7, 2005


Copyright (c) Terry Ebdon, all rights reserved.
Valid XHTML 1.0!Valid CSS![Valid RSS]