Software testing hw1 -- an error from my past projects
One of my most impressive bugs is in the C # experiment, it’s a todolist app. This bug occurs in the remaining days of the calculation time. Because of the need to obtain the current time and the time of occurrence, and we need the difference between the two values. So this problem occurs in the implicit conversion of subtraction. Two date type of data to do subtraction, I was directly want to int, to get the remaining days. Implicit conversions lead to deviations in time calculations.
The way to find the bug is to roughly determine the code segment that occurred. And then gradually add breakpoints to see changes in the value of the variable within the breakpoint. For example, analyze the values of the two time points when inputting data, and design some examples that may be wrong, then observe the changes in the data. And then compare the relationship between the value and the predicted value, and then found the bug.