xts-generator

Generates OpenHarmony XTS test files from js-apis-* Markdown API documentation into standardized Hypium .ets code with strict typing.

31|6|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill xts-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xts-generator
Source: https://github.com/openharmonyinsight/openharmony-skills/tree/main/skills/xts-generator
Command: npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill xts-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It solves the repetitive and error-prone work of writing OpenHarmony XTS (Hypium) test cases manually by deriving consistent test coverage directly from API documentation.

Core Features & Use Cases

  • Automated XTS test generation from Markdown API docs: Extracts module names, method signatures, parameters, return types, enum definitions, permissions, and error codes from js-apis-* documentation.
  • Coverage across scenarios: Generates normal cases, null/undefined/exception cases, optional-parameter combination tests, enum value tests, and file path/URI tests with systematic numbering.
  • Enforces strict Hypium standards: Produces TypeScript/ETS code with strict type safety (no any/unknown), single error-code assertions, and English-only logs/comments.

Quick Start

Ask the AI to use xts-generator to generate the required .ets XTS test file(s) for a given OpenHarmony API module using the provided js-apis-* Markdown documentation.

Frequently Asked Questions about xts-generator

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

FAQPage Schema
How do I generate OpenHarmony XTS test cases from API documentation?

You generate OpenHarmony XTS tests by providing js-apis-* Markdown API documentation to derive standardized Hypium .ets test files. This extracts module signatures, parameters, return types, and error codes to automate normal, exception, and optional-parameter coverage.

What is the best way to write Hypium tests with strict ETS type safety?

Writing Hypium tests with strict ETS type safety requires explicit types and forbids any or unknown usage. This standardizes test generation to enforce single error-code assertions and English-only logs for robust OpenHarmony validation.

Does XTS test generation support enum value and file path scenario coverage?

XTS test generation supports enum value and file path or URI scenario coverage. It systematically produces numbered test cases for these specific scenarios alongside normal, null, undefined, and optional-parameter combination tests from API definitions.

Can I use js-apis Markdown files to create exception and null case tests?

Yes, you can use js-apis Markdown files to create exception and null case tests. The generation process extracts error codes and parameter constraints directly from the documentation to build targeted exception and null or undefined validation cases.

How do I ensure correct subsystem and module naming in generated ETS tests?

Ensuring correct subsystem and module naming in generated ETS tests requires deriving names directly from the parsed js-apis Markdown documentation. This mechanism automatically maps API module signatures to their appropriate subsystem and module naming conventions.

What are the limitations when generating Hypium tests from API docs?

Limitations when generating Hypium tests include strict dependencies on the presence of js-apis Markdown documentation for parsing. Additionally, the output enforces strict ETS type safety by forbidding any or unknown types and requiring single error-code assertions.