This document discusses the challenges of test-driven development (TDD) on Google App Engine. Some difficulties include models having a lifecycle between transient and persistent states, tests requiring the datastore, and keys being auto-generated. The author advocates for exploring features by writing mock user interfaces first before adding tests. They also recommend exploiting features using a "vertical slice" approach of mocking interfaces, writing functional tests at the WSGI level, and iterating with unit and functional tests using refactoring. Heuristics discussed include separating domain objects from models, using factories for models, and remembering that if something is hard to test it may be flawed.
11. What should we do?
http://en.wikipedia.org/wiki/File:John_Major,_October_2007.jpg
12. What should we do?
“We will do precisely what
the British nation has
done all through its history
when it had its back to the
wall — turn round and
fight for the things it
believes in, and that is
what I shall do.”
http://en.wikipedia.org/wiki/File:John_Major,_October_2007.jpg
29. Ways and means
Find a good testing framework
nosegae and gae-testbed
learn how to use stubs for the various platform
services
learn how to cycle between functional and unit tests
30. Heuristics
Domain objects don’t have to be model objects
Use simple factories for model objects
31. Heuristics
If in doubt, write a test
Testability requires work
If it’s hard to test it’s probably broken
32. Heuristics
Some things can only be understood in production
End-to-end is further than you think
even if you take this into account