Test Driven Development
Post header photo

Test-Driven Development (TDD) is an iterative development cycle that emphasizes writing automated tests before writing the actual feature or function. Put another way, TDD combines building and testing. This process not only helps ensure correctness of the code - but also helps to indirectly evolve the design and architecture of the project at hand. TDD usually follows the "Red-Green-Refactor" cycle, as shown in the image above: Write a test Run the test (it should fail) Write just enough code for the test to pass Refactor code and retest, again and again (if necessary)