What is Test-Driven-Development?
Test-driven development (TDD) is a software development process relying on software requirements being converted to test cases before software is fully developed, and tracking all software development by repeatedly testing the software against all test cases. This is as opposed to software being developed first and test cases created later.
To put it simply, TDD promotes a test-then-code approach, where the business needs are translated into test suits against which we’ll write our code. It is an extremely effective way of translating the business needs into a working product, although there are some cons as well.
Benefits of a TDD Aproach:
- Reduce Bugs (As with testing in general)
- Simplify code-base
- Able to provide quick feedback
- Up-to-date documentation
- Simple & Elegant solutions
Cons of a TDD Approach:
- Possible integration issues
- Slow development cycle
- Solution-centered tests will need more maintenance and refactoring further down the line when requirements change
With these pros and cons in mind, let’s see if a TDD approach is actually the right approach for your application.