Practice unit test (2)-big talk unit test

Source: Internet
Author: User

...
I know that this project has many bugs and cannot be completed on time, even if my boss fired me. I once had a chance to do unit testing. I did not cherish it. I regret it when the project avalanche occurs. If God could give me another chance, I would say to my boss: I want to perform a unit test! If you must add a date to the unit test, I hope it will continue.
...

Here I am not trying to explain how to perform unit tests. Since we cannot specify how to write productsCodeTo implement the required functions, developers are also not required to write test code, or even write ut.

It is even harder to persuade the project manager to implement unit tests in the project, because unit tests often require a longer development cycle and more cost investment for the PM, in addition, projects can be completed in the same way as traditional methods to make money. As a result, in the face of a tight schedule, the implementation of unit tests in the project does need courage and balance.

However, this misunderstanding makes ut difficult to be promoted in China. I think unit testing can shorten the development time and improve the product quality throughout the development cycle, reduces costs and avoids risks. Next let's take a look at the time spent in coding:

1. learning and reading code: for new members of a project team or services written by others, you often need to read others' code. ut provides the best example, it can save learning time and cost.
2. Write Product Code: This is required whether or not ut is implemented.
3. Modify the product code: When ut is not introduced, the bug of the product code can be detected only when the quality department or the customer tries it out, even after the system runs for a period of time, ut cannot completely avoid bugs, but it can help us discover bugs as soon as possible and solve problems as soon as possible, it can save development time and cost.
4. Reconstruction: this is not a small project, but for large projects, we can say that restructuring without ut really requires the courage of Superman! I prefer that projects that do not implement ut cannot be restructured.

However, I have never participated in the whole unit test project. I hope you will give me some comments.

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.