Personal tools
Support

Get Help

Join our chat rooms or support forums if you have more specific questions.

Plone Training
Learn how to design, build, and deploy a website in Plone through one of the numerous Plone training sessions around the world.
Find Plone training…
 
Document Actions

3.3. Testability

Up one level
How to write code that is testable

As explained many times before, every feature, bug fix and re-factoring needs to be backed up with appropriate tests. Sometimes, it is necessary to write code in such a way that it can be tested. Normally, however, making code testable also forces you to think about how that code is modularised and what interfaces other code should be using to talk to your code. If your methods are predictable in a test, they will be predictable to calling code as well. Display logic is most easily tested by moving it from page templates to views.

And remember: the easiest way of making sure that code is testable is to write the tests first!

by Martin Aspeli last modified April 17, 2006 - 00:30
Contributors: Martin Aspeli, Hanno Schlichting, Whit Morris
All content is copyright Plone Foundation and the individual contributors.

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by