We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All
The documentation of HarmonyOS 5.0.1 (API 13) you're currently viewing is archived and no longer updated. You are advised to switch to the latest version.
GuidesDevEco StudioTesting Your App/Atomic ServiceTest FrameworkCode Test

Code Test

DevEco Studio supports the app/atomic service test framework, with basic APIs for writing test cases and the capability to execute test cases, output test results, and provide the code coverage. It helps you develop simple and easy-to-use automatic test scripts.

  • Instrument test: The test cases are stored in the ohosTest directory and must be run on a device. The ArkTS and JS programming languages are supported.
  • Local test: The test cases are stored in the test directory and do not need to be run on a device. Local tests apply to ArkTS projects developed based on the stage model only. They do not apply to C/C++ methods and system APIs.