17

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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.