The past week, i have been working on creating tests on modules .
What is TDD ?
TDD is a practice that focuses on creating test cases before developing the actual code . While it’s a slow process to understand from the beginning , not knowing why TDD applies the reversed traditional way of testing , I am starting to grasp the principals and benefits of TDD .
Why do I think TDD is advantageous ? While it also takes a lot of effort to create a test . It also makes a project easier to maintain , especially in large projects . Instead of setting countless breakpoints and debugging in the program over and over to find a bug . Running the test may save a lot of time .
TDD also documents the code better , when using the TDD approach , instead of documenting detailed and time-consuming comments in the program , most of the documentations are already illustrated in the tests on how the code is supposed to work .
However , the TDD approach is very challenging and difficult to learn and adjust to its behaviours appropriately. It is a slow process that takes time , skills and persistence .
