Open
【ets_utils】add ArkTS Kit basic capability test cases for emulator support #2739
【ets_utils】add ArkTS Kit basic capability test cases for emulator support #2739
Open
chen-hantao123Add on 2 hours ago
chen-hantao123
chen-hantao123
2 hours ago

一:关联的需求

Proposal ID:20261024348380(ArkTS Kit 接口模拟器支持)

配套 SDD(OpenHarmonyAI/design-docs):https://gitcode.com/OpenHarmonyAI/design-docs/merge_requests/2335

二:修改原因

需求 20261024348380 要求 ArkTS Kit 相关接口支持模拟器且行为与真机一致,验收以 XTS 为主。本 PR 为该需求补充仓内基础能力用例:在既有单测目标下新增各接口基础功能验证用例,用例二进制(test_uri_unittest 等)可在真机/模拟器上以相同方式执行,作为模拟器支持的仓内基础验证。

三:修改描述

在 6 个模块的既有测试文件末尾追加 EmulatorSupportTest 用例,共 11 条(纯新增 204 行,不修改实现代码、不改 BUILD.gn):

模块 文件 用例 验证内容
@ohos.uri js_api_module/uri/test/test_napi.cpp EmulatorSupportTest001/002 URI 基础解析(https/ftp 两类 scheme 的 scheme/host/port/path/query/fragment)
@ohos.url js_api_module/url/test/test_napi.cpp EmulatorSupportTest001/002 URL 基础解析(path/scheme)
@ohos.buffer js_api_module/buffer/test/test_napi.cpp EmulatorSupportTest001/002 Buffer Init/GetLength 基础能力
@ohos.convertxml js_api_module/convertxml/test/test_convertxml.cpp EmulatorSupportTest001 XML 元素转 JS 对象
@ohos.xml js_api_module/xml/test/test_xml.cpp EmulatorSupportTest001/002 XmlSerializer 属性/文本/注释写入
@ohos.util js_util_module/util/test/test_util.cpp EmulatorSupportTest001/002 GetStringUUID/GetBinaryUUID 基础能力

所有用例均复用各文件既有测试模式(构造 + 断言),XML 序列化统一 UTF-8 编码。

四:兼容性领域分析

不涉及。仅新增测试用例,不改动任何实现代码、公共 API、BUILD.gn。

五:CheckList(必填项)

1. 接口功能自检

  • rk3568 推 UT 文件执行:待 CI/设备环境执行(test_uri_unittest / test_url_unittest / test_buffer_unittest / test_convertxml_unittest / test_xml_unittest / test_util_unittest)
  • xts 测试套执行:不涉及,无需验证(未改动模块代码)

2. 解决问题分类自检

  • 新需求上库(模拟器支持需求的仓内用例交付)

3. 接口功能用例看护自检

  • 已新增(EmulatorSupportTest 系列覆盖 6 模块基础能力)

4. 稳定性专项自检

  • 用例为纯新增 gtest,无实现变更;待门禁 UT 执行验证

5. 压测专项自检

  • 不涉及,无需验证

6. 并发专项自检

  • 不涉及,无需验证(未改动 taskpool/worker)

7. 需求上库自检

  • 是否同步合入 interface 仓相关 d.ts:不涉及(无接口声明变更)

是否已执行L0用例

本地无构建环境(依赖仓不完整),待门禁 rk3568 UT 编译执行验证。

六:将上述测试的截图贴到下面

以门禁编译与 UT 执行结果为准。

likedislike
Merge blocked
openharmony_ciopenharmony_ciCollaborators
2 hours ago Added label: waiting_on_author
openharmony_ci
openharmony_ciCollaborators
2 hours ago Comments:

感谢提交 Pull Requests!如果您提交的PR已经开发完毕,请评论 "start build" 触发门禁,更多交互操作,请访问OpenHarmony社区支持命令清单。如果需要调整订阅PR、Issue的变更状态,请访问订阅链接。


Thanks for submitting the pull request. If your Pull Request has already been developed, you can leave a "start build" comment to trigger the gated system. For more commands, please visit OpenHarmony Command List. If you need to change the subscription of a Pull Request or Issue, please visit the link.

likedislike
openharmony_ciopenharmony_ciCollaborators
2 hours ago Added label: dco检查成功
chen-hantao123
chen-hantao123
2 hours ago Comments:

start build

likedislike
openharmony_ci
openharmony_ciCollaborators
2 hours ago Comments:

该提交没有关联任何Issue,请先关联一个Issue后再触发构建
The PR is not associated with any Issue, Please associate the PR with one Issue before trigger build.

likedislike