Section 21.5. Summary


21.5. Summary

  • The Nose testing framework makes it easy to define test functions, test classes, and even doctests and run them every time you make a change.

  • TurboGears provides a number of utilities that make unit and functional testing with Nose even easier. testutil and the DBTest class make it easy to run tests against an in-memory SQLite database or any other test database you've got set up.

  • Python's Mechanize module makes it easy to script a simulated browser session. This is helpful to make sure that everything is working or that CherryPy filters are being applied correctly. You can also use Mechanize to run scripted tests against your production server that will tell you if anything bad is happening.

  • Selenium allows you to run tests against your TurboGears application directly from your browser. This is great because it lets you test JavaScript and Ajax features, and because it lets you see your tests in action.

  • You can use the Selenium IDE for Firefox to automatically generate test scripts for you as you browse through your application.




Rapid Web Applications with TurboGears(c) Using Python to Create Ajax-Powered Sites
Rapid Web Applications with TurboGears: Using Python to Create Ajax-Powered Sites
ISBN: 0132433885
EAN: 2147483647
Year: 2006
Pages: 202

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net