开发者论坛
标题:
瑞芯微RK3566鸿蒙开发板OpenHarmony标准系统应用兼容性测试指导
[打印本页]
作者:
admin
时间:
7 天前
标题:
瑞芯微RK3566鸿蒙开发板OpenHarmony标准系统应用兼容性测试指导
[md]| 本文 **OpenHarmony 标准系统应用兼容性测试指导,适用鸿蒙系统软件开发测试的新手入门学习课程**。设备为触觉智能的瑞芯微 RK3566 开发板,型号 Purple Pi OH。是 Laval 官方社区主荐的一款鸿蒙开发主板。支持 Openharmony、安卓 Android、Linux 的 Debian、Ubuntu 系统。**一、****编译兼容性套件******举例:以 Purple-Pi-OH 为例:1. 首先需要把 SDK 编译一遍,参考文章:<br/>[
http://www.industio.cn/product-item-37.html
](
http://www.industio.cn/product-item-37.html
)1. 全量编译:/test/xts/acts 目录下执行编译命令:<br/>`<span>./build.sh product_name=purple_pi_oh system_size=standard</span>`1. 测试用例输出在目录:out/release/suites/acts/testcases1. 测试框架&用例整体输出目录:out/release/suites/acts(根据自身目录查看)**二、资源下载****2.1 **兼容性套件下载****1. 兼容性套件也能通过鸿蒙官网获取:[
https://www.openharmony.cn/certification/document/xts/
](
https://www.openharmony.cn/certification/document/xts/
)如下图所示:![](
https://pic1.zhimg.com/v2-b1739e ... 1b11a8e1c_1440w.jpg
)2. 解压生成 acts 目录,如下图所示:![](
https://pica.zhimg.com/v2-9b4c99 ... baa98b270_1440w.jpg
)**2.2 \*\* resource 文件下载**\*\*1. 选择对应分支与系统类型下载 resource 文件,如下图所示:![](
https://picx.zhimg.com/v2-624ec6 ... 52f08580b_1440w.jpg
)2. 拷贝到 acts\\resource 目录下,如下图所示:![](
https://pic4.zhimg.com/v2-d095a4 ... c58046eb1_1440w.jpg
)![](
https://pic4.zhimg.com/v2-d095a4 ... c58046eb1_1440w.jpg
)**三、配置运行环境**1. 安装 python3.7 及以上版本![](
https://pic3.zhimg.com/v2-7ce1a0 ... 46ce4664c_1440w.jpg
)2. 安装 setuptools(pip install setuptools)在 cmd 中执行命令:
```
pip install setuptools
```
3. 安装 pyserial( pip install pyserial )在 cmd 中执行命令:
```
pip install pyserial
```
4. 安装 rsa( pip install rsa )在 cmd 中执行命令:
```
pip install rsa
```
5. 安装 dateutil(pip install python-dateutil)在 cmd 中执行命令:
```
pip install python-dateutil
```
6. 查看设备信息在 cmd 中执行命令:
```
C:\Users\industio>hdc list targets
150100414a5444345206c363e27d3a00
C:\Users\industio>hdc discover
[Info]Please add HDC server's firewall ruler to allow udp incoming, udpport:8710
[Info]Broadcast find daemon, total:0
C:\Users\industio>hdc shell ifconfig
lo Link encap
ocal Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope: Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 TX bytes:0
eth0 Link encap:Ethernet HWaddr aa:cc:bc:66:ac:9c Driver rk_gmac-dwmac
inet addr:192.168.0.160 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::a8cc:bcff:fe66:ac9c/64 Scope: Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2600 errors:0 dropped:80 overruns:0 frame:0
TX packets:99 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:264523 TX bytes:24139
Interrupt:46
```
7. 配置 user\_config.xml 文件路径:`<span>\suites\acts\config\user_config.xml</span>`
```
<user_config>
<environment>
<support_device>
<device>true</device>
</support_device>
<device type="usb-hdc">
<ip>127.0.0.1</ip>
<port>8710</port>
<sn>150100414a5444345206c363e27d3a00</sn>
</device>
</environment>
<testcases>
<dir></dir>
</testcases>
<resource>
<dir></dir>
</resource>
</user_config>
```
**四、**执行兼容性测试套件****1. 进入 acts 目录下,直接执行 run.bat,并查看对应的设备信息,如下图所示:![](
https://pic4.zhimg.com/v2-c77eb1 ... fc963e9c1_1440w.jpg
)1. 界面启动后,输入用例执行指令,全量执行
```
run acts
```
![](
https://pica.zhimg.com/v2-741970 ... 478ab6482_1440w.jpg
)**五、查看测试报告**1. 进入 acts\\reports\\目录,获取当前的执行记录,打开“summary\_report.html”可以获取到测试报告,如下图所示:![](
https://pic1.zhimg.com/v2-4b78d1 ... 41d1e1b94_1440w.jpg
)2. 当出现 Failed、Blocked、Unavailable 时,将错误模块和没有跑到的模块可以单独、多个一起运行,确保每个模块都可以通过,如下图所示:![](
https://pic3.zhimg.com/v2-a79bf3 ... ecdf7c7e4_1440w.jpg
)2. 模块执行(具体模块可以查看\\acts\\testcases)
```
run –l ActsSamgrTest
```
4. 多个模块运行时需要用分号隔开,命令如下:
```
run –l ActsSamgrTest;actsAceWebViewWebStorageJsunit;xxx;xxx
```
注:其余模块如 ssts、hats、dcts 操作步骤类似,可参考进行操作。 |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
[/md]
作者:
yeyao10
时间:
7 天前
评论下哈哈哈哈哈哈
欢迎光临 开发者论坛 (https://oh-test.qingcheng100.cn/)
Powered by Discuz! X3.5