The primary goal of any software that we create at Fonseka Innovations is to solve business problems. On the other hand, the secondary goal is the ease of use of the systems that we create, their stability and performance. To achieve these goals, we embraced test driven development (TDD) approach to ensure that the software we produce and deploy to production is stable, high quality, and works as expected. Most importantly, TDD approach is the reason we are able to let businesses rely on our software to solve their problems, not create more of them.

Child experimenting with test driven development
Type caption (optional)

What is Test Driven Development?

“Test driven development (TDD), is an evolutionary approach to development which emphasizes test-first development. Here you write a test before you write just enough production code to fulfill that test and then go on to refactor the production code. The primary goal of TDD is specification and not validation” (Martin, Newkirk, and Kess 2003).

Basically, before any production application code is written for any specific feature, a test is written for it first. So, this allows us to test and ensure that every different scenario involving the feature in question is guaranteed to work as expected, handle all errors, handle all and any user input and interaction with outside world without breaking.

A short video to help you understand how TDD is used in practice.

Why do we embrace it?

The reason behind our active use of TDD approach is that it keeps the application code-base clean and reliable. Above all, it allows us to add new features, improvements and bug fixes knowing that nothing else got broken.

As you imagine, applications can grow and they do so quickly. So, it is imperative to ensure that the application remains stable and healthy throughout its life cycle. And this can only be done well using the TDD approach.

What does it mean for our customers?

The biggest benefit to our customers is peace of mind that their application is stable. In other words, does not crash or show unknown errors. We’ve all see these messages at some point:

"The operation completed successfully" error message
"An error occured while displaying the previous error" error message

TDD approach is what allows us to prevent situations like above and provide applications that fast, reliable, tested and mostly importantly solve our customers’ business problems and satisfy the needs.

Where can you learn TDD?

Adam Wathan has created a great, in-depth online course where you can watch and learn how to develop Laravel applications with TDD. For instance, you will learn about topics on:

  • Organising your test suite
  • Feature tests vs. unit tests
  • Writing your own testing doubles from scratch
  • Along with a large amount of relevant and useful topics.

Check it out here: https://course.testdrivenlaravel.com/

About the author

Leave a Reply