The method of construction read Note 02

Source: Internet
Author: User

recently read the second chapter of the building method of personal skills and processes, teachers often remind us of the importance of unit testing in class , after reading the construction of the law of the book also recognized the importance of unit testing, a project must be a few people to the division of labor, then the different work is dependent on each other, in order to ensure the quality of the module, then unit testing is a very effective solution.

There are a few homework our teacher asked us to develop a small program to write unit tests, many people's unit test unqualified, or invalid test, a good unit test, should be able to accurately and quickly ensure the correctness of the basic module, the future development of the project must learn the correct unit testing, The standard for good unit testing:

A, unit test should be in the most basic functions, parameters to verify the correctness of the program.

B, unit testing must be written by the person most familiar with the code, in order to more comprehensive testing.

C, after the unit test, the machine state remains unchanged.

D, unit tests should produce repeatable, consistent results.

E, unit tests should overwrite all code paths.

F, unit tests should be integrated into the framework of automated tests.

G, unit tests must be saved and maintained together with the product code.

The method of construction read Note 02

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.