Organization of QML tests
-
I have been playing with different tests for my project using both QUICK_TEST_MAIN and QUICK_TEST_MAIN_WITH_SETUP. My tests work as I expect, but now I am facing the problem of how to organize my test suite. I have not been able to find information about this in the official documentation or other sources so I wonder how people handle this. Specifically:
- Do you create several files each with their own QUICK_TEST_MAIN/QUICK_TEST_MAIN_WITH_SETUP, in different folders to tests different parts of your UI? I know that I can pass arguments to such a file and run only specific tst_*.qml files or even tests inside those files, but as an application grows, it might be beneficial to runs tests just for parts of the UI. The other thing is that when using QUICK_TEST_MAIN_WITH_SETUP, different tests can have different setups.
- In case of having separate files how do you run them all together if you just want to run the whole test suite. In addition, tests for the non-UI parts are written using pytest so how do you integrate with those. I was excited about discovering pytest-qml just to find out it only supports pyside2 and PyQt5.
I am guessing that I could just write a script calling all those other scripts and just create some glue code, but before I go and do smth like that I would like to know if there is already a better way of doing things.