oh-xts-generator-template_skill

This skill automates OpenHarmony XTS test case generation by parsing API definitions, analyzing coverage, and generating design docs and code that follow XTS
  • Python

0

GitHub Stars

4

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill openharmonyinsight/openharmony-skills --skill oh-xts-generator-template

  • CHANGELOG.md5.9 KB
  • README.md5.5 KB
  • skill_config.json22.1 KB
  • SKILL.md13.7 KB

Overview

This skill is a configurable, extensible template for generating OpenHarmony XTS test cases and accompanying design documents. It automates API parsing, test coverage analysis, code-style checks, and compilation validation to produce XTS-compliant tests. The template supports per-subsystem customization and enforces mandatory annotations and document synchronization.

How this skill works

The generator parses .d.ts API definitions and linked docs to extract interfaces, methods, parameters, return types, and error codes. It scans existing tests to compute coverage and extract style patterns, then applies subsystem templates and rules to produce test files and matching design documents. The tool runs static and dynamic syntax checks, injects required @tc annotation blocks, and optionally compiles via an agent to detect and auto-fix compile-time issues.

When to use it

  • When you need full test suites for new OpenHarmony APIs
  • To supplement missing or low-coverage test areas in a subsystem
  • When you must generate synchronized test design documents with each test
  • To enforce ArkTS code and XTS naming/style conventions
  • When preparing tests for automated compilation and CI validation

Best practices

  • Always provide a subsystem configuration to tailor templates and rules
  • Keep user customizations in the test directory only (entry/src/ohosTest/ets/test/) and avoid modifying project config files
  • Run coverage analysis first to prioritize missing API tests
  • Enable compilation validation on Linux via the subagent for automatic fix-and-retry
  • Follow the required @tc annotation format and import conventions to avoid naming or verification errors

Example use cases

  • Generate an XTS test suite for a newly released API and produce matching design.md files
  • Audit a subsystem: analyze coverage, generate missing tests, and enforce ArkTS static rules
  • Create consistent test templates across multiple subsystems using shared and subsystem-specific configs
  • Validate generated tests by compiling on Linux with automated syntax repair and re-run
  • Switch to static ArkTS mode on Windows when project or keywords indicate strict type checking

FAQ

Provide API declaration (.d.ts) files and subsystem configuration; the generator also scans existing test folders to infer style and coverage.

How does compilation validation work?

On Linux the tool uses a general subagent to run build.sh, perform prebuild cleanup, listen to the compile process, and attempt automated syntax fixes before retrying; on Windows it selects dynamic or static modes based on keywords and environment.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
oh-xts-generator-template skill by openharmonyinsight/openharmony-skills | VeilStrat