Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
3f370b8a
D
Docs
项目概览
OpenHarmony
/
Docs
1 年多 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
3f370b8a
编写于
9月 27, 2022
作者:
O
openharmony_ci
提交者:
Gitee
9月 27, 2022
浏览文件
操作
浏览文件
下载
差异文件
!9981 【翻译完成】#I5P4NX (代码格式修改)
Merge pull request !9981 from Annie_wang/PR8193
上级
408ad337
9644784c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
31 addition
and
31 deletion
+31
-31
en/readme/test.md
en/readme/test.md
+31
-31
未找到文件。
en/readme/test.md
浏览文件 @
3f370b8a
...
...
@@ -4,7 +4,7 @@ OpenHarmony provides a comprehensive auto-test framework for designing test case
This document describes how to use the OpenHarmony test framework.
## Setting Up the Environment
The test framework depends on the Python running environment. Before using the test framework, set up the environment as follows:
-
[
Setting Up the Environment
](
../device-dev/subsystems/subsys-testguide-
envbuild.md
)
-
[
Setting Up the Environment
](
../device-dev/subsystems/subsys-testguide-
test.md#setting-up-the-environment
)
-
[
Obtaining Source Code
](
../device-dev/get-code/sourcecode-acquire.md
)
...
...
@@ -12,48 +12,48 @@ The test framework depends on the Python running environment. Before using the t
The directory structure of the test framework is as follows:
```
test # Test subsystem
├── developertest # Developer test module
│ ├── aw # Static library of the test framework
├── developertest
# Developer test module
│ ├── aw
# Static library of the test framework
│ ├── config # Test framework configuration
│ │ │ ...
│ │ └── user_config.xml # User configuration
│ ├── examples # Examples of test cases
│ ├── src # Source code of the test framework
│ ├── third_party # Adaptation code for third-party components on which the test framework depends
│ ├── reports # Test reports
│ ├── BUILD.gn # Build entry of the test framework
│ ├── start.bat # Test entry for Windows
│ └── start.sh # Test entry for Linux
└── xdevice # Modules on which the test framework depends
│ │ └── user_config.xml
# User configuration
│ ├── examples
# Examples of test cases
│ ├── src
# Source code of the test framework
│ ├── third_party
# Adaptation code for third-party components on which the test framework depends
│ ├── reports
# Test reports
│ ├── BUILD.gn
# Build entry of the test framework
│ ├── start.bat
# Test entry for Windows
│ └── start.sh
# Test entry for Linux
└── xdevice
# Modules on which the test framework depends
```
## Writing Test Cases
### Designing the Test Case Directory
Design the test case directory as follows:
```
subsystem # Subsystem
├── partA # Part A
│ ├── moduleA # Module A
subsystem
# Subsystem
├── partA
# Part A
│ ├── moduleA
# Module A
│ │ ├── include
│ │ ├── src # Service code
│ │ └── test # Test directory
│ │ ├── unittest # Unit test
│ │ │ ├── common # Common test cases
│ │ │ │ ├── BUILD.gn # Build file of test cases
│ │ │ │ └── testA_test.cpp # Source code of unit test cases
│ │ │ ├── phone # Test cases for mobile phones
│ │ │ ├── ivi # Test cases for head units
│ │ │ └── liteos-a # Test cases for the IP cameras that use the LiteOS kernel
│ │ ├── moduletest # Module test
│ │ ├── src
# Service code
│ │ └── test
# Test directory
│ │ ├── unittest
# Unit test
│ │ │ ├── common
# Common test cases
│ │ │ │ ├── BUILD.gn
# Build file of test cases
│ │ │ │ └── testA_test.cpp
# Source code of unit test cases
│ │ │ ├── phone
# Test cases for mobile phones
│ │ │ ├── ivi
# Test cases for head units
│ │ │ └── liteos-a
# Test cases for the IP cameras that use the LiteOS kernel
│ │ ├── moduletest
# Module test
│ │ ...
│ │
│ ├── moduleB # Module B
│ ├── moduleB
# Module B
│ ├── test
│ │ └── resource # Dependency resources
│ │ ├── moduleA # Module A
│ │ └── resource
# Dependency resources
│ │ ├── moduleA
# Module A
│ │ │ ├── ohos_test.xml # Resource configuration file
│ │ ... └── 1.txt # Resource file
│ │ ... └── 1.txt
# Resource file
│ │
│ ├── ohos_build # Build entry configuration
│ ├── ohos_build
# Build entry configuration
│ ...
│
...
...
...
@@ -213,7 +213,7 @@ Example:
|Performance test |PERF|
|Reliability test |RELI|
|Security test |SECU|
|Fuzz test |FUZZ|
|Fuzz test |FUZZ|
#### JavaScript Test Case Example
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录