Prev | Current Page 328 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

If the results are
correct, the test is passed; otherwise the test fails. Having unitary tests makes the developer ??™ s life easier
because when a bug is involuntarily introduced in the code during alterations, it is highly probable that
one of the already written tests will fail indicating with a certain degree of precision where the error is.
This works when the application code is covered by an extensive number of tests (a concept known as
code coverage). When a bug is encountered and no tests are failing, the better thing to do is to write a
new test that reproduces the exact same defect. In this way, it will be easier to check that the problem is
not accidentally reintroduced in subsequent alterations.
Many developers consider Unit Testing a waste of time. This is because possibly they do not consider all
the positive effects that a good test base has on their projects. Having a good code coverage means that
alterations to the code can be made with confidence because if something critical is touched, a test will
fail addressing the problem.


Pages:
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340