Refactoring and unit testing

Source: Internet
Author: User

After accessing the program, I often see refactoring. Because I cannot use it, I am not familiar with it. Today I saw refactoring and testing in the course of reading a book, this is the case for Baidu on the Internet. Now let's take a look at our own understanding. refactoring is to add or modify the program code to improve the quality and performance of the program code and make the program design mode and architecture more reasonable, improve software scalability and maintainability.
Why should we rebuild the program? As the society advances, the program may not meet the original needs and need to add features. This may violate the original design architecture and may lead to bugs and performance defects, at this time, we need to do one thing, refactoring. If the refactoring cannot satisfy this program, we may have to rewrite it.


The purpose of refactoring is to improve the software design to make it easier to understand, locate bugs, and improve the software development speed.

Unit Testing, also known as module testing, is usually performed by programmers on their own modules during the programming stage to check whether the modules have implemented the specified functions and algorithms, unit testing mainly finds errors in programming and detailed design. The unit test plan should be formulated at the detailed design stage.

Refactoring and unit testing

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.