"The Art of Unit Testing" Reading Notes----Characteristics of Excellent Unit Testing

 A good unit test has the following characteristics:

1. It should be automated and repeatable;

2. It is easy to realize;

3. The next day is still meaningful;

4. Anyone can execute with one key;

5. The running speed is very fast;

6. The results should be stable as long as there are no modifications to the unit tests and the code under test;

7. Should be able to fully control the unit under test;

8. Should be completely isolated (run independently of other tests);

9. He fails, and it is easy to find out what is the expected result, so as to locate the problem.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325651345&siteId=291194637