Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QML Testing with QTestLib [Edited title]



  • Hi,

    I want to automate the QML exported APIs, is there any Framework or tools available for this.



  • Can you please specify what you mean by automate?

    • automated tests?


  • Could you expand on that question a bit? It is totally unclear to me what you want to do.



  • Hi,
    Thanks for the response.
    Here is the exact scenario or problem I am facing.

    For example I have written a SignIn Use case in Qt API and using QtTestlib framework and MytestQtAPP I used to access the QT API that is exposed. And I used to pass the values for that and run the Signin case without manual interaction say for 10 times I was executing the SingIn case..
    Now we are writing a QML binding wrapper on top of Qt API, I need to use this QML Binding interface which expose the SingIn API and test it same way..
    As QtTestlib was there for QT.
    My doubts were like

    1. Can I reuse the QtTestlib for this kind of automation testing
    2. If not, Which framework or Tool can I use for automation testing for this kind of QML binding wrapper class on top of QT.


  • Hi,

    If you have the Qt source, you can look in tests/auto/declarative to see how all the built-in QML elements are tested with QTestLib (hopefully the patterns there will be relevant to your case as well). Alternatively, there are experimental bindings of QTestLib for QML at http://qt.gitorious.org/qt-labs/qtest-qml (which enables you to write QML test cases in QML).

    Regards,
    Michael


Log in to reply