Plone 3 Products Development Cookbook
上QQ阅读APP看书,第一时间看更新

Introduction

After working with the same development environment (Plone in our case) for a while, we tend to get more confident in our code. It's natural to believe that the more I know about something, the more I can do something similar correctly the first time I try it. Paradoxically, this is a mistake in programming, as it will lead to more mistakes.

During development, automated testing is the key practice we should keep as a continuous process of evolution to prevent these errors. It allows us to write testing code that can be run automatically after every code change in order to verify the consistency and correctness of those changes.

Note

Testing is a means of assuring programming quality.

In the following sections, we'll introduce some core concepts of testing and create some rather straightforward examples to demonstrate all the tests we'll add to our products in further chapters:

  • Unit tests
  • Integration tests
  • Functional tests.

The following glossary contains a short explanation of basic testing notions.

Glossary

Note

All along the book we will mainly write doctest, our choice over PyUnit.