Test Driven Development (TDD) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

Test Driven Development (TDD)

Hi guys! I wanted to make a topic about your ideas of changing your way of coding to the TDD principles. For the ones who don’t know what this is: Test Driven Development consists -in a few words- of, given a use case, create first of all the test to fulfill the case’s objective, and based on that, create the code, which would be from the very beginning a very solid piece of code, as we are creating from a test structure, not an use case idea directly. What do you think about this idea? Worth the shot?

18th Feb 2018, 11:25 PM
Pedro Solís García
Pedro Solís García - avatar
1 Answer
+ 6
TDD is in my opinion, very beneficial. How often do you code for the perfect path. After all your designs are intuitive and you will always get the input you expect, right? WRONG. Writing a test before you write code means you think of ways for the code to fulfill the intended purpose, but also handle unintended input or unintended integration failures (500 Internal Server errors, security, etc. )
19th Feb 2018, 3:51 AM
SQrL
SQrL - avatar