Kreiranje testova temeljenih na CTestu

CTest može izvršavati testove za projekte temeljene na CMakeu bez obzira na okvir za testiranje. Testove konfigurirate u datoteci projekta, obično u CMakeLists.txt. U osnovi, omogućujete testiranje za projekt i registrirate testne aplikacije ili čak posebne naredbe.

enable_testing()
add_test(NAME test_example COMMAND test_example)

Dodajte test_example kao izvršnu datoteku prije nego što ga pokušate registrirati kao test. To može biti bilo koja izvršna naredba, uključujući argumente.

Za više informacija o tome kako koristiti CTest pogledajte odjeljak Testing with CTest.

Vidi također Kako: Testiranje, Odabir sustava za izgradnju, Testiranje i Rezultati testiranja.

Copyright © The Qt Company Ltd. and other contributors. 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.