未验证 提交 85fa4131 编写于 作者: O openharmony_ci 提交者: Gitee

!7924 validator修改提交1018分支

Merge pull request !7924 from 田文哲/monthly_20221018
...@@ -17,14 +17,15 @@ export default class MainAbility extends Ability { ...@@ -17,14 +17,15 @@ export default class MainAbility extends Ability {
console.log("[Demo] MainAbility onWindowStageCreate") console.log("[Demo] MainAbility onWindowStageCreate")
let AtManager = abilityAccessCtrl.createAtManager(); let AtManager = abilityAccessCtrl.createAtManager();
AtManager.requestPermissionsFromUser(this.context,["ohos.permission.READ_MEDIA","ohos.permission.WRITE_MEDIA", AtManager.requestPermissionsFromUser(this.context,['ohos.permission.READ_MEDIA', 'ohos.permission.WRITE_MEDIA',
"ohos.permission.CAPTURE_SCREEN","ohos.permission.INTERNET","ohos.permission.CAMERA"]).then(() => {}) 'ohos.permission.CAPTURE_SCREEN', 'ohos.permission.INTERNET', 'ohos.permission.CAMERA',
windowStage.loadContent("pages/index", (err, data) => { 'ohos.permission.MICROPHONE', 'ohos.permission.START_INVISIBLE_ABILITY']).then( () => {} );
windowStage.loadContent('pages/index', (err, data) => {
if (err.code) { 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; return;
} }
console.info('Succeeded in loading the content. Data: ' + JSON.stringify(data)) console.info( 'Succeeded in loading the content. Data: ' + JSON.stringify(data) );
}); });
} }
......
...@@ -26,8 +26,8 @@ let path1 = path + '/ArkUI'; ...@@ -26,8 +26,8 @@ let path1 = path + '/ArkUI';
let VarColor = []; let VarColor = [];
let ColorBackPath = path + '/ArkUIColorBack.txt'; let ColorBackPath = path + '/ArkUIColorBack.txt';
let txtPath = path1 + 'ArkUIReport.txt'; let txtPath = path1 + '/ArkUIReport.txt';
let xmlPath =path1 + 'ArkUITest.xml'; let xmlPath =path1 + '/ArkUITest.xml';
@Entry @Entry
@Component @Component
...@@ -298,23 +298,23 @@ struct IndexPage { ...@@ -298,23 +298,23 @@ struct IndexPage {
serializer.setDeclaration(); serializer.setDeclaration();
serializer.startElement("testsuite"); serializer.startElement("testsuite");
serializer.setAttributes("name","ActsArkUITest"); serializer.setAttributes("name","ActsArkUITest");
serializer.setAttributes("time", " "); serializer.setAttributes("time", "");
serializer.setAttributes("errors", "0"); serializer.setAttributes("errors", "0");
serializer.setAttributes("disabled", "0"); serializer.setAttributes("disabled", "0");
serializer.setAttributes("failures", failNum); serializer.setAttributes("failures", failNum);
serializer.setAttributes("ignored", ignoreNum); serializer.setAttributes("ignored", "0");
serializer.setAttributes("tests", testNum); serializer.setAttributes("tests", testNum);
serializer.setAttributes("message", " "); serializer.setAttributes("message", "");
serializer.setAttributes("modulename", "ActsArkUITest"); serializer.setAttributes("modulename", "ActsArkUITest");
for (let i = 0; i < title.length; i++) { for (let i = 0; i < title.length; i++) {
serializer.startElement("testcase"); serializer.startElement("testcase");
serializer.setAttributes("name", String(title[i])); serializer.setAttributes("name", String(title[i]));
serializer.setAttributes("status", " "); serializer.setAttributes("status", "");
serializer.setAttributes("time", " "); serializer.setAttributes("time", "");
serializer.setAttributes("classname", " "); serializer.setAttributes("classname", "");
serializer.setAttributes("result", String(result[i])); serializer.setAttributes("result", String(result[i]));
serializer.setAttributes("level", " "); serializer.setAttributes("level", "");
serializer.setAttributes("message", " "); serializer.setAttributes("message", "");
serializer.endElement(); serializer.endElement();
} }
serializer.endElement(); serializer.endElement();
......
...@@ -27,8 +27,8 @@ let path1 = path + '/Audio'; ...@@ -27,8 +27,8 @@ let path1 = path + '/Audio';
let VarColor = []; let VarColor = [];
let ColorBackPath = path + '/AudioColorBack.txt'; let ColorBackPath = path + '/AudioColorBack.txt';
let txtPath = path1 + 'AudioReport.txt'; let txtPath = path1 + '/AudioReport.txt';
let xmlPath =path1 + 'AudioTest.xml'; let xmlPath =path1 + '/AudioTest.xml';
@Entry @Entry
@Component @Component
...@@ -277,23 +277,23 @@ struct IndexPage { ...@@ -277,23 +277,23 @@ struct IndexPage {
serializer.setDeclaration(); serializer.setDeclaration();
serializer.startElement("testsuite"); serializer.startElement("testsuite");
serializer.setAttributes("name","ActsAudioTest"); serializer.setAttributes("name","ActsAudioTest");
serializer.setAttributes("time", " "); serializer.setAttributes("time", "");
serializer.setAttributes("errors", "0"); serializer.setAttributes("errors", "0");
serializer.setAttributes("disabled", "0"); serializer.setAttributes("disabled", "0");
serializer.setAttributes("failures", failNum); serializer.setAttributes("failures", failNum);
serializer.setAttributes("ignored", ignoreNum); serializer.setAttributes("ignored", "0");
serializer.setAttributes("tests", testNum); serializer.setAttributes("tests", testNum);
serializer.setAttributes("message", " "); serializer.setAttributes("message", "");
serializer.setAttributes("modulename", "ActsAudioTest"); serializer.setAttributes("modulename", "ActsAudioTest");
for (let i = 0; i < title.length; i++) { for (let i = 0; i < title.length; i++) {
serializer.startElement("testcase"); serializer.startElement("testcase");
serializer.setAttributes("name", String(title[i])); serializer.setAttributes("name", String(title[i]));
serializer.setAttributes("status", " "); serializer.setAttributes("status", "");
serializer.setAttributes("time", " "); serializer.setAttributes("time", "");
serializer.setAttributes("classname", " "); serializer.setAttributes("classname", "");
serializer.setAttributes("result", String(result[i])); serializer.setAttributes("result", String(result[i]));
serializer.setAttributes("level", " "); serializer.setAttributes("level", "");
serializer.setAttributes("message", " "); serializer.setAttributes("message", "");
serializer.endElement(); serializer.endElement();
} }
serializer.endElement(); serializer.endElement();
......
/* /*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import camera from '@ohos.multimedia.camera' import camera from '@ohos.multimedia.camera'
import Logger from '../model/Logger' import Logger from '../model/Logger'
import CameraService from '../model/CameraService' import CameraService from '../model/CameraService'
......
/* /*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import camera from '@ohos.multimedia.camera' import camera from '@ohos.multimedia.camera'
import Logger from '../model/Logger' import Logger from '../model/Logger'
import CameraService from '../model/CameraService' import CameraService from '../model/CameraService'
......
/* /*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import camera from '@ohos.multimedia.camera' import camera from '@ohos.multimedia.camera'
import Logger from '../model/Logger' import Logger from '../model/Logger'
import CameraService from '../model/CameraService' import CameraService from '../model/CameraService'
......
/* /*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import camera from '@ohos.multimedia.camera' import camera from '@ohos.multimedia.camera'
import Logger from '../model/Logger' import Logger from '../model/Logger'
import CameraService from '../model/CameraService' import CameraService from '../model/CameraService'
......
/* /*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import camera from '@ohos.multimedia.camera' import camera from '@ohos.multimedia.camera'
import Logger from '../model/Logger' import Logger from '../model/Logger'
import CameraService from '../model/CameraService' import CameraService from '../model/CameraService'
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import camera from '@ohos.multimedia.camera' import camera from '@ohos.multimedia.camera'
import Logger from '../model/Logger' import Logger from '../model/Logger'
import CameraService from '../model/CameraService' import CameraService from '../model/CameraService'
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import prompt from '@ohos.prompt'; import prompt from '@ohos.prompt';
import router from '@ohos.router'; import router from '@ohos.router';
import fileio from '@ohos.fileio'; import fileio from '@ohos.fileio';
...@@ -26,8 +27,8 @@ let path1 = path + '/Camera'; ...@@ -26,8 +27,8 @@ let path1 = path + '/Camera';
let VarColor = []; let VarColor = [];
let ColorBackPath = path + '/CameraColorBack.txt'; let ColorBackPath = path + '/CameraColorBack.txt';
let txtPath = path1 + 'CameraReport.txt'; let txtPath = path1 + '/CameraReport.txt';
let xmlPath = path1 + 'CameraTest.xml'; let xmlPath = path1 + '/CameraTest.xml';
@Entry @Entry
@Component @Component
...@@ -281,23 +282,23 @@ struct IndexPage { ...@@ -281,23 +282,23 @@ struct IndexPage {
serializer.setDeclaration(); serializer.setDeclaration();
serializer.startElement("testsuite"); serializer.startElement("testsuite");
serializer.setAttributes("name", "ActsCameraTest"); serializer.setAttributes("name", "ActsCameraTest");
serializer.setAttributes("time", " "); serializer.setAttributes("time", "");
serializer.setAttributes("errors", "0"); serializer.setAttributes("errors", "0");
serializer.setAttributes("disabled", "0"); serializer.setAttributes("disabled", "0");
serializer.setAttributes("failures", failNum); serializer.setAttributes("failures", failNum);
serializer.setAttributes("ignored", ignoreNum); serializer.setAttributes("ignored", "0");
serializer.setAttributes("tests", testNum); serializer.setAttributes("tests", testNum);
serializer.setAttributes("message", " "); serializer.setAttributes("message", "");
serializer.setAttributes("modulename", "ActsCameraTest"); serializer.setAttributes("modulename", "ActsCameraTest");
for (let i = 0; i < title.length; i++) { for (let i = 0; i < title.length; i++) {
serializer.startElement("testcase"); serializer.startElement("testcase");
serializer.setAttributes("name", String(title[i])); serializer.setAttributes("name", String(title[i]));
serializer.setAttributes("status", " "); serializer.setAttributes("status", "");
serializer.setAttributes("time", " "); serializer.setAttributes("time", "");
serializer.setAttributes("classname", " "); serializer.setAttributes("classname", "");
serializer.setAttributes("result", String(result[i])); serializer.setAttributes("result", String(result[i]));
serializer.setAttributes("level", " "); serializer.setAttributes("level", "");
serializer.setAttributes("message", " "); serializer.setAttributes("message", "");
serializer.endElement(); serializer.endElement();
} }
serializer.endElement(); serializer.endElement();
......
/*
* 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)
}
}
/* /*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import prompt from '@ohos.prompt'; import prompt from '@ohos.prompt';
import router from '@ohos.router'; import router from '@ohos.router';
import fileio from '@ohos.fileio'; import fileio from '@ohos.fileio';
...@@ -26,8 +27,8 @@ let path1 = path + '/Experience'; ...@@ -26,8 +27,8 @@ let path1 = path + '/Experience';
let VarColor = []; let VarColor = [];
let ColorBackPath = path + '/ExperienceColorBack.txt'; let ColorBackPath = path + '/ExperienceColorBack.txt';
let txtPath = path1 + 'ExperienceReport.txt'; let txtPath = path1 + '/ExperienceReport.txt';
let xmlPath =path1 + 'ExperienceTest.xml'; let xmlPath =path1 + '/ExperienceTest.xml';
@Entry @Entry
@Component @Component
...@@ -38,7 +39,8 @@ struct IndexPage { ...@@ -38,7 +39,8 @@ struct IndexPage {
@State result : string = ''; @State result : string = '';
@State TEST : number = 0; @State TEST : number = 0;
private TestCaseList = [ private TestCaseList = [
{title:'ScrollingList',uri:'pages/Experience/ScrollListTest'}, {title:'DeskFps',uri:'pages/Experience/DeskFps'},
{title:'PhotoFps',uri:'pages/Experience/PhotoFps'},
] ]
@State ColorObject : string[] = VarColor; @State ColorObject : string[] = VarColor;
async onPageShow(){ async onPageShow(){
...@@ -276,23 +278,23 @@ struct IndexPage { ...@@ -276,23 +278,23 @@ struct IndexPage {
serializer.setDeclaration(); serializer.setDeclaration();
serializer.startElement("testsuite"); serializer.startElement("testsuite");
serializer.setAttributes("name","ActsExperienceTest"); serializer.setAttributes("name","ActsExperienceTest");
serializer.setAttributes("time", " "); serializer.setAttributes("time", "");
serializer.setAttributes("errors", "0"); serializer.setAttributes("errors", "0");
serializer.setAttributes("disabled", "0"); serializer.setAttributes("disabled", "0");
serializer.setAttributes("failures", failNum); serializer.setAttributes("failures", failNum);
serializer.setAttributes("ignored", ignoreNum); serializer.setAttributes("ignored", "0");
serializer.setAttributes("tests", testNum); serializer.setAttributes("tests", testNum);
serializer.setAttributes("message", " "); serializer.setAttributes("message", "");
serializer.setAttributes("modulename", "ActsExperienceTest"); serializer.setAttributes("modulename", "ActsExperienceTest");
for (let i = 0; i < title.length; i++) { for (let i = 0; i < title.length; i++) {
serializer.startElement("testcase"); serializer.startElement("testcase");
serializer.setAttributes("name", String(title[i])); serializer.setAttributes("name", String(title[i]));
serializer.setAttributes("status", " "); serializer.setAttributes("status", "");
serializer.setAttributes("time", " "); serializer.setAttributes("time", "");
serializer.setAttributes("classname", " "); serializer.setAttributes("classname", "");
serializer.setAttributes("result", String(result[i])); serializer.setAttributes("result", String(result[i]));
serializer.setAttributes("level", " "); serializer.setAttributes("level", "");
serializer.setAttributes("message", " "); serializer.setAttributes("message", "");
serializer.endElement(); serializer.endElement();
} }
serializer.endElement(); serializer.endElement();
......
/*
* 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
/* /*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import {CustomContainer} from '../common/CustomContainer'; import {CustomContainer} from '../common/CustomContainer';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
@Entry @Entry
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import prompt from '@ohos.prompt'; import prompt from '@ohos.prompt';
import router from '@ohos.router'; import router from '@ohos.router';
import fileio from '@ohos.fileio'; import fileio from '@ohos.fileio';
...@@ -26,8 +27,8 @@ let path1 = path + '/Player'; ...@@ -26,8 +27,8 @@ let path1 = path + '/Player';
let VarColor = []; let VarColor = [];
let ColorBackPath = path + '/PlayerColorBack.txt'; let ColorBackPath = path + '/PlayerColorBack.txt';
let txtPath = path1 + 'PlayerReport.txt'; let txtPath = path1 + '/PlayerReport.txt';
let xmlPath =path1 + 'PlayerTest.xml'; let xmlPath =path1 + '/PlayerTest.xml';
@Entry @Entry
@Component @Component
...@@ -276,23 +277,23 @@ struct IndexPage { ...@@ -276,23 +277,23 @@ struct IndexPage {
serializer.setDeclaration(); serializer.setDeclaration();
serializer.startElement("testsuite"); serializer.startElement("testsuite");
serializer.setAttributes("name","ActsPlayerTest"); serializer.setAttributes("name","ActsPlayerTest");
serializer.setAttributes("time", " "); serializer.setAttributes("time", "");
serializer.setAttributes("errors", "0"); serializer.setAttributes("errors", "0");
serializer.setAttributes("disabled", "0"); serializer.setAttributes("disabled", "0");
serializer.setAttributes("failures", failNum); serializer.setAttributes("failures", failNum);
serializer.setAttributes("ignored", ignoreNum); serializer.setAttributes("ignored", "0");
serializer.setAttributes("tests", testNum); serializer.setAttributes("tests", testNum);
serializer.setAttributes("message", " "); serializer.setAttributes("message", "");
serializer.setAttributes("modulename", "ActsPlayerTest"); serializer.setAttributes("modulename", "ActsPlayerTest");
for (let i = 0; i < title.length; i++) { for (let i = 0; i < title.length; i++) {
serializer.startElement("testcase"); serializer.startElement("testcase");
serializer.setAttributes("name", String(title[i])); serializer.setAttributes("name", String(title[i]));
serializer.setAttributes("status", " "); serializer.setAttributes("status", "");
serializer.setAttributes("time", " "); serializer.setAttributes("time", "");
serializer.setAttributes("classname", " "); serializer.setAttributes("classname", "");
serializer.setAttributes("result", String(result[i])); serializer.setAttributes("result", String(result[i]));
serializer.setAttributes("level", " "); serializer.setAttributes("level", "");
serializer.setAttributes("message", " "); serializer.setAttributes("message", "");
serializer.endElement(); serializer.endElement();
} }
serializer.endElement(); serializer.endElement();
......
/* /*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import {CustomContainer} from '../common/CustomContainer'; import {CustomContainer} from '../common/CustomContainer';
import FirstDialog from '../model/FirstDialog'; import FirstDialog from '../model/FirstDialog';
@Entry @Entry
......
...@@ -125,7 +125,7 @@ export struct CustomContainer { ...@@ -125,7 +125,7 @@ export struct CustomContainer {
}; };
let name = this.name; let name = this.name;
let displayName = `${info.prefix}${name}${info.suffix}`; let displayName = `${info.prefix}${name}${info.suffix}`;
let dirPath = path + '/' + displayName; let dirPath = path + '/screenshot' + '/' + displayName;
let imagePackerApi = image.createImagePacker(); let imagePackerApi = image.createImagePacker();
let arrayBuffer = await imagePackerApi.packing(data, packOpts); let arrayBuffer = await imagePackerApi.packing(data, packOpts);
let fd = fileio.openSync(dirPath,0o102,0o666); let fd = fileio.openSync(dirPath,0o102,0o666);
......
...@@ -126,7 +126,7 @@ export struct CustomContainer { ...@@ -126,7 +126,7 @@ export struct CustomContainer {
}; };
let name = this.name; let name = this.name;
let displayName = `${info.prefix}${name}${info.suffix}`; let displayName = `${info.prefix}${name}${info.suffix}`;
let dirPath = path + '/' + displayName; let dirPath = path + '/screenshot' + '/' + displayName;
let imagePackerApi = image.createImagePacker(); let imagePackerApi = image.createImagePacker();
let arrayBuffer = await imagePackerApi.packing(data, packOpts); let arrayBuffer = await imagePackerApi.packing(data, packOpts);
let fd = fileio.openSync(dirPath,0o102,0o666); let fd = fileio.openSync(dirPath,0o102,0o666);
......
...@@ -128,7 +128,7 @@ export struct CustomContainer { ...@@ -128,7 +128,7 @@ export struct CustomContainer {
}; };
let name = this.name; let name = this.name;
let displayName = `${info.prefix}${name}${info.suffix}`; let displayName = `${info.prefix}${name}${info.suffix}`;
let dirPath = path + '/' + displayName; let dirPath = path + '/screenshot' + '/' + displayName;
let imagePackerApi = image.createImagePacker(); let imagePackerApi = image.createImagePacker();
let arrayBuffer = await imagePackerApi.packing(data, packOpts); let arrayBuffer = await imagePackerApi.packing(data, packOpts);
let fd = fileio.openSync(dirPath,0o102,0o666); let fd = fileio.openSync(dirPath,0o102,0o666);
......
...@@ -122,7 +122,7 @@ export struct CustomContainer { ...@@ -122,7 +122,7 @@ export struct CustomContainer {
}; };
let name = this.name; let name = this.name;
let displayName = `${info.prefix}${name}${info.suffix}`; let displayName = `${info.prefix}${name}${info.suffix}`;
let dirPath = path + '/' + displayName; let dirPath = path + '/screenshot' + '/' + displayName;
let imagePackerApi = image.createImagePacker(); let imagePackerApi = image.createImagePacker();
let arrayBuffer = await imagePackerApi.packing(data, packOpts); let arrayBuffer = await imagePackerApi.packing(data, packOpts);
let fd = fileio.openSync(dirPath,0o102,0o666); let fd = fileio.openSync(dirPath,0o102,0o666);
......
...@@ -124,7 +124,7 @@ export struct CustomContainer { ...@@ -124,7 +124,7 @@ export struct CustomContainer {
}; };
let name = this.name; let name = this.name;
let displayName = `${info.prefix}${name}${info.suffix}`; let displayName = `${info.prefix}${name}${info.suffix}`;
let dirPath = path + '/' + displayName; let dirPath = path + '/screenshot' + '/' + displayName;
let imagePackerApi = image.createImagePacker(); let imagePackerApi = image.createImagePacker();
let arrayBuffer = await imagePackerApi.packing(data, packOpts); let arrayBuffer = await imagePackerApi.packing(data, packOpts);
let fd = fileio.openSync(dirPath,0o102,0o666); let fd = fileio.openSync(dirPath,0o102,0o666);
......
...@@ -125,7 +125,7 @@ export struct CustomContainer { ...@@ -125,7 +125,7 @@ export struct CustomContainer {
}; };
let name = this.name; let name = this.name;
let displayName = `${info.prefix}${name}${info.suffix}`; let displayName = `${info.prefix}${name}${info.suffix}`;
let dirPath = path + '/' + displayName; let dirPath = path + '/screenshot' + '/' + displayName;
let imagePackerApi = image.createImagePacker(); let imagePackerApi = image.createImagePacker();
let arrayBuffer = await imagePackerApi.packing(data, packOpts); let arrayBuffer = await imagePackerApi.packing(data, packOpts);
let fd = fileio.openSync(dirPath,0o102,0o666); let fd = fileio.openSync(dirPath,0o102,0o666);
......
...@@ -122,7 +122,7 @@ export struct CustomContainer { ...@@ -122,7 +122,7 @@ export struct CustomContainer {
}; };
let name = this.name; let name = this.name;
let displayName = `${info.prefix}${name}${info.suffix}`; let displayName = `${info.prefix}${name}${info.suffix}`;
let dirPath = path + '/' + displayName; let dirPath = path + '/screenshot' + '/' + displayName;
let imagePackerApi = image.createImagePacker(); let imagePackerApi = image.createImagePacker();
let arrayBuffer = await imagePackerApi.packing(data, packOpts); let arrayBuffer = await imagePackerApi.packing(data, packOpts);
let fd = fileio.openSync(dirPath,0o102,0o666); let fd = fileio.openSync(dirPath,0o102,0o666);
......
...@@ -126,7 +126,7 @@ export struct CustomContainer { ...@@ -126,7 +126,7 @@ export struct CustomContainer {
}; };
let name = this.name; let name = this.name;
let displayName = `${info.prefix}${name}${info.suffix}`; let displayName = `${info.prefix}${name}${info.suffix}`;
let dirPath = path + '/' + displayName; let dirPath = path + '/screenshot' + '/' + displayName;
let imagePackerApi = image.createImagePacker(); let imagePackerApi = image.createImagePacker();
let arrayBuffer = await imagePackerApi.packing(data, packOpts); let arrayBuffer = await imagePackerApi.packing(data, packOpts);
let fd = fileio.openSync(dirPath,0o102,0o666); let fd = fileio.openSync(dirPath,0o102,0o666);
......
/* /*
* Copyright (c) 2022 Huawei Device Co., Ltd. * Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import fileio from '@ohos.fileio'; import prompt from '@ohos.prompt';
import prompt from '@ohos.prompt'; import fileio from '@ohos.fileio';
import router from '@ohos.router'; import router from '@ohos.router';
import screenshot from '@ohos.screenshot'; import screenshot from '@ohos.screenshot';
import image from '@ohos.multimedia.image'; import image from '@ohos.multimedia.image';
import Logger from '../model/Logger'; import Logger from '../model/Logger';
import mediaLibrary from '@ohos.multimedia.mediaLibrary'; import mediaLibrary from '@ohos.multimedia.mediaLibrary';
let path = globalThis.dir; let path = globalThis.dir;
const TAG = '[Screenshot]';
@Component const TAG = '[Screenshot]';
export struct CustomContainer { @Component
@Link FillColor: string; export struct CustomContainer {
@Link name: string; @Link name : string;
Url : string = ''; title : string = '';
title : string = ''; StepTips: string = '';
StepTips: string = ''; Url : string = '';
@BuilderParam content: () => void; @Link StartEnable : boolean
@Builder @Link Vue : boolean;
PassBtn(text: Resource, isFullScreen: boolean) { @Link Fps : string;
Button() { @BuilderParam content: () => void;
Image($r('app.media.ic_public_pass')).width('20vp').height('20vp') @Builder
}.width('30%').height('30vp').backgroundColor(Color.Grey) PassBtn(text: Resource, isFullScreen: boolean) {
.onClick(()=>{ if(this.Vue == false){
router.back({ Button({stateEffect:this.Vue}) {
url:this.Url, Image($r('app.media.ic_public_pass')).width('20vp').height('20vp')
params: {result : 'Pass', title : this.name, }.width('30%').height('30vp').backgroundColor(Color.Grey).opacity(0.4)
} .onClick(()=>{
})
this.getScreen(isFullScreen); })
prompt.showToast({ }
message: '通过', duration: 1000 else{
}); Button({stateEffect:this.Vue}) {
}) Image($r('app.media.ic_public_pass')).width('20vp').height('20vp')
} }.width('30%').height('30vp').backgroundColor(Color.Grey)
@Builder .onClick(()=>{
FailBtn(text: Resource, isFullScreen: boolean) { router.back({
Button(){ url:this.Url,
Image($r('app.media.ic_public_fail')).width('20vp').height('20vp') params: {result : 'Pass', title : this.name,
}.width('30%').height('30vp').backgroundColor(Color.Grey) }
.onClick(()=>{ })
router.back({ this.getScreen(isFullScreen);
url:this.Url, prompt.showToast({
params: {result : 'Fail',title : this.name, message: '通过', duration: 1000
} });
}) })
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')
build() { }.width('30%').height('30vp').backgroundColor(Color.Grey)
Column() { .onClick(()=>{
Row() { router.back({
Button(){ url:this.Url,
Image($r('app.media.ic_public_back')).width('20vp').height('18vp').margin({left:'20vp'}) params: {result : 'Fail',title : this.name,
}.backgroundColor(Color.Black) }
.onClick(()=>{ })
router.back({ this.getScreen(isFullScreen);
url:this.Url, prompt.showToast({
params: {result : 'None',} message: '失败', duration: 1000
}) });
}) })
Text(this.title).fontColor(Color.White).fontSize('18fp').margin({left:'-20vp'}) }
Text('hello').fontColor(Color.White).visibility(Visibility.Hidden) build() {
}.backgroundColor(Color.Black).height('10%').width('100%').justifyContent(FlexAlign.SpaceBetween) Column() {
this.content(); Row() {
Blank() Button(){
Row() { Image($r('app.media.ic_public_back')).width('20vp').height('18vp').margin({left:'20vp'})
this.PassBtn($r('app.string.btn_fullscreen'), true); }.backgroundColor(Color.Black)
Button(){ .onClick(()=>{
Image($r('app.media.ic_public_help')).width('20vp').height('20vp') router.back({
}.width('30%').height('30vp').backgroundColor(Color.Grey) url:this.Url,
.onClick(() =>{ params: {result : 'None',}
AlertDialog.show( })
{ })
title:'操作提示', Text(this.title).fontColor(Color.White).fontSize('18fp').margin({left:'-20vp'})
message: this.StepTips, Text('hello').fontColor(Color.White).visibility(Visibility.Hidden)
confirm:{ }.backgroundColor(Color.Black).height('10%').width('100%').justifyContent(FlexAlign.SpaceBetween)
value:'OK', this.content();
action:()=>{ 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)
this.FailBtn($r('app.string.btn_fullscreen'), true); .onClick(() =>{
}.width('100%').justifyContent(FlexAlign.SpaceEvenly).backgroundColor(Color.Black) AlertDialog.show({
}.height('98%').width('100%') title:'操作提示',
} message: this.StepTips,
async savePicture(data: image.PixelMap, context: any) { confirm:{
Logger.info(TAG, `savePicture`); value:'OK',
let packOpts: image.PackingOption = { action:()=>{
format: "image/jpeg", quality: 100 }
}; }
let info = { })
prefix: 'IMG_', suffix: '.jpg', directory: mediaLibrary.DirectoryType.DIR_IMAGE })
}; this.FailBtn($r('app.string.btn_fullscreen'), true);
let name = this.name; }.width('100%').justifyContent(FlexAlign.SpaceEvenly).backgroundColor(Color.Black)
let displayName = `${info.prefix}${name}${info.suffix}`; }.height('98%').width('100%')
let dirPath = path + '/' + displayName; }
let imagePackerApi = image.createImagePacker(); async savePicture(data: image.PixelMap, context: any) {
let arrayBuffer = await imagePackerApi.packing(data, packOpts); Logger.info(TAG, `savePicture`);
let fd = fileio.openSync(dirPath,0o102,0o666); let packOpts: image.PackingOption = {
imagePackerApi.release(); format: "image/jpeg", quality: 100
try { };
await fileio.write(fd, arrayBuffer); let info = {
} catch (err) { prefix: 'IMG_', suffix: '.jpg', directory: mediaLibrary.DirectoryType.DIR_IMAGE
Logger.error(`write failed, code is ${err.code}, message is ${err.message}`); };
} let name = this.name;
await fileio.close(fd); let displayName = `${info.prefix}${name}${info.suffix}`;
Logger.info(TAG, `write done`); let dirPath = path + '/screenshot' + '/' + displayName;
} let imagePackerApi = image.createImagePacker();
getScreen = (isFullScreen: boolean) => { let arrayBuffer = await imagePackerApi.packing(data, packOpts);
let screenshotOptions: screenshot.ScreenshotOptions = { let fd = fileio.openSync(dirPath,0o102,0o666);
screenRect: { left: 0, top: 0, width: 400, height: 400 }, imagePackerApi.release();
imageSize: { width: 400, height: 400 }, try {
rotation: 0, await fileio.write(fd, arrayBuffer);
displayId: 0 } catch (err) {
}; Logger.error(`write failed, code is ${err.code}, message is ${err.message}`);
if (isFullScreen) { }
screenshotOptions = { await fileio.close(fd);
rotation: 0 Logger.info(TAG, `write done`);
}
} }
try { getScreen = (isFullScreen: boolean) => {
screenshot.save(screenshotOptions, (err, data: image.PixelMap) => { let screenshotOptions: screenshot.ScreenshotOptions = {
if (err) { screenRect: { left: 0, top: 0, width: 400, height: 400 },
Logger.info(TAG, `Failed to save the screenshot. Error:${JSON.stringify(err)}`); imageSize: { width: 400, height: 400 },
} rotation: 0,
Logger.info(TAG, 'save callback'); displayId: 0
this.savePicture(data, getContext(this) as any); };
}) if (isFullScreen) {
} catch (err) { screenshotOptions = {
Logger.error(`save failed, code is ${err.code}, message is ${err.message}`); 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}`);
}
}
}
...@@ -29,6 +29,7 @@ let path2 = path + '/Audio'; ...@@ -29,6 +29,7 @@ let path2 = path + '/Audio';
let path3 = path + '/Camera'; let path3 = path + '/Camera';
let path4 = path + '/Player'; let path4 = path + '/Player';
let path5 = path + '/Experience'; let path5 = path + '/Experience';
let picturePath = path + '/screenshot';
let ArkUIColorBackPath = path + '/ArkUIColorBack.txt'; let ArkUIColorBackPath = path + '/ArkUIColorBack.txt';
let AudioColorBackPath = path + '/AudioColorBack.txt'; let AudioColorBackPath = path + '/AudioColorBack.txt';
let CameraColorBackPath = path + '/CameraColorBack.txt'; let CameraColorBackPath = path + '/CameraColorBack.txt';
...@@ -81,6 +82,7 @@ struct IndexPage { ...@@ -81,6 +82,7 @@ struct IndexPage {
fileio.mkdirSync(path3); fileio.mkdirSync(path3);
fileio.mkdirSync(path4); fileio.mkdirSync(path4);
fileio.mkdirSync(path5); fileio.mkdirSync(path5);
fileio.mkdirSync(picturePath);
let promise = preferences.put('index', 1); let promise = preferences.put('index', 1);
promise.then(() => { promise.then(() => {
...@@ -198,6 +200,8 @@ struct IndexPage { ...@@ -198,6 +200,8 @@ struct IndexPage {
fileio.unlinkSync(CameraColorBackPath); fileio.unlinkSync(CameraColorBackPath);
fileio.unlinkSync(PlayerColorBackPath); fileio.unlinkSync(PlayerColorBackPath);
fileio.unlinkSync(ExperienceColorBackPath); fileio.unlinkSync(ExperienceColorBackPath);
fileio.rmdirSync(picturePath);
fileio.mkdirSync(picturePath);
fileio.openSync(TimePath, 0o100 | 0o2002, 0o664); fileio.openSync(TimePath, 0o100 | 0o2002, 0o664);
fileio.openSync(xmlPath, 0o100 | 0o2002, 0o664); fileio.openSync(xmlPath, 0o100 | 0o2002, 0o664);
fileio.openSync(path11, 0o100 | 0o2002, 0o664); fileio.openSync(path11, 0o100 | 0o2002, 0o664);
...@@ -438,33 +442,33 @@ struct IndexPage { ...@@ -438,33 +442,33 @@ struct IndexPage {
serializer.setAttributes("disabled", "0"); serializer.setAttributes("disabled", "0");
serializer.setAttributes("failures", failNum); serializer.setAttributes("failures", failNum);
serializer.setAttributes("tests", testNum); serializer.setAttributes("tests", testNum);
serializer.setAttributes("ignored", ignoreNum); serializer.setAttributes("ignored", "0");
serializer.setAttributes("unavailable", "0"); serializer.setAttributes("unavailable", "0");
serializer.setAttributes("productinfo", "{ }"); serializer.setAttributes("productinfo", "{ }");
serializer.setAttributes("modules", " "); serializer.setAttributes("modules", "");
serializer.setAttributes("runmodules", " "); serializer.setAttributes("runmodules", "");
/* /*
* ArkUI * ArkUI
*/ */
serializer.startElement("testsuite"); serializer.startElement("testsuite");
serializer.setAttributes("name", "ActsArkUITest"); serializer.setAttributes("name", "ActsArkUITest");
serializer.setAttributes("time", " "); serializer.setAttributes("time", "");
serializer.setAttributes("errors", "0"); serializer.setAttributes("errors", "0");
serializer.setAttributes("disabled", "0"); serializer.setAttributes("disabled", "0");
serializer.setAttributes("failures", ArkuiFailNum); serializer.setAttributes("failures", ArkuiFailNum);
serializer.setAttributes("ignored", ArkUIIgnoreNum); serializer.setAttributes("ignored", "0");
serializer.setAttributes("tests", ArkuiTestNum); serializer.setAttributes("tests", ArkuiTestNum);
serializer.setAttributes("message", " "); serializer.setAttributes("message", "");
serializer.setAttributes("modulename", "ActsArkUITest"); serializer.setAttributes("modulename", "ActsArkUITest");
for (let i = 0; i < title1.length; i++) { for (let i = 0; i < title1.length; i++) {
serializer.startElement("testcase"); serializer.startElement("testcase");
serializer.setAttributes("name", String(title1[i])); serializer.setAttributes("name", String(title1[i]));
serializer.setAttributes("status", " "); serializer.setAttributes("status", "");
serializer.setAttributes("time", " "); serializer.setAttributes("time", "");
serializer.setAttributes("classname", " "); serializer.setAttributes("classname", "");
serializer.setAttributes("result", String(result1[i])); serializer.setAttributes("result", String(result1[i]));
serializer.setAttributes("level", " "); serializer.setAttributes("level", "");
serializer.setAttributes("message", " "); serializer.setAttributes("message", "");
serializer.endElement(); serializer.endElement();
} }
serializer.endElement(); serializer.endElement();
...@@ -473,23 +477,23 @@ struct IndexPage { ...@@ -473,23 +477,23 @@ struct IndexPage {
*/ */
serializer.startElement("testsuite"); serializer.startElement("testsuite");
serializer.setAttributes("name", "ActsAudioTest"); serializer.setAttributes("name", "ActsAudioTest");
serializer.setAttributes("time", " "); serializer.setAttributes("time", "");
serializer.setAttributes("errors", "0"); serializer.setAttributes("errors", "0");
serializer.setAttributes("disabled", "0"); serializer.setAttributes("disabled", "0");
serializer.setAttributes("failures", audioFailNum); serializer.setAttributes("failures", audioFailNum);
serializer.setAttributes("ignored", AudioIgnoreNum); serializer.setAttributes("ignored", "0");
serializer.setAttributes("tests", audioTestNum); serializer.setAttributes("tests", audioTestNum);
serializer.setAttributes("message", " "); serializer.setAttributes("message", "");
serializer.setAttributes("modulename", "ActsAudioTest"); serializer.setAttributes("modulename", "ActsAudioTest");
for (let i = 0; i < title2.length; i++) { for (let i = 0; i < title2.length; i++) {
serializer.startElement("testcase"); serializer.startElement("testcase");
serializer.setAttributes("name", String(title2[i])); serializer.setAttributes("name", String(title2[i]));
serializer.setAttributes("status", " "); serializer.setAttributes("status", "");
serializer.setAttributes("time", " "); serializer.setAttributes("time", "");
serializer.setAttributes("classname", " "); serializer.setAttributes("classname", "");
serializer.setAttributes("result", String(result2[i])); serializer.setAttributes("result", String(result2[i]));
serializer.setAttributes("level", " "); serializer.setAttributes("level", "");
serializer.setAttributes("message", " "); serializer.setAttributes("message", "");
serializer.endElement(); serializer.endElement();
} }
serializer.endElement(); serializer.endElement();
...@@ -498,23 +502,23 @@ struct IndexPage { ...@@ -498,23 +502,23 @@ struct IndexPage {
*/ */
serializer.startElement("testsuite"); serializer.startElement("testsuite");
serializer.setAttributes("name", "ActsCameraTest"); serializer.setAttributes("name", "ActsCameraTest");
serializer.setAttributes("time", " "); serializer.setAttributes("time", "");
serializer.setAttributes("errors", "0"); serializer.setAttributes("errors", "0");
serializer.setAttributes("disabled", "0"); serializer.setAttributes("disabled", "0");
serializer.setAttributes("failures", cameraFailNum); serializer.setAttributes("failures", cameraFailNum);
serializer.setAttributes("ignored", CameraIgnoreNum); serializer.setAttributes("ignored", "0");
serializer.setAttributes("tests", cameraTestNum); serializer.setAttributes("tests", cameraTestNum);
serializer.setAttributes("message", " "); serializer.setAttributes("message", "");
serializer.setAttributes("modulename", "ActsCameraTest"); serializer.setAttributes("modulename", "ActsCameraTest");
for (let i = 0; i < title2.length; i++) { for (let i = 0; i < title2.length; i++) {
serializer.startElement("testcase"); serializer.startElement("testcase");
serializer.setAttributes("name", String(title3[i])); serializer.setAttributes("name", String(title3[i]));
serializer.setAttributes("status", " "); serializer.setAttributes("status", "");
serializer.setAttributes("time", " "); serializer.setAttributes("time", "");
serializer.setAttributes("classname", " "); serializer.setAttributes("classname", "");
serializer.setAttributes("result", String(result3[i])); serializer.setAttributes("result", String(result3[i]));
serializer.setAttributes("level", " "); serializer.setAttributes("level", "");
serializer.setAttributes("message", " "); serializer.setAttributes("message", "");
serializer.endElement(); serializer.endElement();
} }
serializer.endElement(); serializer.endElement();
...@@ -523,23 +527,23 @@ struct IndexPage { ...@@ -523,23 +527,23 @@ struct IndexPage {
*/ */
serializer.startElement("testsuite"); serializer.startElement("testsuite");
serializer.setAttributes("name", "ActsPlayerTest"); serializer.setAttributes("name", "ActsPlayerTest");
serializer.setAttributes("time", " "); serializer.setAttributes("time", "");
serializer.setAttributes("errors", "0"); serializer.setAttributes("errors", "0");
serializer.setAttributes("disabled", "0"); serializer.setAttributes("disabled", "0");
serializer.setAttributes("failures", playerFailNum); serializer.setAttributes("failures", playerFailNum);
serializer.setAttributes("ignored", PlayerIgnoreNum); serializer.setAttributes("ignored", "0");
serializer.setAttributes("tests", playerTestNum); serializer.setAttributes("tests", playerTestNum);
serializer.setAttributes("message", " "); serializer.setAttributes("message", "");
serializer.setAttributes("modulename", "ActsPlayerTest"); serializer.setAttributes("modulename", "ActsPlayerTest");
for (let i = 0; i < title2.length; i++) { for (let i = 0; i < title2.length; i++) {
serializer.startElement("testcase"); serializer.startElement("testcase");
serializer.setAttributes("name", String(title4[i])); serializer.setAttributes("name", String(title4[i]));
serializer.setAttributes("status", " "); serializer.setAttributes("status", "");
serializer.setAttributes("time", " "); serializer.setAttributes("time", "");
serializer.setAttributes("classname", " "); serializer.setAttributes("classname", "");
serializer.setAttributes("result", String(result4[i])); serializer.setAttributes("result", String(result4[i]));
serializer.setAttributes("level", " "); serializer.setAttributes("level", "");
serializer.setAttributes("message", " "); serializer.setAttributes("message", "");
serializer.endElement(); serializer.endElement();
} }
serializer.endElement(); serializer.endElement();
...@@ -548,23 +552,23 @@ struct IndexPage { ...@@ -548,23 +552,23 @@ struct IndexPage {
*/ */
serializer.startElement("testsuite"); serializer.startElement("testsuite");
serializer.setAttributes("name", "ActsExperienceTest"); serializer.setAttributes("name", "ActsExperienceTest");
serializer.setAttributes("time", " "); serializer.setAttributes("time", "");
serializer.setAttributes("errors", "0"); serializer.setAttributes("errors", "0");
serializer.setAttributes("disabled", "0"); serializer.setAttributes("disabled", "0");
serializer.setAttributes("failures", experienceFailNum); serializer.setAttributes("failures", experienceFailNum);
serializer.setAttributes("ignored", ExperienceIgnoreNum); serializer.setAttributes("ignored", "0");
serializer.setAttributes("tests", experienceTestNum); serializer.setAttributes("tests", experienceTestNum);
serializer.setAttributes("message", " "); serializer.setAttributes("message", "");
serializer.setAttributes("modulename", "ActsExperienceTest"); serializer.setAttributes("modulename", "ActsExperienceTest");
for (let i = 0; i < title2.length; i++) { for (let i = 0; i < title2.length; i++) {
serializer.startElement("testcase"); serializer.startElement("testcase");
serializer.setAttributes("name", String(title5[i])); serializer.setAttributes("name", String(title5[i]));
serializer.setAttributes("status", " "); serializer.setAttributes("status", "");
serializer.setAttributes("time", " "); serializer.setAttributes("time", "");
serializer.setAttributes("classname", " "); serializer.setAttributes("classname", "");
serializer.setAttributes("result", String(result5[i])); serializer.setAttributes("result", String(result5[i]));
serializer.setAttributes("level", " "); serializer.setAttributes("level", "");
serializer.setAttributes("message", " "); serializer.setAttributes("message", "");
serializer.endElement(); serializer.endElement();
} }
serializer.endElement(); serializer.endElement();
......
...@@ -53,6 +53,12 @@ ...@@ -53,6 +53,12 @@
}, },
{ {
"name": "ohos.permission.CAMERA" "name": "ohos.permission.CAMERA"
},
{
"name": "ohos.permission.MICROPHONE"
},
{
"name": "ohos.permission.START_INVISIBLE_ABILITY"
} }
] ]
} }
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
"pages/Player/Player_index", "pages/Player/Player_index",
"pages/Player/ScrollListTest", "pages/Player/ScrollListTest",
"pages/Experience/Experience_index", "pages/Experience/Experience_index",
"pages/Experience/ScrollListTest" "pages/Experience/PhotoFps",
"pages/Experience/DeskFps"
] ]
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册