Sunday, October 26, 2008

The future of software testing

I have been reading JW on Test since I learned James Whittaker started to blog. In his post titled "the future of software testing (part 8)", he states that "test code should ship with the binary". That is an interesting concept and directly relates to the idea I've been working on which I call "On Demand Regression Testing". Shipping test code would be fine for new code but what about legacy code?

Recently, at the IWST I heard a very interesting quote in a presentation given by Anthony Panozzo on Test Driven Development. The quote is from Michael Feather's book "Working Effectively with Legacy Code". It basically states that legacy code is code without tests. I would say that legacy code is code without tests and/or documentation but that is essentially the same.

In my current position I deal mainly with legacy code. That is code written over a period of decades with little documentation and certainly no tests. Sure it was tested when originally installed but those tests were not kept as a corporate asset and now they are gone.

To achieve the goal of regression testing this type of code, we started with a functional decomposition of the particular function we are testing. Then we look at the inputs, process, and outputs within the function. We create a logic table for the inputs and also examine any interfaces that the function may depend. While we are doing this software engineering analysis, we try to understand the business process and types of users involved. We document our findings and publish them along with our tests that generally run on an automated basis.

The main roadblock behind "on Demand Regression Testing" is the data. If we can find a way to either create data based on certain characteristics and use them in our automated suite, then we would be much further along. Then we would be able to wrap our application with tests rather than embed them within our code, since we don't have the skills nor does the organization have the will to do that, at least for now.

2 comments:

Sunil said...

great.thanks for the stuff

Unknown said...

This is very useful information.Thank you for sharing this information..