qt-unittest-make

Generate Qt module unit tests with Google Test and CMake merging.

7|3|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/re2zero/deepin-skills --skill qt-unittest-make
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: qt-unittest-make
Source: https://github.com/re2zero/deepin-skills/tree/main/qt-unittest-make
Command: npx skills add https://github.com/re2zero/deepin-skills --skill qt-unittest-make

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Qt projects frequently struggle to generate reliable unit tests for modules and classes, leading to gaps in coverage and time-consuming manual test creation.

Core Features & Use Cases

  • Generates unit tests for Qt modules and classes, including module-wide batch generation and per-class incremental updates.
  • Enforces 100% function coverage by analyzing class structures with LSP and generating stubbed test cases.
  • Validates builds automatically via integrated CMake merging and Google Test workflows to ensure tests compile and run.

Quick Start

Use the qt-unittest-make skill to generate unit tests for a target Qt module or class. For example, trigger: 为 src/lib/ui 模块创建单元测试. The skill will scan headers, create test files like test_myclass.cpp, configure autotests, and perform a build verification to confirm successful compilation.

Frequently Asked Questions about qt-unittest-make

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

FAQPage Schema
How do I generate Qt unit tests with CMake and Google Test?

To generate Qt unit tests, this skill uses LSP-driven analysis to map class structures and creates stubbed test cases. It integrates CMake merging and Google Test workflows to ensure tests compile and run successfully.

How do I achieve 100% function coverage for Qt modules?

Achieve 100% function coverage by scanning Qt class headers with LSP analysis to identify all functions, then generating complete stubbed unit tests for module-wide batch generation or incremental per-class updates.

Can I update unit tests incrementally for a single Qt class?

Yes, you can update unit tests incrementally for a single Qt class. The skill supports per-class updates by analyzing specific class structures with LSP and generating targeted test files like test_myclass.cpp.

What is the best way to validate Qt unit test compilation automatically?

The best way to validate Qt unit test compilation is using integrated CMake merging with Google Test workflows. The skill performs build verification and applies per-error retry limits during compilation to confirm successful test generation.

Does Qt unit test generation work without an existing Google Test workflow?

No, Qt unit test generation requires a Google Test workflow to function properly. The skill depends on this framework to execute the generated test cases and validate the build through integrated CMake merging.

Why do my generated Qt unit tests fail to compile during CMake merging?

Generated Qt unit tests may fail to compile if class structures are not properly mapped by LSP. The skill applies per-error retry limits during compilation to automatically resolve build issues and ensure successful test execution.