My Take on TDD

Just a TDD meme

What is Test-Driven Development?

  1. RED, in this phase, we create a test code for the implementation that will handle every possible scenario that could happen. We can also code the mock objects that are required for the testing in this phase.
  2. GREEN, in this phase, we create the implementation code that will pass the test created before.
  3. REFACTOR, after the implementation has passed the test, we can restructure the implementation to make it cleaner, more optimized, or more maintainable but still doesn’t break the correct logic.
https://content.codecademy.com/programs/tdd-js/articles/red-green-refactor-tdd.png

Rethinking About The Test Metric

TDD is Investment in Software Development

How I Use Test Driven Development in Software Engineering Project

RED

GREEN

GetByID implementation

REFACTOR

this really sparks joy
It’s important to do refactoring as soon as possible unless your code is already clean

Final Words

References

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store