Chapter 21. Testing a TurboGears Application


In This Chapter

  • 21.1 Nose 398

  • 21.2 TurboGears testutil 404

  • 21.3 Mechanize 408

  • 21.4 Selenium 411

  • 21.5 Summary 415

Testing is a crucial part of the software development life cycle. Large-scale web application development is a serious endeavor that requires serious testing effort. There are different flavors of testing. Common wisdom suggests that you need to test your system at various levels of granularity using a combination of unit tests, integration tests, and functional tests. A respected TurboGears application has many components in different architectural layers and is distributed across at least two processes (the web server and the client's browser).

Different parts of the application should be tested using different tools and different testing strategies. In this chapter, we'll introduce some test tools and frameworks that are packaged with TurboGears or that can be used to test TurboGears applications.

Nose and testutil provide a great way to do unit and functional tests in development, Mechanize provides a good way to exercise your complete application stack and to run stress tests against your full production environment, and Selenium provides a great way to create tests that run right from within your browserthus allowing you to test Ajax and other JavaScript.




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