Comparing QTest with Other Structures

Can you compare the popular unit test frameworks for C ++ with QTest of Qt?

(cppunit, boost test, google test, etc.)

What are the advantages of disadvantages? Thank.

Note. The GUI test is not very important for us.

+3
source share
3 answers

QTest is the only infrastructure I know for component testing user interface components. We have used it with some success, but we stick to Boost.Test for our regular unit testing.

+3
source

QtTest ( Qt 5.7) uut, Googletest , . Googletest , QtTest!

0

, Qt. , :

  • QSignalSpy: ( Qt),

:

  • , setUp tearDown
  • QCOMPARE . , std::chrono::duration , . QCOMPARE

Boost , , .

Google . . , , , . , (, ).

I want to mention one more structure: Catch. This is a heading-only structure, with very few statements. For instance. REQUIRE(a == b)will work, and the values aand bwill be resolved on failure. There is no need for instrument classes or templates, you can simply define sections in a test example, this will be performed N times, with different sections. It is very simple, understandable to humans. On the other hand, it takes time to compile by default.

0
source

Source: https://habr.com/ru/post/1789591/


All Articles