Django 1.1 Testing and Debugging by Karen M. Tracey, Review By Eric Walstad
Django 1.1 Testing and Debugging covers all the essential tools for testing web applications, specifically Django apps. The topics covered are sometimes specific to Django but many are applicable to other web frameworks or straight Python code. Weighing in at about 400 pages, the book includes a balanced mix of discussion, code examples screenshots and stack traces. The book is targeted at web developers familiar with Python, Django and relational databases who are eager to learn more about testing and debugging. The author's writing style is relaxed yet not full of the smarmy jokes found in some technical books. She does a find job of explaining the concepts covered in the book. It should be considered required reading for perfectionists with deadlines.
The author's approach is to talk the reader through building one example web app of moderate complexity from start to finish, demonstrating the best practices of testing and debugging along the way. The demo app developed in the book is realistically complex including custom template tags, external libraries a race condition and bumping into a bug in the Django source. Each portion of the app is tested and/or debugged, introducing Django tools like Django's unit test extensions and test runners, as well as third party tools like Twill and the Django Debug Toolbar. The discussion of using the Python debugger (pdb) to step through code running on the web server particularly helpful and interesting. The book finishes with discussions of how to be efficient when seeking help from the Django community, deploying and debugging in the production environment and finally load testing the production app.
The physical quality of the book seems above average. The paper is of a nice weight and so far this reviewer's copy has not separated from the binding. It's easy to distinguish the code samples from the command line output from the core text because of the use of different font style and weight. Each chapter includes a short introduction a the beginning and a helpful summary of what it covered at the end. The table of contents is good. The index is fair, if a little on the light side. The overall quality of the book is quite good.