The programmers in the group have just reached the unit test (I didn't ask them to practice TDD with me. Is this a hidden danger?), Each person has different reactions and problems, below is some suggestions I gave them: 1. Don't write The unit test is too rely too much - if you write 500 lines of code to start writing unit testing, it will be very painful, very bored, and even find that the unit test cannot be written.
2. Do you write the unit testing that there is no error in the program?
- If you are writing the program first and then write the unit test, then please pay attention to whether you write the unit test to find the error in the process. If you write a bunch of unit tests, there is no error in the program, then there are two possibilities:
1>. You are too cattle, and there is no error in writing procedures;
2>. Your unit test has problems, no place to be tested.
Note: From experience, 1> may not be large.
3. Don't let the write unit test becomes an annoying work.
- Only a place to write unit write units that are easily erroneous in the program can ensure that the proportion of input / output is less than 1. (For example, for SET, Get these methods, don't write tests)