[go: up one dir, main page]

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.

Unit Testing

Qt facilitates the creation of unit tests to test interfaces such as classes, functions, or whole libraries.

  • Qt Test (also known as testlib) - a framework for unit tests of C++ code
  • Qt Quick Test - a framework for unit tests of QML code

Autotests

Qt itself has a significant number of unit tests written with the Qt Test and Qt Quick Test frameworks (autotests). These autotests are available for study in the tests/auto directories of the source code of each Qt module. The autotests are an important part of the continuous quality assurance in the development of Qt.

Testing with Qt Creator

Qt Creator's full debugging workflow supports debugging both C++ and QML code as well as the ability to profile code.

For more information, consult the Qt Creator Manual:

Debugging Techniques

These pages contain suggestions for debugging under various circumstances:

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.