Test Driven Development or Test Last Development

Computer Bug,I found this on my keyboard this morning! :-)Here’s an interesting read which points to a September 2016 study which compares Test Driven Development versus Test Last Development. It said:-

The conclusion of the original study is that TDD does not affect testing effort, external software quality, and developers’ productivity when compared to TLD.

I’ve been trying to come up with ideas about why we struggle on with TDD in light of those findings. One of my colleagues said

Doing TDD ensures that you are sticking to the requirement and not essentially writing a test that assures code is always broken.

I don’t agree with this – I’d hope seasoned developers are sticking to the requirement regardless of TDD or TLD. And TDD doesn’t ensure good quality code or tests either.

TDD also ensures refactoring is done efficiently and allows complex functions to be broken down easier hence ensuring the lack of mistakes.

To me, this implies that those who don’t do TDD will always do inefficient refactoring or have complicated code paths. Regardless of testing approach, competent developers will separate the code into easily testable units.

My guess is that test driven development requires the tests to be written first, which ensures that they get written. If you use TLD then it might lead to a Project Manager trying to reduce testing to cut costs or increase delivery. I definitely believe there should be testing involved though, and they should align with the Agile Testing Pyramid. But I couldn’t honestly say whether TDD or TLD is better.

Designing and implementing stuff; recruiting, training, mentoring, managing and helping people too.

Tagged with: , , ,