oh-ut-generator

Installation
SKILL.md

OpenHarmony Unit Test Generator

Overview

Generate comprehensive C++ unit tests for OpenHarmony code following HWTEST_F framework conventions.

Key Features

  • Automatic Test Generation: Create test cases for normal/exception/boundary scenarios
  • Mock Object Support: Mock class creation and EXPECT_CALL/ON_CALL setup
  • BUILD.gn Configuration: Automatic dependency matching with source files
  • Coverage Optimization: 75% minimum coverage, targeting 85%+
  • Code Style Consistency: Maintains consistency with existing test patterns (>=70% threshold)
  • NDK/NAPI Support: Special handling for NDK interfaces (7088+ OH_xxx) and NAPI functions (302+ napi_xxx)
  • CJSON Testing: Complete support for CJSON library testing patterns

Usage

Invoke this skill when you need to generate unit tests for OpenHarmony C++ source files.

Related skills

More from openharmonyinsight/openharmony-skills

Installs
67
GitHub Stars
21
First Seen
Jan 29, 2026