Test Driven Development (TDD)
Expert Advice from Tech Elevator Instructor, Katie Dwyer
Read along with Tech Elevator Instructor, Katie Dwyer, as she illustrates the meaning of “Test Driven Development” and the role that it plays in Software Development.
Definition: Test Drives Development (seems obvious, right?).
Let’s take a closer look.
What does that actually mean? All development is only done when you need it, or Just In Time (JIT) and only to pass a specific unit test.
More formally, TDD is a development methodology where developers write a feature test that initially fails before writing production code that implements the feature.
Refactoring: Modifications to the code intended to improve the structure or design without changing functionality.
Cons of writing code first before unit tests:
- Biased results (you look at code there and then write tests for those cases)
- If you run out of time unit tests are skipped
- Likely to ignore or miss some of the tests
A few benefits of utilizing TDD:
- Program for specific conditions
- Baby steps toward solving a problem, incrementally adding code
- Refactor with new patterns
- Previous tests hold value with new modifications
Interested in a deeper dive to TDD? Check out these other helpful links: