Skip to content
المشاريع

حول

UI test automation library for QtQuick/QML/QtWidgets Apps

أدوات التطوير

كيف تُقاس هذه الأرقام

ما يمكنك فعله

  • Send mouse events (click, move, drag/drop)
  • Drop mime data from external apps
  • Enter text and key events
  • Check existence and visibility of items

النمو المقاس للنجوم

خلال 24 ساعة
؜-١
خلال 7 أيام
؜-١
خلال 15 يومًا
+١
خلال شهر
جارٍ جمع السجل

تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.

README.md

الأصل

Build and Test

Spix Logo

Spix

Spix is a minimally invasive UI testing library that enables your Qt app's UI to be controlled either via C++ code or through an HTTP RPC interface.

UI elements are referenced through names and paths which are robust against design changes:

mouseClick("mainWindow/ok_button");

To provide an RPC test interface, add three lines to your main():

spix::AnyRpcServer server;
auto bot = new spix::QtQmlBot();
bot->runTestServer(server);

Test scripts can then control your app remotely:

import xmlrpc.client

s = xmlrpc.client.ServerProxy('http://localhost:9000')
s.mouseClick("mainWindow/Button_1")
s.wait(200)
resultText = s.getStringProperty("mainWindow/results", "text")
s.quit()

Architecture

Spix uses a modular architecture:

  • Spix::Core - Qt-independent functionality (RPC server, commands)
  • Spix::QtQuick - Qt/QML scene implementation
  • Spix::QtWidgets - QWidget scene implementation (Qt6 only)

This enables Core-only usage in headless environments and support for different Qt UI frameworks.

Features

  • Send mouse events (click, move, drag/drop)
  • Drop mime data from external apps
  • Enter text and key events
  • Check existence and visibility of items
  • Get/set property values
  • Invoke methods on objects
  • Take screenshots
  • Remote control over network

Requirements

  • AnyRPC
  • Qt 5.15+ or Qt 6.x (for scene libraries)
  • CMake 3.18+

Quick Start

# Install AnyRPC first (see docs/getting-started.md)

# Build Spix
git clone https://github.com/faaxm/spix
cd spix && mkdir build && cd build
cmake -DSPIX_QT_MAJOR=6 ..
cmake --build .
sudo cmake --install .

Build Options:

  • SPIX_QT_MAJOR: Qt version (5 or 6, default: 6)
  • SPIX_BUILD_QTQUICK: Build QtQuick support (default: ON)
  • SPIX_BUILD_QTWIDGETS: Build QtWidgets support (default: OFF, Qt6 only)

CMake Integration

Qt/QML applications:

find_package(Spix REQUIRED)
target_link_libraries(your_app PRIVATE Spix::QtQuick)

QWidget applications (Qt6 only):

find_package(SpixQtWidgets REQUIRED)
target_link_libraries(your_app PRIVATE Spix::QtWidgets)

Item Paths

Spix uses slash-separated paths to identify UI elements:

s.mouseClick("mainWindow/submitButton")
s.getStringProperty("mainWindow/form/resultLabel", "text")

Items are matched by objectName (or QML id). Paths don't need to include every ancestor - Spix searches recursively. See Item Path System for advanced selectors.

Documentation

Examples

License

MIT License - see LICENSE.txt

استكشف مشاريع مشابهة ومرتبطة

جارٍ التحميل…