Reality-Loop

ATDD for rewriting a legacy application

May 25, 2010 | 1 Minute Read
This post was originally posted on my old blog.

71497pacman.gif In my recent interview with Gojko for his upcoming book, I mentioned that I was not sure if the process of specification by example that is promoted by ATDD makes sense in the case of rewriting a legacy application.

In this scenario the reference/acceptance criterias are definied by the existing application. Reverse engineering into plain-text examples does not necessary provide enough value in my opinion.
In my opinion in this scenario it can be more efficient to just write high level user stories and reference the legacy application for the acceptance criterias.

Of course if access to the legacy application is not easily given for every developer or if the provided instance of the legacy application does not illustrate all behavior (for instance because the test-dataset is not representative), then specifying behavior with examples gets more attractive again.

Gojko mentioned also an interesting approach by Lisa Crispin. She promoted to write tests first against the old application and then use those tests as examples for driving the implementation of the new application.

I came across this approach before (probably in Agile Testing) but I never considered it for my projects.
I am wondering how applicable this approach is. Do you automate the tests also against the old application? Probably writing scenarios in plaintext would be enough. Automation does only make sense for the new application.