README.md
1# App Samples
2
3- [Introduction](#section_HJSUnit_001)
4- [Usage](#section_HJSUnit_002)
5- [Limitations](#section_HJSUnit_003)
6
7## Introduction<a name="section_HJSUnit_001"></a>
8
9We provide a series of app samples to help you quickly get familiar with the test capabilities and how to use of the HJSUnit. Each app sample is an independent project in DevEco Studio. You can import sample code from a project to a customized project to learn how to use APIs by browsing code, building the project, and installing and running the app.
10
11## Usage<a name="section_HJSUnit_002"></a>
12
131. Development tool: Devco Studio 2.2.0.200 or later
142. Procedure: Create a blank JS template project in Devco Studio, import the sample code in the ohosTest directory of the sample project to the ohosTest directory of the user-defined project, and compile, build, run, and debug the project.
153. After HAP installation and execution, you can view the execution effect of the sample on the device and then conduct debugging.
16
17## Limitations<a name="section_HJSUnit_003"></a>
18
19Before installing and running the sample, check the **deviceType** field in the **config.json** file to obtain the device types supported by the sample. You can modify this field to enable the sample to run on your target device. \(The **config.json** file is generally stored in the **entry/src/main** directory, which may be different depending on the samples.\)
README_zh.md
1# 应用示例
2
3- [概要简介](#section_HJSUnit_001)
4- [使用说明](#section_HJSUnit_002)
5- [约束与限制](#section_HJSUnit_003)
6
7## 概要简介<a name="section_HJSUnit_001"></a>
8
9为帮助测试人员快速熟悉HJSUnit所提供的测试能力和如何使用,我们提供了一系列的应用示例,即Sample。每一个应用示例都是一个独立的DevEco Studio工程项目,测试人员可以将工程中的代码导入到自定义工程中,通过浏览代码、编译工程、安装和运行应用示例来了解应用示例中涉及测试能力的使用方法。
10
11## 使用说明<a name="section_HJSUnit_002"></a>
12
131. 开发工具:2.2.0.200版本及以上的Deveco Studio
142. 使用步骤:①在Deveco Studio中新建空白JS模板项目,将示例工程ohosTest目录下的示例代码导入到自定义工程的ohosTest目录下,进行编译构建及运行调试。
153. 安装运行后,即可在设备上查看应用示例运行效果,以及进行相关调试。
16
17## 约束与限制<a name="section_HJSUnit_003"></a>
18
19安装运行应用示例之前,请先通过config.json文件中的"deviceType"字段来确认该应用示例支持的设备类型,可尝试通过修改该字段使其可以在相应类型的设备上运行(config.json文件一般在代码的entry/src/main路径下,不同的Sample可能会有不同)。