Testing and debugging
Qt provides various functionality to help you develop high quality code. There are features that assist in debugging to track down bugs, and testing facilities that help to keep the bugs out.
Testing Qt-based code
The fundamental level of code testing is the unit test. Qt facilitates the creation of unit tests:
- Qt Test Module (also known as "testlib") provides a framework for unit tests of C++ code
- Qt QuickTest is a framework for unit tests of QML code
Qt itself has a significant number of self-tests built with the Qt Test and QuickTest frameworks. These self-tests are available for study in the tests/auto subdirectories of the source code of each Qt module. The self-tests are an important part of the continuous quality assurance in the development of Qt.
For higher-level testing, powerful third-party tools are available in the Qt ecosystem.
Debugging Qt applications
Qt provides many facilities to assist with debugging:
- Debugging Techniques for Qt C++ code
- Debugging QML Applications
- The "Debugging Plugins" section of the Deploying Plugins overview
- The "Debugging" chapter of the Qt Creator Manual