Testing and Debugging

Manager: Did you test that program? Programmer: Well, it compiled.

—Both the Manager and Programmer chose to remain anonymous (but you know who they are).

We’ve probably all made a program change that was so small and so straightforward that we really didn’t need to test it. And then we lived to regret that decision. Why do developers often avoid testing? One of the reasons is that it isn’t always easy to do. By providing tools for making testing easier, Dojo encourages developers to do what they know they should—test, test, and test. We test to find errors, and after we find them, we must fix them. In this chapter we explore some special features that Dojo provides to aid in finding errors and fixing them.

17.1. Testing ...

Get Dojo: Using the Dojo JavaScript Library to Build Ajax Applications now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.