Agile Portugal 2010. June 25-26

Tutorial: Peter Sommerlad

CUTE GUTs for GOOD – Good Unit Tests drive Good OO Design

Peter Sommerlad, IFS Institute for Software — HSR Rapperswil
Saturday, Jun 26, 11:00 – 12:30 @ B 003

While Java and .NET tend to have good tools fostering unit testing all code, C++ developers often lack the ability to unit test and refactor their code under development. At IFS we are extending Eclipse CDT with support for unit testing with the CUTE plug-in (C++ Unit Testing Easier) and several C++ refactorings we implemented. This talk shows how to unit test with CUTE and how design improvements are driven by unit tests. It also shows how the attempt to unit test code exposes deficiencies in its design well before other uses are showing these. Especially close coupling and lack of cohesion is easily discovered and thus triggers refactoring the code. While the tools uses are for C++, the underlying concepts also apply to other languages as Java and the .NET familiy of languages. The session will incorporate audience interaction by actively creating unit tests and refactoring and extendingexample code by the presenter under the audience’s guidance.