• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..17-Mar-2025-

ets/H17-Mar-2025-4,7433,964

README.mdH A D17-Mar-2025828 88

README_zh.mdH A D17-Mar-20251.5 KiB2826

README.md

1Store test case code for the Drawing ETS interface
2Usage:
3    1) Copy the ets folders to the entry/src/main directory of the app  project. App project can refer to:
4       https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/Native/NdkTsDrawing.
5    2) Copy the rawfile file from the app sample project to the entry/src/main/resources/rawfile/ directory. Rawfile path:
6       https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/Native/NdkRenderNodeDrawing/entry/src/main/resources/rawfile
7    3) the project need four pictures, so rename test.jpg to test_1.jpg, test_2.jpg, test_3.jpg, test_4.jpg Or prepare local picturers to rawfile directory and rename to test_1.jpg, test_2.jpg, test_3.jpg, test_4.jpg
8    4) Compile and build app project using DevEco Studio.

README_zh.md

1使用说明
21)将ets目录下的文件夹,拷贝到目标工程的entry/src/main目录下进行替换,TS源工程可以参考
3https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/Native/NdkTsDrawing
42)拷贝图片资源,将
5https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/Native/NdkRenderNodeDrawing/entry/src/main/resources/rawfile
6目录下的图片拷贝到目标工程的entry/src/main/resources/rawfile/文件夹下
73)因为bench工程需要用到4张图片,所以需要手动将上面拷贝的图片test.jpg重命名成test_1.jpg, test_2.jpg, test_3.jpg, test_4.jpg
8或者可以本地准备4个图片,重命名成test_1.jpg, test_2.jpg, test_3.jpg, test_4.jpg
94)编译运行项目即可
10
11### 工程目录
12
13```
14 ├──ets                           // ets代码区
15 │  ├──entryability
16 │  │  └──EntryAbility.ts         // 程序入口类
17 |  ├──pages
18 │  │  └──casefactory.ts          // 测试用例工厂类,用于用例名与对应代码的映射
19 |  |  └──Index.ets               // 主界面代码入口
20 |  |  └──myxnode.ts              // 测试框架代码
21 |  |  └──testbase.ts             // 测试用例基类
22 │  |──testcase                   // 页面文件
23 │  |  └──interface
24 |  |     └──xxx.ts               // 性能和功能测试用例代码
25 |  |──utils
26 |     └──xxx.ts                  // 测试辅助类
27 |
28```