Table of Contents
This chapter walks you through the whole process of taking an existing Qt application, making it testable and creating tests for it. At the end we have a test suite which can be used to ensure the correct behavior of the application.
This chapter presents all the major concepts behind Squish and provides the information you need to get started using Squish for testing your own applications. This tutorial does not discuss all features of Squish in detail. After reading this tutorial we suggest to continue with the User's Guide (Chapter 18).
The tutorial is divided into several sub chapters. If you are new to Squish, you might want to walk through all of them. If you are already using Squish you might want to just pick the sections about new features you haven't used before.
For this chapter we use the address book example which is
shipped together with the Qt 3.x package. You can find a copy of it in
squish/examples/qt3/addressbook. This version is
compatible with Qt 3.x and Qt 2.x/Embedded. If you are using Qt 4.x, you
can find a Qt 4 port of this example in
squish/examples/qt4/addressbook.
There are no fundamental differences between testing a Qt 3 or Qt 4 application. There are some differences in the resulting test scripts and the look of Squish's IDE. This tutorial mentions the differences and covers testing Qt 3 and Qt 4 applications.
The address book example is a simple application that allows adding and modifying address records, saving and loading addresses in a text file and searching the address book.
But before we will make this application testable, it might be useful to have a look of how Squish works. Please see Concepts and Making an Application Testable (Chapter 5) for further information.