When a program starts going awry, how do you know just
where the problem is? Is it a specific type of data or data value that is causing a problem?
Is it just a problem connecting or communicating with the database? Or is it really
a problem in the programming logic that needs to be addressed? If you have done
proper unit testing, you??™ll be able to quickly remove the question of it being your programming
logic (the real time killer in debugging) and oftentimes even remove questions
of it being data related. At a minimum, you??™ll be able to work in some quick additional
tests to test a new and unique data value set. This gives you more time to focus on
working through the other layers of potential problems.
CHAPTER 6 ?– ACTIVE RECORD TESTING AND DEBUGGING 126
4. Simplifies the process of finding trouble areas in code: Without solid unit testing, debugging
becomes a time-consuming process of reading through your application line by
line, tracing the process flow until the trouble spot is located??”and you??™ll have to do this
every time for each bug! With unit testing, you build your application flow into your testing,
making it easier to access and execute a specific function or chunk of code for testing.
Pages:
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298