Skip to content

a5c-ai/babysitter / library/specializations/desktop-development/skills/qt-test-fixture-generator

qt-test-fixture-generator

Verified

Generate Qt Test fixtures with mock QObject signals and slots, data-driven tests, and GUI testing setup

FileKindSize
README.mdmarkdown1.4 KB
SKILL.mdskill md7.9 KB
# qt-test-fixture-generator

Generate Qt Test fixtures with mock QObjects and data-driven tests.

## Overview

This skill creates comprehensive QTest-based test infrastructure including test fixtures, mock objects, data providers, and CMake integration.

## Quick Start

```javascript
const result = await invokeSkill('qt-test-fixture-generator', {
  projectPath: '/path/to/qt-project',
  classToTest: 'MyWidget',
  testType: 'unit',
  mockDependencies: ['DataService', 'NetworkManager'],
  dataProviders: [
    {
      testName: 'testCalculation',
      columns: ['input', 'expected'],
      rows: [['10', '20'], ['0', '0'], ['-5', '-10']]
    }
  ],
  generateCoverage: true
});
```

## Features

### Test Types

| Type | Description |
|------|-------------|
| unit | Isolated class testing |
| integration | Component interaction |
| gui | Widget interaction testing |
| benchmark | Performance measurement |

### Generated Components

- Test class with lifecycle methods
- Mock objects with call tracking
- Data providers for parameterized tests
- CMake configuration

## Running Tests

```bash
# All tests
ctest --test-dir build

# Single test
./build/tests/tst_mywidget

# Specific function
./build/tests/tst_mywidget testSetValue
```

## Related Skills

- `qt-cmake-project-generator`
- `cross-platform-test-matrix`

## Related Agents

- `qt-cpp-specialist`
- `desktop-test-architect`
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall