Quality First! –Test Driven Development (TDD)
By Shan Bhide
With a focus on offering robust, reliable and scalable enterprise software solutions for our customer’s long-term care pharmacy needs, SoftWriters is organizing multiple special initiatives targeted on “Quality First!”. By adopting the right technology and supporting it with best practices and ensuring that everyone has a Quality First mindset, we are committed to deliver higher levels of customer satisfaction and retention.
In a continuous effort to put Quality first in everything that we do, SoftWriters' development team is turning traditional coding process upside down by implementing test-driven development.
Test-driven development (TDD) refers to a style of programming where requirements, coding, testing, and design are tightly interwoven.
TDD is aimed at reducing errors and improving flexibility when designing software applications.
It is a process that encourages a quick, rapid, and fearless testing development style. This approach to programming enables tests to drive the design of the whole system.
The goal of this approach is to first write a unit test(s) before any production code is started. The aim is to develop the system (and high-quality code) gradually through an ongoing sequence of tiny test improvements.
This approach is also referred to as “red, green, and refactor” method. Write a small failing test (red), and then help it to pass by writing good production code (green). Then, the final step is to rewrite the code (refactor) before it is possible to restart or continue the process.
Well defined, scoped out and estimated requirements for new features are used to create the specific test cases. Developers write just enough code to make that test pass, keeping it as simple as possible. Tests are updated as the feature grows.
The continuous feedback loop between Requirements, Tests and active code results in a software that is directly aligned with customer requirements and is testable to prove it.
This is opposed to the traditional software development approach where coding is completed before even considering the test cases, resulting in a feature that may not fully address user expectations.
Advantages of TDD:
- Better quality and lower error rate in the software
- Improved coding efficiency
- Better Performance and scalability of application
- Early detection and correction of undesired behavior in the software
- Test Automation is built-in into the software development phase. Resulting cost optimization
- Easy to extend and scale up new features due to testability of legacy features
- Improved user/customer satisfaction
Shan Bhide is the Vice President of Technology at SoftWriters, a Pittsburgh-based company that offers pharmacy management software solutions to pharmacies serving the long-term care community. As a passionate change promoter and thought leader in technology, Shan has more than 20 years of experience delivering successful software products and solutions in enterprise space to a broad range of customers.