Applicability of test-driven development

Source: Internet
Author: User

Original article: http://www.infoq.com/cn/news/2009/11/uncle-bob-tdd-applicability



Has TDD replaced the architecture?

You cannot pass TDD
Get a complete architecture.
TDD
You can tell you some architectural decisions, but you cannot start a project without architecture design. Therefore, some pre-architecture is necessary. The most important thing is to determine which Architecture elements can be delayed or not.

Can TDD replace design?

No, you still need all design skills. You still need to understand the design principles and patterns. You should understand UML
. In addition, you should create a lightweight model for software design.

In fact, TDD

Yes
A design technology, but not a lonely design technology. All old design rules and skills still apply. TDD
They can be affected and enhanced.

Should TDD be applied to each line of code?

Some codes are not suitable for TDD
. For example,
Gui
. Of course, not just
Gui
It is just an example. The core is (
Fiddling
) Idea:

1,
You must put the code in place.

2,
You must play with some aspects to meet customer needs.

3,
If there are some new uncertainties, it must be solved through fast cycles (high iterations.

In several cases, it is not suitable for TDD only
Developed. Simply put, if you develop a product (or software module) that is highly customized for users, or a product that is a trial product, you need to solve the problem in the trial iteration, in this case, test-driven development is not suitable.

Test-driven development can improve each line of code and the probability of each decision being tested.

Highly automated test coverage increases your speed. The reason is:

First,
You don't have to spend too much time on debugging.

Second,
It will not inadvertently corrupt the code.

Third,
To some extent, test cases reflect the functions of the system.

Fourth,
Reduce maintenance costs later.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.