ohtest

Official

Auto-generate OpenHarmony unit and UI tests.

Authoreclipse-oniro-mirrors
Version1.0.0
Installs0

System Documentation

What problem does it solve?

OpenHarmony 项目中单元测试与 UI 测试往往需要从 .d.ts 与 .ets 文件手动生成,过程繁琐且易出错。本技能通过自动化工具链为这两类测试生成完整的 ohosTest 套件与 UITest 套件,显著提升测试覆盖率与开发效率。

Core Features & Use Cases

  • 自动根据 .d.ts 导出生成 OHOS 单元测试用例,基于 ohtest.py。
  • 根据 .ets 页面定义生成 UITest 套件,使用 uitest_gen.py。
  • 提供一致的代码结构、常量模板(constant.ets)及 List.test.ets 集成,简化日常工作流程。

Quick Start

Run the ohtest.py tool to generate unit tests from a .d.ts and the UITest generator to create UI tests from an .ets page.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: ohtest
Download link: https://github.com/eclipse-oniro-mirrors/napi_generator/archive/main.zip#ohtest

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.