I have some unit tests for my project that I did with the QtTest framework. It is a console application, and actually I don't use anything from Qt apart from QtTest.
On my computer it works fine, however I am setting up continuous integration on…
I've written a number of unit tests for a Qt application using QTest which are packaged into a separate executable and can be run from a terminal. Both executables can be compiled and run fine from both my desktop and my Jenkins server.
However,…
I'm writing a unit test using QtTest framework. I have a .pro file representing test project where i want to specify a relative path to the source files i want to test with INCLUDEPATH keyword. The source files are in the source folder, which is 2…
I use googletest as the main testing framework for a Qt project. QAbstractItemModelTester helps catching the most common errors in custom item model classes but I don't know how to integrate the reported failures(QTest) in a googletest unit test.
I am trying to create a new test class for each of my classes in QT. I have this working with a single file, but that relies on QTEST_MAIN creating an application for me and calling it in more than 1 file creates a multiple definition error.
I…
I want to test the functionality of pressing a button from my panel.
The problem is that the button is not QPushButtons, but rather QGraphicWidget elements.
How do I generate this button mouse-click to test its behavior?
Buttons are not simple…
So, there I'm writing some library and desided to have a proper unit-testing for it (like TDD and so on). QtTest framework looked suitable to start with. The library itself is fine, so is the test.
But when I added both the library and the test…
I am trying to unit test (using Qt Test) the individual widgets in a Qt Widgets application, like menuBar, pushButton, etc. The project has been set up as a Subdirs project, where the both the Qt application and GUI test sub projects have their own…
In TestGroup_Person, when I retrieve a QSharedPointer<-JB_TableRowProt> from JB_PersonDao and assign it to QSharedPointer<-JB_TableRowProt> aGroup_Person (in .h), I then get this error in the methods of TestGroup_Person.
Alternatively, if I retrieve…
I'm sure I'm just missing something in my original class (conferenceview), but I can't wrap my head around exactly what is missing. When I attempt to build my tst_conferencepage.cpp file, which includes my conferenceview class, I get an error…
I'm running benchmarks in my tests with the QBENCHMARK macro. I pass the iterations n and -o myfile.csv,csv flags to the executable. Unfortunately, Qt only gives you the average run-time, accumulative run-time and number of runs.
I'd like to have…
Travis relies on the exit code on an executable to determine if the test passed or failed. Qt Test is designed so that every test class is contained in its own executable so, after the build, I end up with a bunch of tests inside my bin/tests…
I have some widget application project on Qt 5.9.3. Now for a Unit testing I've created a new root "subdir" project, which contains my main application project and the new Qt test project:
Notice - how I create the root solution folder with an…
I am trying to use QTest to test UI interactions with a QListWidget.
Interactions made from a simple click work fine (QTest::mouseClick()) but interactions from a double click do not (QTest::mouseDClick()).
Here is simplified code sample to…
I'm trying to set up some unit tests with QtTest and i'd like to use QFETCH.
I am testing the following function :
static std::vector FrameHandler::getBitsFromFrame(unsigned char* data, unsigned char length);
It simply converts a array of…