- Checkout http://code.google.com/p/google-app-engine-django/ and make the necessary changes to your code base according to http://code.google.com/p/google-app-engine-django/source/browse/trunk/README
- In your project directory run: python manage.py shell
- Explore the APIs and play with your models in the interactive session.
- Record the session as a doctest. See an example in the Rietveld project : http://code.google.com/p/rietveld/source/browse/branches/testing/codereview/tests.py
- Replay the test by: python manage.py test _your_pacakge_
Tuesday, 8 July 2008
Google App Engine with Django Unit Testing
To my surprise it is extremely easy to develop unit tests for GAE apps. With the help of GoogleAppEngineDjangoHelper, you can write unit tests around your models and application logic against a fake backend store. So you should be able to test most of your code without involving a browser! Here is an list of steps to develop a doctest for GAE apps.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment