Test-Driven Development's Essentials - Explained by Diagrams

Test-Driven Development's Essentials - Explained by Diagrams


Test-Driven Development Approach how it differs from the Traditional?Approach that we all used to use it. What is the problem with the traditional one??

The problem is the huge mess that happens between two layers of making the feature's code

1st layer: when you are asked for a feature or program, so you make its logic code and its unit tests to make sure it achieves its feature. 2nd layer: when you try to test the feature's code that we made?(unit tests) with some different test cases and it fails so you return back to refactor the code's logic and test it again.


A unit test is simply a test that covers a small portion of logic?


A huge cost of time we can reduce by just changing the mindset. To make the Test to drive the development, Yea it's in reverses with the traditional approach which development drives the test?

So, instead of writing your code first and then retroactively fitting a test to validate the piece of code you just wrote, test-driven development dictates that you write the test first and then implement code changes until your code passes the test you already wrote.


Some Diagrams explain it well

No alt text provided for this image
No alt text provided for this image


No alt text provided for this image


Some Talks about TDD from Experts

Introduction to TDD by Ahmed Misbah



Some Helpful Articles with Examples for more practice



要查看或添加评论,请登录

Omar Essam ElDin的更多文章