oh-xts-generator-template
OfficialGenerate OpenHarmony XTS cases with design docs and build checks.
System Documentation
What problem does it solve?
It helps you automatically generate OpenHarmony XTS test cases from API declaration files, keep test design documents synchronized, and ensure the generated ArkTS code passes required syntax validation and compilation workflows.
Core Features & Use Cases
- API definition parsing: parses
.d.tsto extract classes, methods, parameters, return types, and@throws-declared error codes. - Test case generation with coverage support: generates PARAM/ERROR/RETURN/BOUNDARY tests either from API structure + coverage analysis or directly from user-provided coverage reports.
- Quality gate enforcement: performs mandatory formatting/validation checks (including assertion methods,
@tcblock completeness, naming rules) and supports ArkTS static-vs-dynamic API filtering and compilation guidance.
Use case example: You need to add missing tests for a subsystem’s APIs and want the AI to generate both the .test.ets files and the matching {test_file}.design.md documentation, then validate that the result can be compiled in Linux/Windows workflows.
Quick Start
Use the skill to generate XTS tests for your target subsystem by providing the API name and subsystem configuration, then run the generated test through the required format/validation and compilation steps.
Dependency Matrix
Required Modules
None requiredComponents
💻 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: oh-xts-generator-template Download link: https://github.com/openharmonyinsight/openharmony-skills/archive/main.zip#oh-xts-generator-template Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.