diff --git a/performance/arkui/benchMark_Component/.gitignore b/performance/arkui/benchMark_Component/.gitignore index 83aac610e72931feb124646269018cf1396c9445..f5b7f96cc2c9323f1257ddce3c66d348d265609c 100644 --- a/performance/arkui/benchMark_Component/.gitignore +++ b/performance/arkui/benchMark_Component/.gitignore @@ -7,4 +7,5 @@ **/.preview **/package-lock.json /oh_modules -**/oh_modules \ No newline at end of file +**/oh_modules +/oh-package-lock.json5 \ No newline at end of file diff --git a/performance/arkui/benchMark_Component/BenchMark_tool/1.bat b/performance/arkui/benchMark_Component/BenchMark_tool/1.bat index 9250d1cb2c439d101cbcee10e8a2d9f093bcd7ac..1c7c6b4dd7c064975a437c49f06d999158293510 100644 --- a/performance/arkui/benchMark_Component/BenchMark_tool/1.bat +++ b/performance/arkui/benchMark_Component/BenchMark_tool/1.bat @@ -1,3 +1,15 @@ +:: Copyright (c) 2023 Huawei Device Co., Ltd. +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. set ymd=%date:~0,4%%date:~5,2%% for /f "tokens=* delims= " %%a in ("%ymd%") do set ymd=%%a diff --git a/performance/arkui/benchMark_Component/BenchMark_tool/2.bat b/performance/arkui/benchMark_Component/BenchMark_tool/2.bat index be32cc050ce181b95161c932f699c7965e7c6dac..a202252b4b421ab4bdfbc8bcc1913f92324a8505 100644 --- a/performance/arkui/benchMark_Component/BenchMark_tool/2.bat +++ b/performance/arkui/benchMark_Component/BenchMark_tool/2.bat @@ -1,3 +1,15 @@ +:: Copyright (c) 2023 Huawei Device Co., Ltd. +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. hdc app install -r entry-default-signed.hap hdc app install -r entry-ohosTest-signed.hap diff --git a/performance/arkui/benchMark_Component/BenchMark_tool/3.bat b/performance/arkui/benchMark_Component/BenchMark_tool/3.bat index f8d8d17215967434ee10b5b2eb322a4ddb28a731..3f50d54790e6b6e042faf1636b0647453ad92e1c 100644 --- a/performance/arkui/benchMark_Component/BenchMark_tool/3.bat +++ b/performance/arkui/benchMark_Component/BenchMark_tool/3.bat @@ -1 +1,14 @@ +:: Copyright (c) 2023 Huawei Device Co., Ltd. +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + python BenchMark_js.py \ No newline at end of file diff --git a/performance/arkui/benchMark_Component/BenchMark_tool/4.bat b/performance/arkui/benchMark_Component/BenchMark_tool/4.bat new file mode 100644 index 0000000000000000000000000000000000000000..3576a6143c44ea4203274ffd4460a64305d03c4c --- /dev/null +++ b/performance/arkui/benchMark_Component/BenchMark_tool/4.bat @@ -0,0 +1,14 @@ +:: Copyright (c) 2023 Huawei Device Co., Ltd. +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + + python BenchMark_pass.py \ No newline at end of file diff --git a/performance/arkui/benchMark_Component/BenchMark_tool/BenchMark.py b/performance/arkui/benchMark_Component/BenchMark_tool/BenchMark.py index 75e3e77a4b4f721e3445faf63bd5c946472a6b18..afa51dda36d801254ba924b3610eb715b723cc28 100644 --- a/performance/arkui/benchMark_Component/BenchMark_tool/BenchMark.py +++ b/performance/arkui/benchMark_Component/BenchMark_tool/BenchMark.py @@ -1,3 +1,16 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import openpyxl from openpyxl.styles import Alignment @@ -13,12 +26,12 @@ workbook = openpyxl.Workbook() # 创建工作簿 worksheet = workbook.active # 选择默认的表单 worksheet['A1'] = '组件名称' worksheet['B1'] = '页面名称' -worksheet['C1'] = '创建时间(单位ms)' -worksheet['D1'] = '布局时间(单位ms)' +worksheet['C1'] = 'C++创建时间(单位ms)' +worksheet['D1'] = 'C++布局时间(单位ms)' worksheet.column_dimensions['A'].width = 15 worksheet.column_dimensions['B'].width = 30 -worksheet.column_dimensions['C'].width = 20 -worksheet.column_dimensions['D'].width = 20 +worksheet.column_dimensions['C'].width = 25 +worksheet.column_dimensions['D'].width = 25 # 获取sample def find_samples(file_path, target): diff --git a/performance/arkui/benchMark_Component/BenchMark_tool/BenchMark_file.py b/performance/arkui/benchMark_Component/BenchMark_tool/BenchMark_file.py index 208ab38bc5c03b519b4ad60e816121588fe17fcd..a5ac67dba0c1a515a7a262c646b6d2c94c64423c 100644 --- a/performance/arkui/benchMark_Component/BenchMark_tool/BenchMark_file.py +++ b/performance/arkui/benchMark_Component/BenchMark_tool/BenchMark_file.py @@ -1,3 +1,16 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import openpyxl file_path = 'D:/BenchMark_tool/benchmark_next.ftrace' diff --git a/performance/arkui/benchMark_Component/BenchMark_tool/BenchMark_js.py b/performance/arkui/benchMark_Component/BenchMark_tool/BenchMark_js.py index a3a0a6a1dc26b1ccb29e5001c1fe65d79a2cf7f3..bf35d1be79ecc785ecd1fbb10307f5d9c59b53f4 100644 --- a/performance/arkui/benchMark_Component/BenchMark_tool/BenchMark_js.py +++ b/performance/arkui/benchMark_Component/BenchMark_tool/BenchMark_js.py @@ -1,3 +1,16 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import openpyxl from openpyxl.styles import Alignment import pandas as pd @@ -10,10 +23,8 @@ file_path = 'D:/BenchMark_tool/BenchMark_js.txt' workbook = openpyxl.Workbook() # 创建工作簿 # worksheet = workbook.create_sheet(title='BenchMark') # 创建工作表 worksheet = workbook.active # 选择默认的表单 -worksheet['A1'] = '组件名称' -worksheet['B1'] = '时间' -worksheet.column_dimensions['A'].width = 30 -worksheet.column_dimensions['B'].width = 30 +worksheet['A1'] = '页面名称' +worksheet['B1'] = 'js创建时间(单位ms)' # 获取sample def find_samples(file_path): @@ -60,3 +71,8 @@ data = data.dropna() # 保存修改后的Excel文件 data.to_excel('BenchMark_js.xlsx', index=False) +wb = openpyxl.load_workbook('BenchMark_js.xlsx') +ws = wb.active # 选择默认的表单 +ws.column_dimensions['A'].width = 30 +ws.column_dimensions['B'].width = 30 +wb.save(filename='BenchMark_js.xlsx') # 保存工作簿 \ No newline at end of file diff --git a/performance/arkui/benchMark_Component/BenchMark_tool/BenchMark_pass.py b/performance/arkui/benchMark_Component/BenchMark_tool/BenchMark_pass.py new file mode 100644 index 0000000000000000000000000000000000000000..392489fe3b654ed7268c3a94e7773b6e251739f8 --- /dev/null +++ b/performance/arkui/benchMark_Component/BenchMark_tool/BenchMark_pass.py @@ -0,0 +1,49 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import openpyxl + +def read_excel_file(filename): + # 打开xlsx,得到workbook对象 + wb = openpyxl.load_workbook(filename) + sheet_names = wb.sheetnames + for name in sheet_names: + print('sheet_name= ', name) + if '基线数据' != name: + continue + ws = wb[name] + for i in range(ws.max_row): + if i==0: + continue + # 每一行的第7列 + cell_s = ws.cell(row=i+1, column=7) + print('cell_s.value= ', cell_s.value) + # 每一行的第8列 + cell_a = ws.cell(row=i+1, column=8) + print('cell_a.value= ', cell_a.value) + + value1 = 0 + if cell_s.value != None: + if 'ms' in str(cell_s.value): + value1 = float(cell_s.value.split('ms')[0]) + else: + value1 = float(cell_s.value) + value2 = 0 + if cell_a.value != None: + value2 = float(cell_a.value) + if value2 - value1 < 0: + print('pass -----------------------------') + ws['I%s' % str(i+1)] = 'Pass' # I列标记Pass + wb.save("基线表.xlsx") + +read_excel_file("基线表.xlsx") diff --git a/performance/arkui/benchMark_Component/BenchMark_tool/trace.py b/performance/arkui/benchMark_Component/BenchMark_tool/trace.py index 12dec30753b595c2033ee4b4cd46e33e28d49d70..2c156e9d198a8ccc6320c593db97fb5256766f91 100644 --- a/performance/arkui/benchMark_Component/BenchMark_tool/trace.py +++ b/performance/arkui/benchMark_Component/BenchMark_tool/trace.py @@ -1,3 +1,16 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #!/usr/bin/bin/env python3 # -*- coding: UTF-8 -*- diff --git a/performance/arkui/benchMark_Component/README.md b/performance/arkui/benchMark_Component/README.md index df83c9858c3a70873f7de0494a98e7e522ec23a4..90d0d334988acc09f96d8950c6cedd47bd5a6228 100644 --- a/performance/arkui/benchMark_Component/README.md +++ b/performance/arkui/benchMark_Component/README.md @@ -5,7 +5,16 @@ ArkUI组件性能测试用例 #### 目录结构 ``` -├── BenchMark_tool //解析trace数据工具 +├── BenchMark_tool //解析trace数据工具 +│   └── 1.bat //获取C++层创建耗时和布局耗时脚本 +│   └── 2.bat //安装hap包、执行单元测试脚本 +│   └── 3.bat //获取js层创建耗时脚本 +│   └── 4.bat //对比基线数据脚本 +│   └── BenchMark.py //解析C++层创建耗时和布局耗时数据 +│   └── BenchMark_file.py //解析C++层创建耗时和布局耗时数据 +│   └── BenchMark_js.py //解析js层创建耗时数据 +│   └── BenchMark_pass.py //对比基线数据脚本 +│   └── trace.py //抓取C++层trace数据 ├── entry │   └── src |      └── main //测试用例代码 @@ -27,7 +36,7 @@ ArkUI组件性能测试用例 将生成的两个hap包复制到D://BenchMark_tool文件夹中 ![2.png](preview/2.png) - + 修改bytrace执行时间,将D://BenchMark_tool/1.bat中hdc_std shell "bytrace -t 360 -b 204800 --overwrite ace > /data/%filename%"命令中-t后边的360替换为当前单元测试的执行时间(单位秒) 执行D://BenchMark_tool/1.bat脚本,紧接着执行2.bat脚本;等待脚本执行结束会在BenchMark_tool文件中生成BenchMark.xlsx @@ -37,5 +46,5 @@ ArkUI组件性能测试用例 在D://BenchMark_tool下新建BenchMark_js.txt文件,将DevEco Studio控制台打印的数据(如下图数据)复制到BenchMark_js.txt文件中并保存,执行3.bat,等待脚本执行结束会在BenchMark_tool文件中生成BenchMark_js.xlsx ![3.png](preview/3.png) - - +6. 与基线数据对比 + 执行4.bat diff --git a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockPaddingSample.ets b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockPaddingSample.ets index f9661d434a978c923b968534d5a055105de02244..a7f6db08757eb8b9ab1e69c7cec4284b7bc67e81 100644 --- a/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockPaddingSample.ets +++ b/performance/arkui/benchMark_Component/entry/src/main/ets/pages/base/patternLock/PatternLockPaddingSample.ets @@ -38,26 +38,26 @@ struct PatternLockPaddingSample { if (this.patternLockPadding == 30 && this.timeHelper.printTime(true)) { } - Counter().padding(this.patternLockPadding) - Counter().padding(this.patternLockPadding) - Counter().padding(this.patternLockPadding) - Counter().padding(this.patternLockPadding) - Counter().padding(this.patternLockPadding) - Counter().padding(this.patternLockPadding) - Counter().padding(this.patternLockPadding) - Counter().padding(this.patternLockPadding) - Counter().padding(this.patternLockPadding) - Counter().padding(this.patternLockPadding) - Counter().padding(this.patternLockPadding) - Counter().padding(this.patternLockPadding) - Counter().padding(this.patternLockPadding) - Counter().padding(this.patternLockPadding) - Counter().padding(this.patternLockPadding) - Counter().padding(this.patternLockPadding) - Counter().padding(this.patternLockPadding) - Counter().padding(this.patternLockPadding) - Counter().padding(this.patternLockPadding) - Counter().padding(this.patternLockPadding) + PatternLock().padding(this.patternLockPadding) + PatternLock().padding(this.patternLockPadding) + PatternLock().padding(this.patternLockPadding) + PatternLock().padding(this.patternLockPadding) + PatternLock().padding(this.patternLockPadding) + PatternLock().padding(this.patternLockPadding) + PatternLock().padding(this.patternLockPadding) + PatternLock().padding(this.patternLockPadding) + PatternLock().padding(this.patternLockPadding) + PatternLock().padding(this.patternLockPadding) + PatternLock().padding(this.patternLockPadding) + PatternLock().padding(this.patternLockPadding) + PatternLock().padding(this.patternLockPadding) + PatternLock().padding(this.patternLockPadding) + PatternLock().padding(this.patternLockPadding) + PatternLock().padding(this.patternLockPadding) + PatternLock().padding(this.patternLockPadding) + PatternLock().padding(this.patternLockPadding) + PatternLock().padding(this.patternLockPadding) + PatternLock().padding(this.patternLockPadding) if (this.patternLockPadding == 30 && this.timeHelper.printTime(false)) { } diff --git a/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/Ability.test.ets b/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/Ability.test.ets index ff0b143eb39991366f2974eb3371306e57663aee..b07d9c927b37a949df53ca95393f0be41ec0c1f7 100644 --- a/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/Ability.test.ets +++ b/performance/arkui/benchMark_Component/entry/src/ohosTest/ets/test/Ability.test.ets @@ -54,7 +54,7 @@ export default function abilityTest() { /** * 拉起应用 */ - it(`Benchmark_StartAbility_001`, 0, async (done: Function) => { + it('Benchmark_StartAbility_001', 0, async (done: Function) => { hilog.info(0xF811, 'testTag', 'StartAbility_001 begin'); try { await abilityDelegatorRegistry.startAbility({ @@ -69,7 +69,7 @@ export default function abilityTest() { }) //点击首页Text - it(`TextBenchMarkTest`, 0, async () => { + it('TextBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('Text'); //创建Text组件 @@ -215,7 +215,7 @@ export default function abilityTest() { }) //点击首页GridRow - it(`GridRowBenchMarkTest`, 0, async () => { + it('GridRowBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('GridRow'); @@ -257,7 +257,7 @@ export default function abilityTest() { }) //点击首页GridCol - it(`GridColBenchMarkTest`, 0, async () => { + it('GridColBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('GridCol'); @@ -307,7 +307,7 @@ export default function abilityTest() { }) //点击首页TextInput - it(`TextInputBenchMarkTest`, 0, async () => { + it('TextInputBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('TextInput'); //创建TextInput组件 @@ -382,7 +382,7 @@ export default function abilityTest() { }) //点击首页Image - it(`ImageBenchMarkTest`, 0, async () => { + it('ImageBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('Image'); await checkButtonAndClickWithID('ImageCreate'); @@ -429,7 +429,7 @@ export default function abilityTest() { }) //点击首页Row - it(`RowBenchMarkTest`, 0, async () => { + it('RowBenchMarkTest', 0, async () => { await driver.delayMs(1000); await checkButtonAndClickWithID('Row'); //创建Row组件 @@ -478,7 +478,7 @@ export default function abilityTest() { }) //点击首页Column - it(`ColumnBenchMarkTest`, 0, async () => { + it('ColumnBenchMarkTest', 0, async () => { await driver.delayMs(1000); await checkButtonAndClickWithID('Column'); //创建Column组件 @@ -527,7 +527,7 @@ export default function abilityTest() { }) //点击首页List - it(`ListBenchMarkTest`, 0, async () => { + it('ListBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('List'); @@ -684,7 +684,7 @@ export default function abilityTest() { }) //点击首页Scroll - it(`ScrollBenchMarkTest`, 0, async () => { + it('ScrollBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('Scroll'); //创建Scroll组件 @@ -763,7 +763,7 @@ export default function abilityTest() { }) //点击首页Tab - it(`TabsBenchMarkTest`, 0, async () => { + it('TabsBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('Tabs'); //创建Tab组件 @@ -839,7 +839,7 @@ export default function abilityTest() { }) //点击首页Swiper - it(`SwiperBenchMarkTest`, 0, async () => { + it('SwiperBenchMarkTest', 0, async () => { await driver.delayMs(1000); await checkButtonAndClickWithID('Swiper'); await checkButtonAndClickWithID('SwiperCreateSample'); @@ -932,7 +932,7 @@ export default function abilityTest() { }) //点击首页Navigation - it(`NavigationBenchMarkTest`, 0, async () => { + it('NavigationBenchMarkTest', 0, async () => { await driver.delayMs(1000); await checkButtonAndClickWithID('Navigation'); await checkButtonAndClickWithID('NavigationCreateSample'); @@ -986,7 +986,7 @@ export default function abilityTest() { }) //点击首页Grid - it(`GridBenchMarkTest`, 0, async () => { + it('GridBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('Grid'); await checkButtonAndClickWithID('GridCreateSample'); @@ -1069,7 +1069,7 @@ export default function abilityTest() { }) //点击首页Video - it(`VideoBenchMarkTest`, 0, async () => { + it('VideoBenchMarkTest', 0, async () => { await driver.delayMs(1000); await checkButtonAndClickWithID('Video'); await checkButtonAndClickWithID('VideoCreateSample'); @@ -1095,7 +1095,7 @@ export default function abilityTest() { }) //点击首页Flex - it(`FlexBenchMarkTest`, 0, async () => { + it('FlexBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('Flex'); await checkButtonAndClickWithID('FlexCreateSample'); @@ -1151,7 +1151,7 @@ export default function abilityTest() { }) //点击首页Button - it(`ButtonBenchMarkTest`, 0, async () => { + it('ButtonBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('Button'); await checkButtonAndClickWithID('ButtonCreateSample'); @@ -1182,7 +1182,7 @@ export default function abilityTest() { }) //点击首页Select - it(`SelectBenchMarkTest`, 0, async () => { + it('SelectBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('Select'); //创建Select组件 @@ -1244,7 +1244,7 @@ export default function abilityTest() { }) //点击首页CheckBox - it(`CheckboxBenchMarkTest`, 0, async () => { + it('CheckboxBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('CheckBox'); //创建CheckBox组件 @@ -1290,7 +1290,7 @@ export default function abilityTest() { }) //点击首页Span - it(`SpanBenchMarkTest`, 0, async () => { + it('SpanBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('Span'); //Text内创建Span组件 @@ -1340,7 +1340,7 @@ export default function abilityTest() { }) //点击首页Slider - it(`SliderBenchMarkTest`, 0, async () => { + it('SliderBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('Slider'); //创建Slider组件 @@ -1409,7 +1409,7 @@ export default function abilityTest() { }) //点击首页Divider - it(`DividerBenchMarkTest`, 0, async () => { + it('DividerBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('Divider'); //创建Divider组件 @@ -1458,7 +1458,7 @@ export default function abilityTest() { }) //点击首页Toggle - it(`ToggleBenchMarkTest`, 0, async () => { + it('ToggleBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('Toggle'); await checkButtonAndClickWithID('ToggleCreateSample'); @@ -1498,7 +1498,7 @@ export default function abilityTest() { }) //点击首页Refresh - it(`RefreshBenchMarkTest`, 0, async () => { + it('RefreshBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('Refresh'); await driver.delayMs(1000); @@ -1561,7 +1561,7 @@ export default function abilityTest() { }) //点击首页TextArea - it(`TextAreaBenchMarkTest`, 0, async () => { + it('TextAreaBenchMarkTest', 0, async () => { await driver.delayMs(1000); await checkButtonAndClickWithID('TextArea'); await checkButtonAndClickWithID('TextAreaCreateSample'); @@ -1596,7 +1596,7 @@ export default function abilityTest() { }) //点击首页Search - it(`SearchBenchMarkTest`, 0, async () => { + it('SearchBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('Search'); await checkButtonAndClickWithID('SearchCreateSample'); @@ -1631,7 +1631,7 @@ export default function abilityTest() { }) //点击首页Progress - it(`ProgressBenchMarkTest`, 0, async () => { + it('ProgressBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('Progress'); await checkButtonAndClickWithID('ProgressCreateSample'); @@ -1671,7 +1671,7 @@ export default function abilityTest() { }) //点击首页Marquee - it(`MarqueeBenchMarkTest`, 0, async () => { + it('MarqueeBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('Marquee'); //创建Marquee组件 @@ -1709,7 +1709,7 @@ export default function abilityTest() { }) //点击首页DataPanel - it(`DataPanelBenchMarkTest`, 0, async () => { + it('DataPanelBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('DataPanel'); //创建DataPanel组件 @@ -1755,7 +1755,7 @@ export default function abilityTest() { }) //点击首页Rating - it(`RatingBenchMarkTest`, 0, async () => { + it('RatingBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('Rating'); //创建Rating组件 @@ -1801,7 +1801,7 @@ export default function abilityTest() { }) //点击首页TextClock - it(`TextClockBenchMarkTest`, 0, async () => { + it('TextClockBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('TextClock'); await checkButtonAndClickWithID('TextClockCreateSample'); @@ -1825,7 +1825,7 @@ export default function abilityTest() { }) //点击首页Hyperlink - it(`HyperlinkBenchMarkTest`, 0, async () => { + it('HyperlinkBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('Hyperlink'); await checkButtonAndClickWithID('HyperlinkCreateSample'); @@ -1846,7 +1846,7 @@ export default function abilityTest() { }) //点击首页QRCode 单元测试失败 - it(`QRCodeBenchMarkTest`, 0, async () => { + it('QRCodeBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('QRCode'); await checkButtonAndClickWithID('QRCodeCreateSample'); @@ -1872,7 +1872,7 @@ export default function abilityTest() { }) //点击首页Gauge - it(`GaugeBenchMarkTest`, 0, async () => { + it('GaugeBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('Gauge'); await checkButtonAndClickWithID('GaugeCreateSample'); @@ -1902,7 +1902,7 @@ export default function abilityTest() { }) //点击首页Badge - it(`BadgeBenchMarkTest`, 0, async () => { + it('BadgeBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('Badge'); //创建Badge组件 @@ -1932,7 +1932,7 @@ export default function abilityTest() { }) //点击首页AlphabetIndexer - it(`AlphabetIndexerBenchMarkTest`, 0, async () => { + it('AlphabetIndexerBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('AlphabetIndexer'); //创建AlphabetIndexerCreate组件 @@ -1967,7 +1967,7 @@ export default function abilityTest() { }) //点击首页Menu - it(`MenuBenchMarkTest`, 0, async () => { + it('MenuBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('Menu'); //创建Menu组件 @@ -2047,7 +2047,7 @@ export default function abilityTest() { }) //点击首页TextPicker - it(`TextPickerBenchMarkTest`, 0, async () => { + it('TextPickerBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('TextPicker'); //创建TextPicker组件 @@ -2107,7 +2107,7 @@ export default function abilityTest() { }) //点击首页Counter - it(`CounterBenchMarkTest`, 0, async () => { + it('CounterBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('Counter'); //创建Counter组件 @@ -2142,7 +2142,7 @@ export default function abilityTest() { }) //点击首页XComponent - it(`XComponentBenchMarkTest`, 0, async () => { + it('XComponentBenchMarkTest', 0, async () => { await driver.delayMs(1000); await checkButtonAndClickWithID('XComponent'); //创建XComponent组件 @@ -2153,7 +2153,7 @@ export default function abilityTest() { }) //点击首页PatternLock - it(`PatternLockBenchMarkTest`, 0, async () => { + it('PatternLockBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('PatternLock'); //创建PatternLock组件 @@ -2204,7 +2204,7 @@ export default function abilityTest() { }) //点击首页Shape - it(`ShapeBenchMarkTest`, 0, async () => { + it('ShapeBenchMarkTest', 0, async () => { await driver.delayMs(1000); await checkButtonAndClickWithID('Shape'); //创建Shape组件 @@ -2255,7 +2255,7 @@ export default function abilityTest() { }) //点击首页Path - it(`PathBenchMarkTest`, 0, async () => { + it('PathBenchMarkTest', 0, async () => { await driver.delayMs(1000); await checkButtonAndClickWithID('Path'); //创建Path组件 @@ -2306,7 +2306,7 @@ export default function abilityTest() { }) //点击首页Line - it(`LineBenchMarkTest`, 0, async () => { + it('LineBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('Line'); //创建Line组件 @@ -2357,7 +2357,7 @@ export default function abilityTest() { }) //点击首页Circle - it(`CircleBenchMarkTest`, 0, async () => { + it('CircleBenchMarkTest', 0, async () => { await driver.delayMs(1000); await checkButtonAndClickWithID('Circle'); await checkButtonAndClickWithID('CircleCreateSample'); @@ -2396,7 +2396,7 @@ export default function abilityTest() { }) //点击首页Polyline - it(`PolylineBenchMarkTest`, 0, async () => { + it('PolylineBenchMarkTest', 0, async () => { await driver.delayMs(1000); await checkButtonAndClickWithID('Polyline'); await checkButtonAndClickWithID('PolylineCreateSample'); @@ -2435,7 +2435,7 @@ export default function abilityTest() { }) //点击首页SideBarContainer - it(`SideBarContainerBenchMarkTest`, 0, async () => { + it('SideBarContainerBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('SideBarContainer'); await checkButtonAndClickWithID('SideBarContainerCreateSample'); @@ -2495,7 +2495,7 @@ export default function abilityTest() { }) //点击首页ImageAnimator - it(`ImageAnimatorBenchMarkTest`, 0, async () => { + it('ImageAnimatorBenchMarkTest', 0, async () => { await driver.delayMs(1000); await checkButtonAndClickWithID('ImageAnimator'); await checkButtonAndClickWithID('ImageAnimatorCreateSample'); @@ -2537,7 +2537,7 @@ export default function abilityTest() { }) //点击首页LoadingProgress - it(`LoadingProgressBenchMarkTest`, 0, async () => { + it('LoadingProgressBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('LoadingProgress'); await checkButtonAndClickWithID('LoadingProgressCreateSample'); @@ -2561,7 +2561,7 @@ export default function abilityTest() { }) //点击首页TextTimer - it(`TextTimerBenchMarkTest`, 0, async () => { + it('TextTimerBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('TextTimer'); await checkButtonAndClickWithID('TextTimerCreateSample'); @@ -2590,7 +2590,7 @@ export default function abilityTest() { }) //点击首页Blank - it(`BlankBenchMarkTest`, 0, async () => { + it('BlankBenchMarkTest', 0, async () => { await driver.delayMs(1000); await checkButtonAndClickWithID('Blank'); await checkButtonAndClickWithID('BlankCreateSample'); @@ -2614,7 +2614,7 @@ export default function abilityTest() { }) //点击首页Radio - it(`RadioBenchMarkTest`, 0, async () => { + it('RadioBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('Radio'); await checkButtonAndClickWithID('RadioCreateSample'); @@ -2635,7 +2635,7 @@ export default function abilityTest() { }) //点击首页ScrollBar - it(`ScrollBarBenchMarkTest`, 0, async () => { + it('ScrollBarBenchMarkTest', 0, async () => { await driver.delayMs(3000); await checkButtonAndClickWithID('ScrollBar'); await checkButtonAndClickWithID('ScrollBarCreateSample'); @@ -2661,6 +2661,5 @@ export default function abilityTest() { await pressBack(); await pressBack(); }) - }) } \ No newline at end of file