Unit tests on a QML component can be done using the qmlviewer application see
- qmlviewer's -script,-scriptopts and -help options
It might be useful to keep in mind that it is possible have a qtestlib
based unit test for a QML scene. This makes it possible to assess the code
coverage of the test as QML code exercises the underlying C++ API's, or to interact with the objects from C++ to verify logical behavior.
Also it might be worth to link to https://github.com/fgrehm/qmlunit