Importance of testing

xiaoxiao2021-03-06  55

It turned out that in a company, in order to debug a mistake, I found it for 15 days to find it!

The phenomenon is as follows:

A program's debug version will be wrong after running, and then discovered that it is called a function of hundreds of thousands!

Then we wrote a test program, call this function, let the error appear! I have found it! One of the top ten functions

The variable has not been initialized, and in the DEBUG version of the VC, it is initialized to 0xcccc. This function gives the value of this variable to another function B.

, B Check this value as index, view a value in the list, when you call to 0xcccc, it is wrong.

There are 2 lessons;

1. Test procedures must be careful

2. Test must be done early, if you have a test program, and there is the Unit test of that function, there may not be this problem!

转载请注明原文地址:https://www.9cbs.com/read-117956.html

New Post(0)