简体   繁体   中英

Qt QML Desktop application automation testing

I have a task to automate Qt QML based desktop applications through open source frameworks. I am completely new to testing and also to Qt QML. I am good with Java and Python and also Javascript.

  1. Can someone please suggest a way to write automation tests for Qt QML desktop application?
  2. Can I code things to read the elements and widgets in the Qt QML applications?, So I can validate various cases.
  3. If so, are there any tutorials or sample automation test projects for Qt QML applications?

Have a look at Spix . Once you link against it, you can remote control your QML UI by sending fake events, either from C++, or from a script using RPC. Any scripting language that supports XML-RPC, like python, can be used. This way, you can automate and test your Qt/QML application.

Objects are identified by paths, so you don't have to deal with coordinates. Spix finds the item by the objectName property set in QML. You can also query object properties from the script...

The library is fairly new and under development, but I think it already covers a lot of the more common use cases in desktop apps...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM