diff --git a/validator/acts_validator/signature/openharmony_sx.p7b b/validator/acts_validator/signature/openharmony_sx.p7b index 2deeb5e58386441796942f30d72e0379895bb626..bbfb213425e8f52841fc2c47ae4413ba9497c7a3 100644 Binary files a/validator/acts_validator/signature/openharmony_sx.p7b and b/validator/acts_validator/signature/openharmony_sx.p7b differ diff --git a/validator/acts_validator/src/main/ets/MainAbility/MainAbility.ts b/validator/acts_validator/src/main/ets/MainAbility/MainAbility.ts index 9280def8c712b01e1f359852ad867d35568c12b1..83b643fcaa2696b47f85b3ac214e09dff0510073 100644 --- a/validator/acts_validator/src/main/ets/MainAbility/MainAbility.ts +++ b/validator/acts_validator/src/main/ets/MainAbility/MainAbility.ts @@ -17,14 +17,15 @@ export default class MainAbility extends Ability { console.log("[Demo] MainAbility onWindowStageCreate") let AtManager = abilityAccessCtrl.createAtManager(); - AtManager.requestPermissionsFromUser(this.context,["ohos.permission.READ_MEDIA","ohos.permission.WRITE_MEDIA", - "ohos.permission.CAPTURE_SCREEN","ohos.permission.INTERNET","ohos.permission.CAMERA"]).then(() => {}) - windowStage.loadContent("pages/index", (err, data) => { + AtManager.requestPermissionsFromUser(this.context,['ohos.permission.READ_MEDIA', 'ohos.permission.WRITE_MEDIA', + 'ohos.permission.CAPTURE_SCREEN', 'ohos.permission.INTERNET', 'ohos.permission.CAMERA', + 'ohos.permission.MICROPHONE', 'ohos.permission.START_INVISIBLE_ABILITY']).then( () => {} ); + windowStage.loadContent('pages/index', (err, data) => { if (err.code) { - console.error('Failed to load the content. Cause:' + JSON.stringify(err)); + console.error( 'Failed to load the content. Cause:' + JSON.stringify(err) ); return; } - console.info('Succeeded in loading the content. Data: ' + JSON.stringify(data)) + console.info( 'Succeeded in loading the content. Data: ' + JSON.stringify(data) ); }); } diff --git a/validator/acts_validator/src/main/ets/pages/ArkUI/ArkUI_index.ets b/validator/acts_validator/src/main/ets/pages/ArkUI/ArkUI_index.ets index 6e2e40b2aad45de5e556126d8f476a80c481077d..80abc99161879e737f481087c1783603904076f1 100644 --- a/validator/acts_validator/src/main/ets/pages/ArkUI/ArkUI_index.ets +++ b/validator/acts_validator/src/main/ets/pages/ArkUI/ArkUI_index.ets @@ -26,8 +26,8 @@ let path1 = path + '/ArkUI'; let VarColor = []; let ColorBackPath = path + '/ArkUIColorBack.txt'; -let txtPath = path1 + 'ArkUIReport.txt'; -let xmlPath =path1 + 'ArkUITest.xml'; +let txtPath = path1 + '/ArkUIReport.txt'; +let xmlPath =path1 + '/ArkUITest.xml'; @Entry @Component @@ -298,23 +298,23 @@ struct IndexPage { serializer.setDeclaration(); serializer.startElement("testsuite"); serializer.setAttributes("name","ActsArkUITest"); - serializer.setAttributes("time", " "); + serializer.setAttributes("time", ""); serializer.setAttributes("errors", "0"); serializer.setAttributes("disabled", "0"); serializer.setAttributes("failures", failNum); - serializer.setAttributes("ignored", ignoreNum); + serializer.setAttributes("ignored", "0"); serializer.setAttributes("tests", testNum); - serializer.setAttributes("message", " "); + serializer.setAttributes("message", ""); serializer.setAttributes("modulename", "ActsArkUITest"); for (let i = 0; i < title.length; i++) { serializer.startElement("testcase"); serializer.setAttributes("name", String(title[i])); - serializer.setAttributes("status", " "); - serializer.setAttributes("time", " "); - serializer.setAttributes("classname", " "); + serializer.setAttributes("status", ""); + serializer.setAttributes("time", ""); + serializer.setAttributes("classname", ""); serializer.setAttributes("result", String(result[i])); - serializer.setAttributes("level", " "); - serializer.setAttributes("message", " "); + serializer.setAttributes("level", ""); + serializer.setAttributes("message", ""); serializer.endElement(); } serializer.endElement(); diff --git a/validator/acts_validator/src/main/ets/pages/Audio/Audio_index.ets b/validator/acts_validator/src/main/ets/pages/Audio/Audio_index.ets index a6aef172bec041f3c34d3da193c87913bd613d21..02728690de4f18aa4fb7e6ef7e91ba6a5a8d31ae 100644 --- a/validator/acts_validator/src/main/ets/pages/Audio/Audio_index.ets +++ b/validator/acts_validator/src/main/ets/pages/Audio/Audio_index.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-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 @@ -27,8 +27,8 @@ let path1 = path + '/Audio'; let VarColor = []; let ColorBackPath = path + '/AudioColorBack.txt'; -let txtPath = path1 + 'AudioReport.txt'; -let xmlPath =path1 + 'AudioTest.xml'; +let txtPath = path1 + '/AudioReport.txt'; +let xmlPath =path1 + '/AudioTest.xml'; @Entry @Component @@ -277,23 +277,23 @@ struct IndexPage { serializer.setDeclaration(); serializer.startElement("testsuite"); serializer.setAttributes("name","ActsAudioTest"); - serializer.setAttributes("time", " "); + serializer.setAttributes("time", ""); serializer.setAttributes("errors", "0"); serializer.setAttributes("disabled", "0"); serializer.setAttributes("failures", failNum); - serializer.setAttributes("ignored", ignoreNum); + serializer.setAttributes("ignored", "0"); serializer.setAttributes("tests", testNum); - serializer.setAttributes("message", " "); + serializer.setAttributes("message", ""); serializer.setAttributes("modulename", "ActsAudioTest"); for (let i = 0; i < title.length; i++) { serializer.startElement("testcase"); serializer.setAttributes("name", String(title[i])); - serializer.setAttributes("status", " "); - serializer.setAttributes("time", " "); - serializer.setAttributes("classname", " "); + serializer.setAttributes("status", ""); + serializer.setAttributes("time", ""); + serializer.setAttributes("classname", ""); serializer.setAttributes("result", String(result[i])); - serializer.setAttributes("level", " "); - serializer.setAttributes("message", " "); + serializer.setAttributes("level", ""); + serializer.setAttributes("message", ""); serializer.endElement(); } serializer.endElement(); diff --git a/validator/acts_validator/src/main/ets/pages/Camera/CameraFormat.ets b/validator/acts_validator/src/main/ets/pages/Camera/CameraFormat.ets index ccdd82d69ff3f438b49c0fbf1d4436fa46f37f43..b19ef842afbf7a80b56ef32263d31b41477c2466 100644 --- a/validator/acts_validator/src/main/ets/pages/Camera/CameraFormat.ets +++ b/validator/acts_validator/src/main/ets/pages/Camera/CameraFormat.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-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 diff --git a/validator/acts_validator/src/main/ets/pages/Camera/CameraVideo.ets b/validator/acts_validator/src/main/ets/pages/Camera/CameraVideo.ets index a32067f776cb1952387656f7ba1296c7f74a9193..40d0495eaf63818accf7da07d4dda86e1f0ae397 100644 --- a/validator/acts_validator/src/main/ets/pages/Camera/CameraVideo.ets +++ b/validator/acts_validator/src/main/ets/pages/Camera/CameraVideo.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-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 diff --git a/validator/acts_validator/src/main/ets/pages/Camera/Camera_index.ets b/validator/acts_validator/src/main/ets/pages/Camera/Camera_index.ets index 5da256360b75e9d9d80c673ce066dea3a7ef557d..d496a102d98eef1498cf270b9d1317793f037613 100644 --- a/validator/acts_validator/src/main/ets/pages/Camera/Camera_index.ets +++ b/validator/acts_validator/src/main/ets/pages/Camera/Camera_index.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-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 @@ -27,8 +27,8 @@ let path1 = path + '/Camera'; let VarColor = []; let ColorBackPath = path + '/CameraColorBack.txt'; -let txtPath = path1 + 'CameraReport.txt'; -let xmlPath = path1 + 'CameraTest.xml'; +let txtPath = path1 + '/CameraReport.txt'; +let xmlPath = path1 + '/CameraTest.xml'; @Entry @Component @@ -282,23 +282,23 @@ struct IndexPage { serializer.setDeclaration(); serializer.startElement("testsuite"); serializer.setAttributes("name", "ActsCameraTest"); - serializer.setAttributes("time", " "); + serializer.setAttributes("time", ""); serializer.setAttributes("errors", "0"); serializer.setAttributes("disabled", "0"); serializer.setAttributes("failures", failNum); - serializer.setAttributes("ignored", ignoreNum); + serializer.setAttributes("ignored", "0"); serializer.setAttributes("tests", testNum); - serializer.setAttributes("message", " "); + serializer.setAttributes("message", ""); serializer.setAttributes("modulename", "ActsCameraTest"); for (let i = 0; i < title.length; i++) { serializer.startElement("testcase"); serializer.setAttributes("name", String(title[i])); - serializer.setAttributes("status", " "); - serializer.setAttributes("time", " "); - serializer.setAttributes("classname", " "); + serializer.setAttributes("status", ""); + serializer.setAttributes("time", ""); + serializer.setAttributes("classname", ""); serializer.setAttributes("result", String(result[i])); - serializer.setAttributes("level", " "); - serializer.setAttributes("message", " "); + serializer.setAttributes("level", ""); + serializer.setAttributes("message", ""); serializer.endElement(); } serializer.endElement(); diff --git a/validator/acts_validator/src/main/ets/pages/Experience/DeskFps.ets b/validator/acts_validator/src/main/ets/pages/Experience/DeskFps.ets new file mode 100644 index 0000000000000000000000000000000000000000..756c21e5e634851700c46e9ce35f3cf2d63abee1 --- /dev/null +++ b/validator/acts_validator/src/main/ets/pages/Experience/DeskFps.ets @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2022-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 fileio from '@ohos.fileio'; +import {CustomContainer} from '../common/ExperienceCustomContainer'; +import FirstDialog from '../model/FirstDialog'; +import context from '@ohos.app.ability.common'; + +let abilityContext = getContext(this) as context.UIAbilityContext; +let path = globalThis.dir; +let Xpath = path + '/DeskFps.log' +@Entry +@Component +struct CustomContainerUser { + @State name: string = 'DeskFps'; + @State StepTips: string = '操作步骤:根据操作提示滑动系统桌面测试帧率'+'\n'+'预期结果:帧率高于54帧测试通过'; + @State Vue: boolean = false; + @State StartEnable: boolean = true; + @State Fps: string = '0'; + async aboutToAppear(){ + await FirstDialog.ChooseDialog(this.StepTips,this.name); + this.Vue = false; + } + + @Builder specificNoParam() { + Column() { + Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) { + Column(){ + Row(){ + Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n') + .fontColor(Color.White).fontSize('24fp') + } + Row(){ + Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + + `2.双击执行DeskFps.bat`+ '\n' + '\n' +`3.左右滑动系统桌面连续10s以上` + '\n' + '\n' + + '4.回到DeskFps测试项点击停止键' + '\n' + '\n' + `5.若测试最高帧率大于54帧则通过测试` + + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' ) + .fontColor(Color.White).fontSize('20fp') + } + Row(){ + Column(){ + Button(`开始`) + .borderRadius(8) + .backgroundColor(0x317aff) + .width('30%') + .enabled(this.StartEnable) + .opacity(this.StartEnable? 1 : 0.4) + .onClick(async () => { + this.StartEnable = !this.StartEnable; + let str = { + bundleName:"com.ohos.launcher", + abilityName: "com.ohos.launcher.MainAbility", + } + abilityContext.startAbility(str).then((data) => { + + }).catch((error) => { + + }) + }) + } + Column(){ + Button(`结束`) + .borderRadius(8) + .backgroundColor(0x317aff) + .width('30%') + .enabled(!this.StartEnable) + .opacity(!this.StartEnable? 1 : 0.4) + .onClick(() => { + this.StartEnable = !this.StartEnable + let fd = fileio.openSync(Xpath, 0o100 | 0o2002, 0o664); + let buf = new ArrayBuffer(4096); + fileio.readSync(fd,buf); + let report = String.fromCharCode.apply(null,new Uint8Array(buf)); + let head = report.indexOf(':'); + let end = report.indexOf('|'); + this.Fps = report.substring(head+1,end); + let num = Number(this.Fps) + if(num >= 54 ) { + this.Vue = true; + } + }) + } + } + Row(){ + Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `测试结果:` + this.Fps + '帧' ) + .fontColor(Color.White).fontSize('24fp') + } + } + + } + }.width('100%').height('80%').backgroundColor(Color.Black) + .justifyContent(FlexAlign.SpaceEvenly) + } + build() { + Column() { + CustomContainer({ + title: this.name, + Url:'pages/Experience/Experience_index', + StepTips:this.StepTips, + content: this.specificNoParam, + name:$name, + Vue: $Vue, + StartEnable: $StartEnable, + Fps: $Fps + }) + }.width('100%').height('100%').backgroundColor(Color.Black) + } +} diff --git a/validator/acts_validator/src/main/ets/pages/Experience/Experience_index.ets b/validator/acts_validator/src/main/ets/pages/Experience/Experience_index.ets index 104320b4aebdbee255da29f81bc0d47115d24944..82244242817ec4f537eeb496c3717ec5d47e39d4 100644 --- a/validator/acts_validator/src/main/ets/pages/Experience/Experience_index.ets +++ b/validator/acts_validator/src/main/ets/pages/Experience/Experience_index.ets @@ -27,8 +27,8 @@ let path1 = path + '/Experience'; let VarColor = []; let ColorBackPath = path + '/ExperienceColorBack.txt'; -let txtPath = path1 + 'ExperienceReport.txt'; -let xmlPath =path1 + 'ExperienceTest.xml'; +let txtPath = path1 + '/ExperienceReport.txt'; +let xmlPath =path1 + '/ExperienceTest.xml'; @Entry @Component @@ -39,7 +39,8 @@ struct IndexPage { @State result : string = ''; @State TEST : number = 0; private TestCaseList = [ - {title:'ScrollingList',uri:'pages/Experience/ScrollListTest'}, + {title:'DeskFps',uri:'pages/Experience/DeskFps'}, + {title:'PhotoFps',uri:'pages/Experience/PhotoFps'}, ] @State ColorObject : string[] = VarColor; async onPageShow(){ @@ -277,23 +278,23 @@ struct IndexPage { serializer.setDeclaration(); serializer.startElement("testsuite"); serializer.setAttributes("name","ActsExperienceTest"); - serializer.setAttributes("time", " "); + serializer.setAttributes("time", ""); serializer.setAttributes("errors", "0"); serializer.setAttributes("disabled", "0"); serializer.setAttributes("failures", failNum); - serializer.setAttributes("ignored", ignoreNum); + serializer.setAttributes("ignored", "0"); serializer.setAttributes("tests", testNum); - serializer.setAttributes("message", " "); + serializer.setAttributes("message", ""); serializer.setAttributes("modulename", "ActsExperienceTest"); for (let i = 0; i < title.length; i++) { serializer.startElement("testcase"); serializer.setAttributes("name", String(title[i])); - serializer.setAttributes("status", " "); - serializer.setAttributes("time", " "); - serializer.setAttributes("classname", " "); + serializer.setAttributes("status", ""); + serializer.setAttributes("time", ""); + serializer.setAttributes("classname", ""); serializer.setAttributes("result", String(result[i])); - serializer.setAttributes("level", " "); - serializer.setAttributes("message", " "); + serializer.setAttributes("level", ""); + serializer.setAttributes("message", ""); serializer.endElement(); } serializer.endElement(); diff --git a/validator/acts_validator/src/main/ets/pages/Experience/PhotoFps.ets b/validator/acts_validator/src/main/ets/pages/Experience/PhotoFps.ets new file mode 100644 index 0000000000000000000000000000000000000000..f8ac4805d29251ee35ea039f6db0958ca3256b1a --- /dev/null +++ b/validator/acts_validator/src/main/ets/pages/Experience/PhotoFps.ets @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2022-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 fileio from '@ohos.fileio'; +import {CustomContainer} from '../common/ExperienceCustomContainer'; +import FirstDialog from '../model/FirstDialog'; + +let path = globalThis.dir; +let Xpath = path + '/PhotoFps.log'; + +@Entry +@Component +struct CustomContainerUser { + @State name: string = 'PhotoFps'; + @State StepTips: string = '操作步骤:根据操作提示滑动图库测试帧率'+'\n'+'预期结果:帧率高于或等于54帧测试通过'; + @State Vue: boolean = false; + @State StartEnable: boolean = true; + @State Fps: string = '0'; + async aboutToAppear(){ + await FirstDialog.ChooseDialog(this.StepTips,this.name); + this.Vue = false; + } + + @Builder specificNoParam() { + Column() { + Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) { + Column(){ + Row(){ + Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n') + .fontColor(Color.White).fontSize('24fp') + } + Row(){ + Text(`测试步骤:`+ '\n' + '\n' +`1.在图库中预置500张图片`+ '\n' + '\n' +`2.点击开始键进入图库`+ '\n' + '\n' + + `3.双击执行PhotoFps.bat`+ '\n' + '\n' +`4.滑动图库缩略图界面连续10s以上` + '\n' + '\n' + + '5.回到PhotoFps测试项点击停止键' + '\n' + '\n' + `6.若测试最高帧率大于或等于54帧则通过测试` + + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' ) + .fontColor(Color.White).fontSize('20fp') + } + Row(){ + Column(){ + Button(`开始`) + .borderRadius(8) + .backgroundColor(0x317aff) + .width('30%') + .enabled(this.StartEnable) + .opacity(this.StartEnable? 1 : 0.4) + .onClick(async () => { + this.StartEnable = !this.StartEnable; + let bundleName=new String("com.ohos.photos").toString(); + let abilityName=new String("com.ohos.photos.MainAbility").toString(); + let str = { + "bundleName": bundleName, + "abilityName": abilityName, + "parameters": "" + } + + globalThis.abilityContext.startAbility(str, (err, data) => { + if(err) { + return; + } + }) + }) + } + Column(){ + Button(`结束`) + .borderRadius(8) + .backgroundColor(0x317aff) + .width('30%') + .enabled(!this.StartEnable) + .opacity(!this.StartEnable? 1 : 0.4) + .onClick(() => { + this.StartEnable = !this.StartEnable + let fd = fileio.openSync(Xpath, 0o100 | 0o2002, 0o664); + let buf = new ArrayBuffer(4096); + fileio.readSync(fd,buf); + let report = String.fromCharCode.apply(null,new Uint8Array(buf)); + let head = report.indexOf(':'); + let end = report.indexOf('|'); + this.Fps = report.substring(head+1,end); + let num = Number(this.Fps) + if(num >= 54) { + this.Vue = true; + } + }) + } + } + Row(){ + Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `测试结果:` + this.Fps + '帧' ) + .fontColor(Color.White).fontSize('24fp') + } + } + + } + }.width('100%').height('80%').backgroundColor(Color.Black) + .justifyContent(FlexAlign.SpaceEvenly) + } + build() { + Column() { + CustomContainer({ + title: this.name, + Url:'pages/Experience/Experience_index', + StepTips:this.StepTips, + content: this.specificNoParam, + name:$name, + Vue: $Vue, + StartEnable: $StartEnable, + Fps: $Fps + }) + }.width('100%').height('100%').backgroundColor(Color.Black) + } +} \ No newline at end of file diff --git a/validator/acts_validator/src/main/ets/pages/Player/Player_index.ets b/validator/acts_validator/src/main/ets/pages/Player/Player_index.ets index 6b87c47c38f34796e03aad2fec2dc9ca390ba992..16fbfcd652f200acd0fd96738a15a92636eced03 100644 --- a/validator/acts_validator/src/main/ets/pages/Player/Player_index.ets +++ b/validator/acts_validator/src/main/ets/pages/Player/Player_index.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-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 @@ -27,8 +27,8 @@ let path1 = path + '/Player'; let VarColor = []; let ColorBackPath = path + '/PlayerColorBack.txt'; -let txtPath = path1 + 'PlayerReport.txt'; -let xmlPath =path1 + 'PlayerTest.xml'; +let txtPath = path1 + '/PlayerReport.txt'; +let xmlPath =path1 + '/PlayerTest.xml'; @Entry @Component @@ -277,23 +277,23 @@ struct IndexPage { serializer.setDeclaration(); serializer.startElement("testsuite"); serializer.setAttributes("name","ActsPlayerTest"); - serializer.setAttributes("time", " "); + serializer.setAttributes("time", ""); serializer.setAttributes("errors", "0"); serializer.setAttributes("disabled", "0"); serializer.setAttributes("failures", failNum); - serializer.setAttributes("ignored", ignoreNum); + serializer.setAttributes("ignored", "0"); serializer.setAttributes("tests", testNum); - serializer.setAttributes("message", " "); + serializer.setAttributes("message", ""); serializer.setAttributes("modulename", "ActsPlayerTest"); for (let i = 0; i < title.length; i++) { serializer.startElement("testcase"); serializer.setAttributes("name", String(title[i])); - serializer.setAttributes("status", " "); - serializer.setAttributes("time", " "); - serializer.setAttributes("classname", " "); + serializer.setAttributes("status", ""); + serializer.setAttributes("time", ""); + serializer.setAttributes("classname", ""); serializer.setAttributes("result", String(result[i])); - serializer.setAttributes("level", " "); - serializer.setAttributes("message", " "); + serializer.setAttributes("level", ""); + serializer.setAttributes("message", ""); serializer.endElement(); } serializer.endElement(); diff --git a/validator/acts_validator/src/main/ets/pages/common/CameraOrientation.ets b/validator/acts_validator/src/main/ets/pages/common/CameraOrientation.ets index 44fb1188ed18a138be2b74c2ace6a2979cd8eb00..5139d40a5ae719fdc411c97a50f3ed476e3190b7 100644 --- a/validator/acts_validator/src/main/ets/pages/common/CameraOrientation.ets +++ b/validator/acts_validator/src/main/ets/pages/common/CameraOrientation.ets @@ -125,7 +125,7 @@ export struct CustomContainer { }; let name = this.name; let displayName = `${info.prefix}${name}${info.suffix}`; - let dirPath = path + '/' + displayName; + let dirPath = path + '/screenshot' + '/' + displayName; let imagePackerApi = image.createImagePacker(); let arrayBuffer = await imagePackerApi.packing(data, packOpts); let fd = fileio.openSync(dirPath,0o102,0o666); diff --git a/validator/acts_validator/src/main/ets/pages/common/CanvasCustomContainer1.ets b/validator/acts_validator/src/main/ets/pages/common/CanvasCustomContainer1.ets index 966c801a29888c0dd9c94e7798b54b0fd64e44f4..595f17aae05a98c6d15036c591fa4200a2913170 100644 --- a/validator/acts_validator/src/main/ets/pages/common/CanvasCustomContainer1.ets +++ b/validator/acts_validator/src/main/ets/pages/common/CanvasCustomContainer1.ets @@ -126,7 +126,7 @@ export struct CustomContainer { }; let name = this.name; let displayName = `${info.prefix}${name}${info.suffix}`; - let dirPath = path + '/' + displayName; + let dirPath = path + '/screenshot' + '/' + displayName; let imagePackerApi = image.createImagePacker(); let arrayBuffer = await imagePackerApi.packing(data, packOpts); let fd = fileio.openSync(dirPath,0o102,0o666); diff --git a/validator/acts_validator/src/main/ets/pages/common/CanvasCustomContainer2.ets b/validator/acts_validator/src/main/ets/pages/common/CanvasCustomContainer2.ets index 431aab946da03971a9a525f34aaaadd34a9963e8..320074bf1565941c4ca261d644f89ec12a97cf0f 100644 --- a/validator/acts_validator/src/main/ets/pages/common/CanvasCustomContainer2.ets +++ b/validator/acts_validator/src/main/ets/pages/common/CanvasCustomContainer2.ets @@ -128,7 +128,7 @@ export struct CustomContainer { }; let name = this.name; let displayName = `${info.prefix}${name}${info.suffix}`; - let dirPath = path + '/' + displayName; + let dirPath = path + '/screenshot' + '/' + displayName; let imagePackerApi = image.createImagePacker(); let arrayBuffer = await imagePackerApi.packing(data, packOpts); let fd = fileio.openSync(dirPath,0o102,0o666); diff --git a/validator/acts_validator/src/main/ets/pages/common/CustomContainer.ets b/validator/acts_validator/src/main/ets/pages/common/CustomContainer.ets index 45b9bb5b1d20b00ffde3aeb3bfb31a2d39f00144..9299f2bc2458eec14de50fd79c99cdfe5835dcbc 100644 --- a/validator/acts_validator/src/main/ets/pages/common/CustomContainer.ets +++ b/validator/acts_validator/src/main/ets/pages/common/CustomContainer.ets @@ -122,7 +122,7 @@ export struct CustomContainer { }; let name = this.name; let displayName = `${info.prefix}${name}${info.suffix}`; - let dirPath = path + '/' + displayName; + let dirPath = path + '/screenshot' + '/' + displayName; let imagePackerApi = image.createImagePacker(); let arrayBuffer = await imagePackerApi.packing(data, packOpts); let fd = fileio.openSync(dirPath,0o102,0o666); diff --git a/validator/acts_validator/src/main/ets/pages/common/CustomContainer2.ets b/validator/acts_validator/src/main/ets/pages/common/CustomContainer2.ets index 6fd227daba0024905c0bd34218e2fbff3312511f..f4c462cb9909e476390b1b4ed515162c67bddfa9 100644 --- a/validator/acts_validator/src/main/ets/pages/common/CustomContainer2.ets +++ b/validator/acts_validator/src/main/ets/pages/common/CustomContainer2.ets @@ -124,7 +124,7 @@ export struct CustomContainer { }; let name = this.name; let displayName = `${info.prefix}${name}${info.suffix}`; - let dirPath = path + '/' + displayName; + let dirPath = path + '/screenshot' + '/' + displayName; let imagePackerApi = image.createImagePacker(); let arrayBuffer = await imagePackerApi.packing(data, packOpts); let fd = fileio.openSync(dirPath,0o102,0o666); diff --git a/validator/acts_validator/src/main/ets/pages/common/CustomContainer3.ets b/validator/acts_validator/src/main/ets/pages/common/CustomContainer3.ets index 1b930fe678792ab38df392bf1974c26e15fdc6fa..ad04ea0b5014b6acb655501a6db7ee4d65e865fb 100644 --- a/validator/acts_validator/src/main/ets/pages/common/CustomContainer3.ets +++ b/validator/acts_validator/src/main/ets/pages/common/CustomContainer3.ets @@ -125,7 +125,7 @@ export struct CustomContainer { }; let name = this.name; let displayName = `${info.prefix}${name}${info.suffix}`; - let dirPath = path + '/' + displayName; + let dirPath = path + '/screenshot' + '/' + displayName; let imagePackerApi = image.createImagePacker(); let arrayBuffer = await imagePackerApi.packing(data, packOpts); let fd = fileio.openSync(dirPath,0o102,0o666); diff --git a/validator/acts_validator/src/main/ets/pages/common/CustomContainer4.ets b/validator/acts_validator/src/main/ets/pages/common/CustomContainer4.ets index f23f59316719793439ab068cdecde191b577dffc..02abcfff6498fd61c80f152be135b49f936ad50f 100644 --- a/validator/acts_validator/src/main/ets/pages/common/CustomContainer4.ets +++ b/validator/acts_validator/src/main/ets/pages/common/CustomContainer4.ets @@ -122,7 +122,7 @@ export struct CustomContainer { }; let name = this.name; let displayName = `${info.prefix}${name}${info.suffix}`; - let dirPath = path + '/' + displayName; + let dirPath = path + '/screenshot' + '/' + displayName; let imagePackerApi = image.createImagePacker(); let arrayBuffer = await imagePackerApi.packing(data, packOpts); let fd = fileio.openSync(dirPath,0o102,0o666); diff --git a/validator/acts_validator/src/main/ets/pages/common/CustomContainer5.ets b/validator/acts_validator/src/main/ets/pages/common/CustomContainer5.ets index f29cc4c521f993a4643cde094674cbd308ac3d1c..3ae81395e4c4027acc6853f3b68f7a53b7c1d8ca 100644 --- a/validator/acts_validator/src/main/ets/pages/common/CustomContainer5.ets +++ b/validator/acts_validator/src/main/ets/pages/common/CustomContainer5.ets @@ -126,7 +126,7 @@ export struct CustomContainer { }; let name = this.name; let displayName = `${info.prefix}${name}${info.suffix}`; - let dirPath = path + '/' + displayName; + let dirPath = path + '/screenshot' + '/' + displayName; let imagePackerApi = image.createImagePacker(); let arrayBuffer = await imagePackerApi.packing(data, packOpts); let fd = fileio.openSync(dirPath,0o102,0o666); diff --git a/validator/acts_validator/src/main/ets/pages/common/MediaCustomContainer.ets b/validator/acts_validator/src/main/ets/pages/common/ExperienceCustomContainer.ets similarity index 80% rename from validator/acts_validator/src/main/ets/pages/common/MediaCustomContainer.ets rename to validator/acts_validator/src/main/ets/pages/common/ExperienceCustomContainer.ets index 94de1f01b70bd3566da79157b646e68599bec3e0..53650d231fddf5be156fcec1e056c460ebfefee5 100644 --- a/validator/acts_validator/src/main/ets/pages/common/MediaCustomContainer.ets +++ b/validator/acts_validator/src/main/ets/pages/common/ExperienceCustomContainer.ets @@ -1,153 +1,165 @@ -/* - * Copyright (c) 2022 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 fileio from '@ohos.fileio'; -import prompt from '@ohos.prompt'; -import router from '@ohos.router'; -import screenshot from '@ohos.screenshot'; -import image from '@ohos.multimedia.image'; -import Logger from '../model/Logger'; -import mediaLibrary from '@ohos.multimedia.mediaLibrary'; - -let path = globalThis.dir; -const TAG = '[Screenshot]'; -@Component -export struct CustomContainer { - @Link FillColor: string; - @Link name: string; - Url : string = ''; - title : string = ''; - StepTips: string = ''; - @BuilderParam content: () => void; - @Builder - PassBtn(text: Resource, isFullScreen: boolean) { - Button() { - Image($r('app.media.ic_public_pass')).width('20vp').height('20vp') - }.width('30%').height('30vp').backgroundColor(Color.Grey) - .onClick(()=>{ - router.back({ - url:this.Url, - params: {result : 'Pass', title : this.name, - } - }) - this.getScreen(isFullScreen); - prompt.showToast({ - message: '通过', duration: 1000 - }); - }) - } - @Builder - FailBtn(text: Resource, isFullScreen: boolean) { - Button(){ - Image($r('app.media.ic_public_fail')).width('20vp').height('20vp') - }.width('30%').height('30vp').backgroundColor(Color.Grey) - .onClick(()=>{ - router.back({ - url:this.Url, - params: {result : 'Fail',title : this.name, - } - }) - this.getScreen(isFullScreen); - prompt.showToast({ - message: '失败', duration: 1000 - }); - }) - } - build() { - Column() { - Row() { - Button(){ - Image($r('app.media.ic_public_back')).width('20vp').height('18vp').margin({left:'20vp'}) - }.backgroundColor(Color.Black) - .onClick(()=>{ - router.back({ - url:this.Url, - params: {result : 'None',} - }) - }) - Text(this.title).fontColor(Color.White).fontSize('18fp').margin({left:'-20vp'}) - Text('hello').fontColor(Color.White).visibility(Visibility.Hidden) - }.backgroundColor(Color.Black).height('10%').width('100%').justifyContent(FlexAlign.SpaceBetween) - this.content(); - Blank() - Row() { - this.PassBtn($r('app.string.btn_fullscreen'), true); - Button(){ - Image($r('app.media.ic_public_help')).width('20vp').height('20vp') - }.width('30%').height('30vp').backgroundColor(Color.Grey) - .onClick(() =>{ - AlertDialog.show( - { - title:'操作提示', - message: this.StepTips, - confirm:{ - value:'OK', - action:()=>{ - } - } - } - ) - }) - this.FailBtn($r('app.string.btn_fullscreen'), true); - }.width('100%').justifyContent(FlexAlign.SpaceEvenly).backgroundColor(Color.Black) - }.height('98%').width('100%') - } - async savePicture(data: image.PixelMap, context: any) { - Logger.info(TAG, `savePicture`); - let packOpts: image.PackingOption = { - format: "image/jpeg", quality: 100 - }; - let info = { - prefix: 'IMG_', suffix: '.jpg', directory: mediaLibrary.DirectoryType.DIR_IMAGE - }; - let name = this.name; - let displayName = `${info.prefix}${name}${info.suffix}`; - let dirPath = path + '/' + displayName; - let imagePackerApi = image.createImagePacker(); - let arrayBuffer = await imagePackerApi.packing(data, packOpts); - let fd = fileio.openSync(dirPath,0o102,0o666); - imagePackerApi.release(); - try { - await fileio.write(fd, arrayBuffer); - } catch (err) { - Logger.error(`write failed, code is ${err.code}, message is ${err.message}`); - } - await fileio.close(fd); - Logger.info(TAG, `write done`); - } - getScreen = (isFullScreen: boolean) => { - let screenshotOptions: screenshot.ScreenshotOptions = { - screenRect: { left: 0, top: 0, width: 400, height: 400 }, - imageSize: { width: 400, height: 400 }, - rotation: 0, - displayId: 0 - }; - if (isFullScreen) { - screenshotOptions = { - rotation: 0 - } - } - try { - screenshot.save(screenshotOptions, (err, data: image.PixelMap) => { - if (err) { - Logger.info(TAG, `Failed to save the screenshot. Error:${JSON.stringify(err)}`); - } - Logger.info(TAG, 'save callback'); - this.savePicture(data, getContext(this) as any); - }) - } catch (err) { - Logger.error(`save failed, code is ${err.code}, message is ${err.message}`); - } - } -} +/* + * Copyright (c) 2022 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 prompt from '@ohos.prompt'; +import fileio from '@ohos.fileio'; +import router from '@ohos.router'; +import screenshot from '@ohos.screenshot'; +import image from '@ohos.multimedia.image'; +import Logger from '../model/Logger'; +import mediaLibrary from '@ohos.multimedia.mediaLibrary'; + +let path = globalThis.dir; + +const TAG = '[Screenshot]'; +@Component +export struct CustomContainer { + @Link name : string; + title : string = ''; + StepTips: string = ''; + Url : string = ''; + @Link StartEnable : boolean + @Link Vue : boolean; + @Link Fps : string; + @BuilderParam content: () => void; + @Builder + PassBtn(text: Resource, isFullScreen: boolean) { + if(this.Vue == false){ + Button({stateEffect:this.Vue}) { + Image($r('app.media.ic_public_pass')).width('20vp').height('20vp') + }.width('30%').height('30vp').backgroundColor(Color.Grey).opacity(0.4) + .onClick(()=>{ + + }) + } + else{ + Button({stateEffect:this.Vue}) { + Image($r('app.media.ic_public_pass')).width('20vp').height('20vp') + }.width('30%').height('30vp').backgroundColor(Color.Grey) + .onClick(()=>{ + router.back({ + url:this.Url, + params: {result : 'Pass', title : this.name, + } + }) + this.getScreen(isFullScreen); + prompt.showToast({ + message: '通过', duration: 1000 + }); + }) + } + } + @Builder + FailBtn(text: Resource, isFullScreen: boolean) { + Button(){ + Image($r('app.media.ic_public_fail')).width('20vp').height('20vp') + }.width('30%').height('30vp').backgroundColor(Color.Grey) + .onClick(()=>{ + router.back({ + url:this.Url, + params: {result : 'Fail',title : this.name, + } + }) + this.getScreen(isFullScreen); + prompt.showToast({ + message: '失败', duration: 1000 + }); + }) + } + build() { + Column() { + Row() { + Button(){ + Image($r('app.media.ic_public_back')).width('20vp').height('18vp').margin({left:'20vp'}) + }.backgroundColor(Color.Black) + .onClick(()=>{ + router.back({ + url:this.Url, + params: {result : 'None',} + }) + }) + Text(this.title).fontColor(Color.White).fontSize('18fp').margin({left:'-20vp'}) + Text('hello').fontColor(Color.White).visibility(Visibility.Hidden) + }.backgroundColor(Color.Black).height('10%').width('100%').justifyContent(FlexAlign.SpaceBetween) + this.content(); + Blank() + Row() { + this.PassBtn($r('app.string.btn_fullscreen'), true); + Button(){ + Image($r('app.media.ic_public_help')).width('20vp').height('20vp') + }.width('30%').height('30vp').backgroundColor(Color.Grey) + .onClick(() =>{ + AlertDialog.show({ + title:'操作提示', + message: this.StepTips, + confirm:{ + value:'OK', + action:()=>{ + } + } + }) + }) + this.FailBtn($r('app.string.btn_fullscreen'), true); + }.width('100%').justifyContent(FlexAlign.SpaceEvenly).backgroundColor(Color.Black) + }.height('98%').width('100%') + } + async savePicture(data: image.PixelMap, context: any) { + Logger.info(TAG, `savePicture`); + let packOpts: image.PackingOption = { + format: "image/jpeg", quality: 100 + }; + let info = { + prefix: 'IMG_', suffix: '.jpg', directory: mediaLibrary.DirectoryType.DIR_IMAGE + }; + let name = this.name; + let displayName = `${info.prefix}${name}${info.suffix}`; + let dirPath = path + '/screenshot' + '/' + displayName; + let imagePackerApi = image.createImagePacker(); + let arrayBuffer = await imagePackerApi.packing(data, packOpts); + let fd = fileio.openSync(dirPath,0o102,0o666); + imagePackerApi.release(); + try { + await fileio.write(fd, arrayBuffer); + } catch (err) { + Logger.error(`write failed, code is ${err.code}, message is ${err.message}`); + } + await fileio.close(fd); + Logger.info(TAG, `write done`); + + } + getScreen = (isFullScreen: boolean) => { + let screenshotOptions: screenshot.ScreenshotOptions = { + screenRect: { left: 0, top: 0, width: 400, height: 400 }, + imageSize: { width: 400, height: 400 }, + rotation: 0, + displayId: 0 + }; + if (isFullScreen) { + screenshotOptions = { + rotation: 0 + } + } + try { + screenshot.save(screenshotOptions, (err, data: image.PixelMap) => { + if (err) { + Logger.info(TAG, `Failed to save the screenshot. Error:${JSON.stringify(err)}`); + } + Logger.info(TAG, 'save callback'); + this.savePicture(data, getContext(this) as any); + }) + } catch (err) { + Logger.error(`save failed, code is ${err.code}, message is ${err.message}`); + } + } +} diff --git a/validator/acts_validator/src/main/ets/pages/index.ets b/validator/acts_validator/src/main/ets/pages/index.ets index 2bf81aa2d17758a1ca5fcd48116cf71ba7ee7488..2faa930076f14c0c43f9130838b8034217df7ad8 100644 --- a/validator/acts_validator/src/main/ets/pages/index.ets +++ b/validator/acts_validator/src/main/ets/pages/index.ets @@ -29,6 +29,7 @@ let path2 = path + '/Audio'; let path3 = path + '/Camera'; let path4 = path + '/Player'; let path5 = path + '/Experience'; +let picturePath = path + '/screenshot'; let ArkUIColorBackPath = path + '/ArkUIColorBack.txt'; let AudioColorBackPath = path + '/AudioColorBack.txt'; let CameraColorBackPath = path + '/CameraColorBack.txt'; @@ -81,6 +82,7 @@ struct IndexPage { fileio.mkdirSync(path3); fileio.mkdirSync(path4); fileio.mkdirSync(path5); + fileio.mkdirSync(picturePath); let promise = preferences.put('index', 1); promise.then(() => { @@ -198,6 +200,8 @@ struct IndexPage { fileio.unlinkSync(CameraColorBackPath); fileio.unlinkSync(PlayerColorBackPath); fileio.unlinkSync(ExperienceColorBackPath); + fileio.rmdirSync(picturePath); + fileio.mkdirSync(picturePath); fileio.openSync(TimePath, 0o100 | 0o2002, 0o664); fileio.openSync(xmlPath, 0o100 | 0o2002, 0o664); fileio.openSync(path11, 0o100 | 0o2002, 0o664); @@ -438,33 +442,33 @@ struct IndexPage { serializer.setAttributes("disabled", "0"); serializer.setAttributes("failures", failNum); serializer.setAttributes("tests", testNum); - serializer.setAttributes("ignored", ignoreNum); + serializer.setAttributes("ignored", "0"); serializer.setAttributes("unavailable", "0"); serializer.setAttributes("productinfo", "{ }"); - serializer.setAttributes("modules", " "); - serializer.setAttributes("runmodules", " "); + serializer.setAttributes("modules", ""); + serializer.setAttributes("runmodules", ""); /* * ArkUI */ serializer.startElement("testsuite"); serializer.setAttributes("name", "ActsArkUITest"); - serializer.setAttributes("time", " "); + serializer.setAttributes("time", ""); serializer.setAttributes("errors", "0"); serializer.setAttributes("disabled", "0"); serializer.setAttributes("failures", ArkuiFailNum); - serializer.setAttributes("ignored", ArkUIIgnoreNum); + serializer.setAttributes("ignored", "0"); serializer.setAttributes("tests", ArkuiTestNum); - serializer.setAttributes("message", " "); + serializer.setAttributes("message", ""); serializer.setAttributes("modulename", "ActsArkUITest"); for (let i = 0; i < title1.length; i++) { serializer.startElement("testcase"); serializer.setAttributes("name", String(title1[i])); - serializer.setAttributes("status", " "); - serializer.setAttributes("time", " "); - serializer.setAttributes("classname", " "); + serializer.setAttributes("status", ""); + serializer.setAttributes("time", ""); + serializer.setAttributes("classname", ""); serializer.setAttributes("result", String(result1[i])); - serializer.setAttributes("level", " "); - serializer.setAttributes("message", " "); + serializer.setAttributes("level", ""); + serializer.setAttributes("message", ""); serializer.endElement(); } serializer.endElement(); @@ -473,23 +477,23 @@ struct IndexPage { */ serializer.startElement("testsuite"); serializer.setAttributes("name", "ActsAudioTest"); - serializer.setAttributes("time", " "); + serializer.setAttributes("time", ""); serializer.setAttributes("errors", "0"); serializer.setAttributes("disabled", "0"); serializer.setAttributes("failures", audioFailNum); - serializer.setAttributes("ignored", AudioIgnoreNum); + serializer.setAttributes("ignored", "0"); serializer.setAttributes("tests", audioTestNum); - serializer.setAttributes("message", " "); + serializer.setAttributes("message", ""); serializer.setAttributes("modulename", "ActsAudioTest"); for (let i = 0; i < title2.length; i++) { serializer.startElement("testcase"); serializer.setAttributes("name", String(title2[i])); - serializer.setAttributes("status", " "); - serializer.setAttributes("time", " "); - serializer.setAttributes("classname", " "); + serializer.setAttributes("status", ""); + serializer.setAttributes("time", ""); + serializer.setAttributes("classname", ""); serializer.setAttributes("result", String(result2[i])); - serializer.setAttributes("level", " "); - serializer.setAttributes("message", " "); + serializer.setAttributes("level", ""); + serializer.setAttributes("message", ""); serializer.endElement(); } serializer.endElement(); @@ -498,23 +502,23 @@ struct IndexPage { */ serializer.startElement("testsuite"); serializer.setAttributes("name", "ActsCameraTest"); - serializer.setAttributes("time", " "); + serializer.setAttributes("time", ""); serializer.setAttributes("errors", "0"); serializer.setAttributes("disabled", "0"); serializer.setAttributes("failures", cameraFailNum); - serializer.setAttributes("ignored", CameraIgnoreNum); + serializer.setAttributes("ignored", "0"); serializer.setAttributes("tests", cameraTestNum); - serializer.setAttributes("message", " "); + serializer.setAttributes("message", ""); serializer.setAttributes("modulename", "ActsCameraTest"); for (let i = 0; i < title2.length; i++) { serializer.startElement("testcase"); serializer.setAttributes("name", String(title3[i])); - serializer.setAttributes("status", " "); - serializer.setAttributes("time", " "); - serializer.setAttributes("classname", " "); + serializer.setAttributes("status", ""); + serializer.setAttributes("time", ""); + serializer.setAttributes("classname", ""); serializer.setAttributes("result", String(result3[i])); - serializer.setAttributes("level", " "); - serializer.setAttributes("message", " "); + serializer.setAttributes("level", ""); + serializer.setAttributes("message", ""); serializer.endElement(); } serializer.endElement(); @@ -523,23 +527,23 @@ struct IndexPage { */ serializer.startElement("testsuite"); serializer.setAttributes("name", "ActsPlayerTest"); - serializer.setAttributes("time", " "); + serializer.setAttributes("time", ""); serializer.setAttributes("errors", "0"); serializer.setAttributes("disabled", "0"); serializer.setAttributes("failures", playerFailNum); - serializer.setAttributes("ignored", PlayerIgnoreNum); + serializer.setAttributes("ignored", "0"); serializer.setAttributes("tests", playerTestNum); - serializer.setAttributes("message", " "); + serializer.setAttributes("message", ""); serializer.setAttributes("modulename", "ActsPlayerTest"); for (let i = 0; i < title2.length; i++) { serializer.startElement("testcase"); serializer.setAttributes("name", String(title4[i])); - serializer.setAttributes("status", " "); - serializer.setAttributes("time", " "); - serializer.setAttributes("classname", " "); + serializer.setAttributes("status", ""); + serializer.setAttributes("time", ""); + serializer.setAttributes("classname", ""); serializer.setAttributes("result", String(result4[i])); - serializer.setAttributes("level", " "); - serializer.setAttributes("message", " "); + serializer.setAttributes("level", ""); + serializer.setAttributes("message", ""); serializer.endElement(); } serializer.endElement(); @@ -548,23 +552,23 @@ struct IndexPage { */ serializer.startElement("testsuite"); serializer.setAttributes("name", "ActsExperienceTest"); - serializer.setAttributes("time", " "); + serializer.setAttributes("time", ""); serializer.setAttributes("errors", "0"); serializer.setAttributes("disabled", "0"); serializer.setAttributes("failures", experienceFailNum); - serializer.setAttributes("ignored", ExperienceIgnoreNum); + serializer.setAttributes("ignored", "0"); serializer.setAttributes("tests", experienceTestNum); - serializer.setAttributes("message", " "); + serializer.setAttributes("message", ""); serializer.setAttributes("modulename", "ActsExperienceTest"); for (let i = 0; i < title2.length; i++) { serializer.startElement("testcase"); serializer.setAttributes("name", String(title5[i])); - serializer.setAttributes("status", " "); - serializer.setAttributes("time", " "); - serializer.setAttributes("classname", " "); + serializer.setAttributes("status", ""); + serializer.setAttributes("time", ""); + serializer.setAttributes("classname", ""); serializer.setAttributes("result", String(result5[i])); - serializer.setAttributes("level", " "); - serializer.setAttributes("message", " "); + serializer.setAttributes("level", ""); + serializer.setAttributes("message", ""); serializer.endElement(); } serializer.endElement(); diff --git a/validator/acts_validator/src/main/ets/pages/model/FlushData.ets b/validator/acts_validator/src/main/ets/pages/model/FlushData.ets index e28093418cd22b52cd8cf93d72e230f4c0085b20..d0fba05a050a64c49de500071c0fb96b8e142f40 100644 --- a/validator/acts_validator/src/main/ets/pages/model/FlushData.ets +++ b/validator/acts_validator/src/main/ets/pages/model/FlushData.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-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 diff --git a/validator/acts_validator/src/main/module.json b/validator/acts_validator/src/main/module.json index 48716010dd31a879e7fb2d7f608aa2e1663e195a..88ba7ad9c1a93fa51e2ef11eb6e56e144c04493c 100644 --- a/validator/acts_validator/src/main/module.json +++ b/validator/acts_validator/src/main/module.json @@ -53,6 +53,12 @@ }, { "name": "ohos.permission.CAMERA" + }, + { + "name": "ohos.permission.MICROPHONE" + }, + { + "name": "ohos.permission.START_INVISIBLE_ABILITY" } ] } diff --git a/validator/acts_validator/src/main/resources/base/profile/main_pages.json b/validator/acts_validator/src/main/resources/base/profile/main_pages.json index ec032756899922e9ca44d3fbfb89466a1039401b..75715250c0a1d97d65e4e7b229638d0ae2936f88 100644 --- a/validator/acts_validator/src/main/resources/base/profile/main_pages.json +++ b/validator/acts_validator/src/main/resources/base/profile/main_pages.json @@ -38,6 +38,7 @@ "pages/Player/Player_index", "pages/Player/ScrollListTest", "pages/Experience/Experience_index", - "pages/Experience/ScrollListTest" + "pages/Experience/PhotoFps", + "pages/Experience/DeskFps" ] }