Importance of Unit Testing

Source: Internet
Author: User

Importance of Unit Testing

Author: Vince

Unit testing is the basis of software testing. Therefore, the effectiveness of unit testing will directly affect the software's subsequent testing, and ultimately affect the product quality to a large extent. The importance of unit testing can be seen from the following aspects. I. Time: If the unit test is carefully completed, the system integration debugging will be smooth, saving a lot of time, on the contrary, if you do not perform a unit test or just perform a unit test for time, you will always encounter problems that should have been discovered in the unit test, this kind of problem is often difficult for developers to predict during integration. In the end, it is hard to find out that this is a very low-level error and it has wasted a lot of time in remorse, such a waste of time is not worth it. Ii. Test results: Based on previous test experience, the unit test results are very obvious. First, it is the basis of the test phase and the unit test is completed, the integration test and system test performed smoothly later. Secondly, some deep-seated problems can be found in the unit test process, and some problems that are easy to find and are difficult to find in the integration test and system test. The focus of unit testing is also special. It not only proves what the code has done, but also how the code is done, whether or not it has done what it should do without doing what it should have done. Iii. Test cost: some problems are easily discovered during unit testing. If problems are found in Later testing, the cost will increase in multiples. For example, it takes one hour to find a problem during unit testing, it takes two hours to find the problem during integration testing, and three hours to find the problem during system testing, in the same way, the cost for locating and solving problems also increases exponentially. This is one of the factors we need to eliminate as many bugs as possible to reduce the cost in the future. 4. Product quality: the good and bad unit tests directly affect the product quality. A small error in the Code may lead to a reduction in the quality of the entire product, or cause more serious consequences. We can avoid unit testing. To sum up, unit testing is the cornerstone of building product quality. We should not waste too much time in the future because we save unit testing time and do not do unit testing or do it casually, we do not want to develop the entire product because of saving those time!

Welcome to repost this article, reprinted please indicate the source of the article: Vince Testing Technology Research Center http://blog.csdn.net/vincetest I like the site: sina Google News Sohu news Yahoo Tianji csdn news csdn Blog B weekly blog center donews blog SourceForge else it carefree test VC online co-creation of the Alliance's huajun Software Park

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.