qt-qml-test

Generate Qt Quick Test cases for QML components using TestCase and SignalSpy.

351|38|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/TheQtCompanyRnD/agent-skills --skill qt-qml-test
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: qt-qml-test
Source: https://github.com/TheQtCompanyRnD/agent-skills/tree/main/skills/qt-qml-test
Command: npx skills add https://github.com/TheQtCompanyRnD/agent-skills --skill qt-qml-test

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Qt, QtQuick, QtTest, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill automates the generation of Qt Quick Test cases for QML components, significantly reducing the time and effort required to create and maintain tests.

Core Features & Use Cases

  • Test Generation: Automatically generates tst_*.qml test files for QML components.
  • Testing Rules: Applies 47 predefined rules to cover imports, structure, properties, signals, and more.
  • Use Case: When working on a Qt Quick application, use this Skill to generate test cases for your components and ensure they are working correctly.

Quick Start

Generate test cases for the QML component 'MyComponent.qml'.

Frequently Asked Questions about qt-qml-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate QML testing for Qt Quick components?

Automate QML testing by generating Qt Quick Test cases for your components. This process creates tst_*.qml files using TestCase and SignalSpy, applying 47 predefined rules to cover imports, properties, and signals without manual effort.

What is Qt Quick Test used for in Qt development workflows?

Qt Quick Test is used for automated testing of QML components. It utilizes the QtTest API to verify that Qt Quick application components function correctly by generating structured test cases validating imports, properties, and signals.

Do I need Qt 6 to generate Qt Quick Test cases for QML components?

Yes, Qt 6 is required to generate Qt Quick Test cases. The test automation process requires a QML source file and depends on the Qt, QtQuick, and QtTest modules to create tst_*.qml test files.

What's the best way to write signal tests for QML components?

Write signal tests for QML components by using SignalSpy within generated Qt Quick Test cases. This approach applies predefined testing rules to ensure components' signals are properly validated during Qt test automation.

Can I use QtTest to validate properties and imports in my QML file?

Yes, QtTest validates imports, structure, and properties in QML files. Automated test generation applies 47 predefined rules to ensure comprehensive coverage of Qt Quick components using the TestCase API.