newbee here on QML. Apologies if the question is too basic but I am stuck.
I am trying something very simple, running a simple QML unit test, but it needs to grab the image of the window and saved to the file system.
So I was looking at this…
I'm pretty new in programming. I have a small project that I want to add a unit test to it. I add a new auto test project as new subprojet to my main project but I don't know how should I introduce and include my classes of another source subproject…
I have some Qt tests that pop up a window when run. Therefore i want to add possibility to disable their rendering.Can I set in cmake environment variable QT_QPA_PLATFORM to offscreeen only for test?
I've started to create UI tests for my PyQt5 widgets using QtTest but have run into
the following difficulties:
In order to speed up things, some of my widgets only perform operations when visible. As
it seems that QtTest runs with invisible…
I'm confused on how I'm supposed to use the QtTest FrameWork inside a Library project (Windows). I have created a library project and added some tests, but I had a lot of issues trying to run the tests. The key to solve my problem was to…
I have a simple console application as below and I want to learn how to use Qt Test to test its functionalities. Honestly, I am trying to learn how to use Qt Test module.
MyApplication.pro
QT -= gui
CONFIG += c++11 console
CONFIG -=…
I'm trying to unit test some legacy code which is using QTimer for some periodic action basically:
class MyClass : public QObject
{
Q_OBJECT
public:
explicit MyClass(QObject* parent = nullptr) : QObject(parent)
{
…
Is it possible to ignore the MAX_VALUE of 600 sec at Qt-testing?
I try:
qputenv("QTEST_FUNCTION_TIMEOUT", "1000000"); // 1'000 sec
but the result is:
System.Exception: Process timed out: 600s
So it is possible to increase the timeout from 300s to…
I’m a little bit confused how to work with mock and dynamic linked libraries. Let’s assume a project structure like the following
subdirs.pro (subdir project)
\- app (subdir project)
\-- app (executable, include and use lib)
\-- lib (dynamic…
Qt 4.7.1
I have a qttest setup which has until recently been performing well. I have encountered, and dealt with, the need to interact with modal dialogs by using singleshot timers.
However, I am now seeing the opposite behaviour; calls such as…
I am trying to create a test for a use case like this:
A Dialog is opened
Clicking on a button in this dialog opens a sub dialog
Clicking on a button in the sub dialog closes it
Some action is done in dialog after sub dialog has been closed
I was…
I'm using QtTest and just updated to Qt 5.9 and have this kind of warnings:
error: use of the 'fallthrough' attribute is a C++1z extension [-Werror,-Wc++1z-extensions]
They all point to Q_FALLTHROUGH() in qtestmouse.h
So obviously I need to add…
I can't find clear example of building tests with qbs.
I tried like this
import qbs
CppApplication {
consoleApplication: true
files: [ "TestTask.h", "TestTask.cpp" ]
Depends { name: "Qt"; submodules: [ "core", "testlib" ] }
}
TestTask is a…
Currently using QT 4.8 and according to the document the QTest::currentTestFailed() "Returns true if the current test function failed, otherwise false." I am not sure if this means the value will give the failed/succeeded result of the init…