- C# and .NET Core Test Driven Development
- Ayobami Adewole
- 252字
- 2021-06-25 22:00:29
Benefits of TDD
TDD, when done correctly and appropriately, can give a good return on investment as it facilitates the development of self-testing code, which yields robust software applications with fewer or no bugs. This is because most of the bugs and issues that might appear in production would have been caught and fixed during the development stage.
Documenting the source code is a good coding practice, but in addition to source code documentation, tests are miniature documentations of the source code as they serve as a quick way to understand how a piece of code works. The test will show the expected input together with the expected output or outcomes. The structure of an application can be easily understood from the tests, as there will be tests for all the objects as well as tests for the methods of the objects, showing their usage.
Practicing TDD correctly and continuously helps you to write elegant code with good abstraction, flexible design, and architecture. This is true because, to effectively test all parts of an application, the various dependencies need to be broken down into components that can be tested in isolation and later tested when integrated.
What makes a code clean is when the code has been written using best industry standards, can be easily maintained, is readable, and has tests written to validate its consistent behavior appropriately . This indicates that a code without testing is a bad code as there is no specific way of directly verifying its integrity.
- 深入理解Android(卷I)
- 程序員面試白皮書
- Python自然語言處理實(shí)戰(zhàn):核心技術(shù)與算法
- PHP 7底層設(shè)計與源碼實(shí)現(xiàn)
- 機(jī)器人Python青少年編程開發(fā)實(shí)例
- 老“碼”識途
- Android程序設(shè)計基礎(chǔ)
- 蘋果的產(chǎn)品設(shè)計之道:創(chuàng)建優(yōu)秀產(chǎn)品、服務(wù)和用戶體驗(yàn)的七個原則
- Java Web開發(fā)就該這樣學(xué)
- 基于ARM Cortex-M4F內(nèi)核的MSP432 MCU開發(fā)實(shí)踐
- Android應(yīng)用開發(fā)實(shí)戰(zhàn)
- OpenCV 3計算機(jī)視覺:Python語言實(shí)現(xiàn)(原書第2版)
- 零基礎(chǔ)學(xué)HTML+CSS第2版
- Android系統(tǒng)下Java編程詳解
- 算法圖解