DEV Community

Gahyun Son
Gahyun Son

Posted on

Reflection on Using TDD (Test Driven Development)

When creating an API, if the input and output are not clearly defined, confusion can arise during the development process. This is why writing an API document is important, and I believe TDD is a technical version of the document.

At first, I questioned why we needed to write unit tests when the API documentation was already available. However, after applying TDD, I realized how effective this approach is.

Development is the process of building a system based on the plans we've created. Through TDD, I realized that it allows us to implement features more efficiently by sticking to the structure of the plan. Rather than developing all features first and then running tests to fix errors, writing tests upfront and addressing errors one by one as we develop the features saves both time and addressing errors one by one as we develop the features saves both time and energy.

  1. Develop API -> Test -> Find Error! -> Fix -> ...
  2. Test -> Find Error!(no API, no model... things haven't been developed yet...) -> Fix it(create Model, API...install...) -> ...

I think TDD is a technique for minimizing mistakes and staying on track throughout the development process.

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more