Test-driven development (Test-driven development, TDD)--unit test--Improve code quality

Source: Internet
Author: User

!!!

1. Calculate the unit test time when estimating and making the project plan

2. Write unit test code before development

When the house is built, the workers ' master walls will first be put on the line with a stake, so that the bricks can be erected straight, because the base bricks are based on this line. TDD is like this, first write the test code, just like the worker's master first pull the line with a stake, and then code the time to use this as a benchmark, write only the function code that matches this test. And a novice or rookie of the small master, but may not know the pull, but directly to the brick to the base, the base of some later to see if straight, this time may be used a line, the amount of a good masonry wall is straight, if not directly corrected, hammering. Using the traditional software development process like this, we first encode, the code is completed before the test program, to verify that the written code is correct, if there are errors and then a little bit of modification. Do you want to start the walls and then pull the line, or hope to pull the walls first? If you like the former, then even if you like the latter, then go to the TDD camp! For more information, refer to: http://baike.baidu.com/link?url= A4rxhlo-0di92hacz-xgpbwgxrj7iec94a4ul9pjrhtuzouithb6sgdesdcgn6k6z4du-e4y_iolozai61yb_k

Http://www.cnblogs.com/xiaobaidhg/archive/2006/08/04/467748.html

Test-driven development (Test-driven development, TDD)--unit test--Improve code quality

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.