![]() Every test function should leave the system in a usable state, so it can be run repeatedly. Use init() for preparing a test function. Cleanup operations should be handled in cleanupTestCase(), so they get run even if the test fails. Every test should leave the system in a usable state, so it can be run repeatedly. Use initTestCase() for preparing the test. cleanup() will be called after every test function.init() will be called before each test function is executed.cleanupTestCase() will be called after the last test function was executed.initTestCase_data() will be called to create a global test data table.initTestCase() will be called before the first test function is executed.When present, they will be executed by the testing framework and can be used to initialize and clean up either the entire test or the current test function. In addition, you can define the following private slots that are not treated as test functions. QTest::qExec() can be used to execute all test functions in the test object. Each private slot is a test function in your test. To create a test, subclass QObject and add one or more private slots to it. For more information, see Running Autotests. You can use a Qt Creator wizard to create a project that contains Qt tests and build and run them directly from Qt Creator. The error reporting is thread safe and atomic.Įxtensive use of templates prevent errors introduced by implicit type casting.Ĭustom types can easily be added to the test data and test output. Qt Test outputs messages that can be interpreted by Qt Creator, Visual Studio, and KDevelop. ![]() Qt Test supports benchmarking and provides several measurement back-ends. Qt Test offers functionality for mouse and keyboard simulation. Qt Test needs no special test-runners no special registration for tests.Ī test can be executed multiple times with different test data. Qt Test requires only a few symbols from the Qt Core module for non-gui testing. Qt Test consists of about 6000 lines of code and 60 exported symbols.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |