How to run qml TestCase
-
Hi,
I would start by the Qt Quick Test chapter in Qt's documentation.
-
@Deyan said in How to run qml TestCase:
qmltestrunner
Hi,
SGaist already pointed to a resource that helps clarifying what qmltestrunner is.
If however, you plan to do GUI testing of your QML application, then Squish GUI Tester would be the right tool.
And finally, Squish Test Center (which this area of the forum is about) is a tool for collecting and analyzing reports from Squish GUI Tester, Squish Coco, etc.
Best regards,
Clemens Anhuth -
-
@Furkan Depending on what you need to do, it seems that QUICK_TEST_MAIN_WITH_SETUP is what you would need.
-
@SGaist Firstly, thank you for your advice. I have one question about that macro. There isn't any explanation about "Setup" function. What should be my point of view while writing this function?
I have one more question about "TestCase". Is there any change to write that without any c++ file? I have a problem in "compare" qml function.
-
The documentation is a bit lacking indeed. Setup is not a function but an object that you need to implement. There are three functions called (if you implemented them):
- applicationAvailable
- qmlEngineAvailable
- cleanupTestCase
I am unsure about what you are asking with regard to "TestCase". There's no need for anything more than to modify the
main.cpp
to do your custom initialization.