Object Oriented Design for Testability
Published January 13th, 2010 Under Software Testing, Unit Testing | Leave a Comment
We design our code for performance, maintenance, simplicity, extensibility and other goals, but most of us do not think about testability as a design goal, yet verifying the correctness of our code is of great importance. What does it mean to have testable code, and what kind of trade offs does one have to think about when designing for testability. Turns out that testable code is well designed code, and it has many of the characteristics we search for such as low cohesion, separation of concerns, proper encapsulation and many others.
Story Driven Modeling with Fujaba: Turning Scenarios into Automated Tests
Published December 23rd, 2008 Under Uncategorized | Leave a Comment
Story Driven Modeling (SDM) is a systematic software development approach based on scencario analysis on model level. Usual text book approaches start with the derivation of a domain level class diagram from textual requirements specifications. This does not work. Class diagrams structure programs not your domain. Thus SDM proposes to analyse requirements with the help of usage scenarios. These scenarios are elaborated into a flip book of object diagrams that models how the runtime data of the desired application shall be organized. The Fujaba UML tool supports the modeling with such story boards and as a result it generates automatic JUnit tests that setup the modeled scenario, invoke the described functionality and compare the resulting object structure with the object diagram modeled in the initial scenario. The talk will present this approach with a live demo of the approach on a simple example.
Additional resource
Jean Louis Leroy – Object Oriented Unit Testing With PerlUnit
Published November 14th, 2008 Under Unit Testing | Leave a Comment
PerlUnit is a port of the JUnit framework written by Erick Gamma and Kent Beck. It is easy to use and based on a small set of sound, well-defined concepts. I’ll present how I use it (along with the “mixin” technique) to test Tangram.