openharmony-testing-apis

Coordinate OpenHarmony JsUnit, UiTest, and PerfTest APIs for test automation.

1|Updated Dec 29, 2025
One-click install
npx skills add https://github.com/mengfei0053/skills --skill openharmony-testing-apis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openharmony-testing-apis
Source: https://github.com/mengfei0053/skills/tree/main/skills/openharmony-testing-apis
Command: npx skills add https://github.com/mengfei0053/skills --skill openharmony-testing-apis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill exposes and coordinates the built-in OpenHarmony testing APIs (JsUnit, UiTest, PerfTest) to streamline test automation, UI interaction, and performance benchmarking for OpenHarmony apps.

Core Features & Use Cases

  • Unified access: Provides access to the four main testing modules:
    • @ohos.app.ability.abilityDelegatorRegistry
    • @ohos.application.testRunner
    • @ohos.UiTest
    • @ohos.test.PerfTest
  • Scenario coverage: Enables automated UI testing, performance measurements, and custom test runner integration across real-world OpenHarmony apps.
  • Use Case: When validating an app’s lifecycle, UI flows, and startup performance, you can script tests that exercise these APIs in a consistent, repeatable way.

Quick Start

Use the OpenHarmony testing APIs in your app’s test configuration to set up UiTest/UI interactions and PerfTest benchmarks via the provided modules.

Frequently Asked Questions about openharmony-testing-apis

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

FAQPage Schema
How do I automate UI testing for OpenHarmony apps?

You can automate UI testing for OpenHarmony apps by scripting interactions with the @ohos.UiTest module to exercise UI flows and validate app lifecycles in a repeatable way.

What is the best way to measure performance in OpenHarmony applications?

The best way to measure performance in OpenHarmony applications is by using the @ohos.test.PerfTest module to run benchmarks and evaluate startup or lifecycle performance metrics.

Can I use JsUnit to run custom test runners in OpenHarmony?

Yes, you can use JsUnit alongside the @ohos.application.testRunner module to integrate custom test runners and execute end-to-end testing workflows for your OpenHarmony apps.

Which OpenHarmony API versions support the PerfTest and UiTest modules?

The PerfTest and UiTest modules support OpenHarmony API versions 8+ through 20+, allowing developers to enable end-to-end testing and performance benchmarking across typical development workflows.

How do I set up app lifecycle testing using abilityDelegatorRegistry?

You set up app lifecycle testing by accessing the @ohos.app.ability.abilityDelegatorRegistry module to coordinate test automation and validate app ability behaviors during execution.