Unit Testing reading notes

Why unit test:

Unit testing is the ultimate beneficiary of our own.

The purpose of the design:

Not to get some better overall quality, it said, it is not one for the end user, project manager and head of development tools; but to be completed by the programmers themselves, and the ultimate beneficiaries are also members themselves.

 

Just start to feel the purpose is not correct, but carefully understand the real purpose of unit testing is not to get the overall quality, but easier for us (development, testing) work. Why do you say that? Take our team now, there is no unit tests, you have to ensure the overall quality of the project, nothing more than a large number of students stress test, no unit testing, functional requirements of the product delivered to a little discount not play. With so after unit testing, it allows us to spend less energy to ensure the delivery of quality maintenance costs as well as the back.
 
What is unit testing:

Unit testing is a piece of code developers to write, very clear function is used to detect a very small code under test is correct.

Unit testing is to prove that the behavior of a piece of code does and developers expect the same.

Unit testing is like a document that can be executed, indicating the calling code when you use a variety of conditions, you can expect this code to complete the function.

 

The ultimate goal of unit testing is to make our job easier, rather than a burden.

We must remember that in the process of writing a simple readable, reusable, covering most of its core function.



Guess you like

Origin www.cnblogs.com/zjyu/p/12504335.html