ohos-test-graphics3d-static-api-unit-test

Generate GTest-based ETS static API unit tests for OpenHarmony graphic_3d wrappers.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill helps you produce correct, consistent unit tests for OpenHarmony graphic_3d ETS static API wrappers, avoiding broken test discovery, missing annotations, and incorrect naming or BUILD.gn setup.

Core Features & Use Cases

  • AAA-based GTest/HWTEST_F test templates: ensures Arrange-Act-Assert structure with required OpenHarmony annotations.
  • OpenHarmony-compliant naming conventions: standardizes test class, case, and file naming for stable integration.
  • EtsTest fixture and BUILD.gn guidance: supports GTest-based ETS unit test environment setup and common build/runtime issues.
  • Use cases:
    • Add or extend unit tests for wrapper-style classes such as MaterialETS, CameraETS, and SceneETS.
    • Create a new ETS test module and integrate it into the OpenHarmony build system.
    • Troubleshoot typical errors like missing headers, unresolved libraries, or test interference.

Quick Start

Use the ohos-test-graphics3d-static-api-unit-test skill to generate GTest-based ETS unit test cases for your new MaterialETS/CameraETS/SceneETS wrapper and update the corresponding BUILD.gn sources accordingly.

Frequently Asked Questions about ohos-test-graphics3d-static-api-unit-test

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

FAQPage Schema
How do I generate ETS unit tests for OpenHarmony graphics3d wrapper classes?

To generate ETS unit tests for OpenHarmony graphics3d wrapper classes, use the GTest-based EtsTest fixture workflow with HWTEST_F macros and @tc annotations. This ensures tests follow AAA structure and integrate correctly with the OpenHarmony build system.

What naming conventions are required for OpenHarmony graphics3d ETS test cases?

OpenHarmony graphics3d ETS test cases require specific naming conventions for test classes, cases, and files to ensure stable integration and correct test discovery. Following these standardized names prevents broken test execution and missing annotation errors during the build process.

How do I integrate new ETS test modules into BUILD.gn for OpenHarmony graphics3d?

Integrating new ETS test modules into BUILD.gn for OpenHarmony graphics3d requires adding your test sources to the build configuration while following the EtsTest fixture setup. This ensures proper library resolution and test execution within the OpenHarmony build environment.

Why are my graphics3d ETS unit tests failing to discover or run properly?

Graphics3d ETS unit tests often fail discovery due to missing OpenHarmony @tc annotations, incorrect HWTEST_F macro usage, or non-compliant naming conventions. Reference UNITTEST_GUIDE.md to verify environment setup and resolve common test interference or unresolved library issues.

Do I need HWTEST_F to write unit tests for MaterialETS and CameraETS wrappers?

Yes, HWTEST_F is required when writing unit tests for MaterialETS, CameraETS, and SceneETS wrapper classes in OpenHarmony. It provides the necessary GTest fixture framework to maintain Arrange-Act-Assert structure and comply with OpenHarmony testing standards.

What is the best way to structure GTest cases for OpenHarmony ETS static API testing?

The best way to structure GTest cases for OpenHarmony ETS static API testing is using the Arrange-Act-Assert pattern within HWTEST_F fixtures. This approach ensures proper test isolation, correct @tc annotation usage, and reliable validation of ETS wrapper behaviors.