Posts

Showing posts from August, 2019

Test Driven Developmen (TDD): What is it?

Recently my current company gave us a training on Test Driven Development (TDD). So today lets see what's TDD and how is it different from our everyday programming. Test Driven Development is a way of developing programs where you focus on the testing aspect of the code and write unit tests and code together. How this is different from your day-to-day coding is that we write all code at once. Then we either before or after write the unit tests. Then we unit test the code. And then we find bugs and we fix them. In TDD, we write tests and then we write code to make that test pass. Once we have gone through all the tests, and written all the code to satisfy the tests, you are done. So the advantages: 1. All code is unit tested. 2. Since we are writing only as much code to satisfy unit tests, code bloat should be less. 3. Since we are thinking only enough requirements for testing current tests, code should be cleaner. 4. Since we are coding, testing and debugging in one go, time should...