未验证 提交 9c1c3fbb 编写于 作者: O openharmony_ci 提交者: Gitee

!8533 修复某些横屏状态下validator的experience模块界面显示不全的问题

Merge pull request !8533 from 田文哲/OpenHarmony-3.2-Release
...@@ -35,6 +35,7 @@ struct CustomContainerUser { ...@@ -35,6 +35,7 @@ struct CustomContainerUser {
@State mmsNum: number = 0; @State mmsNum: number = 0;
@State cameraNum: number = 0; @State cameraNum: number = 0;
@State contactsNum: number = 0; @State contactsNum: number = 0;
scroller: Scroller = new Scroller();
async aboutToAppear(){ async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name); await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false; this.Vue = false;
...@@ -43,74 +44,75 @@ struct CustomContainerUser { ...@@ -43,74 +44,75 @@ struct CustomContainerUser {
@Builder specificNoParam() { @Builder specificNoParam() {
Column() { Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) { Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){ Scroll(this.scroller) {
Row(){ Column(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' ) Row(){
.fontColor(Color.White).fontSize('24fp') Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
} .fontColor(Color.White).fontSize('24fp')
Row(){ }
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面` + '\n' + '\n' Row(){
+ `3.清空后台应用,将底层任务栏中应用拖至桌面` + '\n' + '\n' + `4.工作台运行‘点击启动测试.bat’选择冷启动>相机测试,回车执行` Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面` + '\n' + '\n'
+ '\n' + '\n' +`5.测试应用自动执行冷启动后手动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果' + `3.清空后台应用,将底层任务栏中应用拖至桌面` + '\n' + '\n' + `4.工作台运行‘点击启动测试.bat’选择冷启动>相机测试,回车执行`
+ '\n' + '\n' + `7.若冷启动测试在规定时延内完成则通过测试` + '\n' + '\n' ) + '\n' + '\n' +`5.测试应用自动执行冷启动后手动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果'
.fontColor(Color.White).fontSize('20fp') + '\n' + '\n' + `7.若冷启动测试在规定时延内完成则通过测试` + '\n' + '\n' )
} .fontColor(Color.White).fontSize('20fp')
Row(){ }
Column(){ Row(){
Button(`开始`) Column(){
.borderRadius(8) Button(`开始`)
.backgroundColor(0x317aff) .borderRadius(8)
.width('30%') .backgroundColor(0x317aff)
.enabled(this.StartEnable) .width('30%')
.opacity(this.StartEnable? 1 : 0.4) .enabled(this.StartEnable)
.onClick(async () => { .opacity(this.StartEnable? 1 : 0.4)
this.num = 0; .onClick(async () => {
this.StartEnable = !this.StartEnable; this.num = 0;
let str = { this.StartEnable = !this.StartEnable;
bundleName:"com.ohos.launcher", let str = {
abilityName: "com.ohos.launcher.MainAbility", bundleName:"com.ohos.launcher",
} abilityName: "com.ohos.launcher.MainAbility",
abilityContext.startAbility(str).then((data) => { }
abilityContext.startAbility(str).then((data) => {
}).catch((error) => { }).catch((error) => {
})
}) })
}) }
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
camera
*/
let CameraFd = fileio.openSync(CameraColdPath, 0o100 | 0o2002, 0o664);
let CameraBuf = new ArrayBuffer(4096);
fileio.readSync(CameraFd,CameraBuf);
let CameraReport = String.fromCharCode.apply(null,new Uint8Array(CameraBuf));
let CameraHead = CameraReport.indexOf('time:');
let CameraTime = CameraReport.substring(CameraHead+5);
this.cameraNum = parseFloat(CameraTime);
if( 0 < this.cameraNum && this.cameraNum < 2300 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
} }
Column(){ Row(){
Button(`结束`) Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '相机冷启动时延' + this.cameraNum + 'ms' )
.borderRadius(8) .fontColor(Color.White).fontSize('24fp')
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
camera
*/
let CameraFd = fileio.openSync(CameraColdPath, 0o100 | 0o2002, 0o664);
let CameraBuf = new ArrayBuffer(4096);
fileio.readSync(CameraFd,CameraBuf);
let CameraReport = String.fromCharCode.apply(null,new Uint8Array(CameraBuf));
let CameraHead = CameraReport.indexOf('time:');
let CameraTime = CameraReport.substring(CameraHead+5);
this.cameraNum = parseFloat(CameraTime);
if( 0 < this.cameraNum && this.cameraNum < 2300 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
} }
} }
Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '相机冷启动时延' + this.cameraNum + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
} }
} }
}.width('100%').height('80%').backgroundColor(Color.Black) }.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly) .justifyContent(FlexAlign.SpaceEvenly)
......
...@@ -35,6 +35,7 @@ struct CustomContainerUser { ...@@ -35,6 +35,7 @@ struct CustomContainerUser {
@State mmsNum: number = 0; @State mmsNum: number = 0;
@State cameraNum: number = 0; @State cameraNum: number = 0;
@State contactsNum: number = 0; @State contactsNum: number = 0;
scroller: Scroller = new Scroller();
async aboutToAppear(){ async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name); await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false; this.Vue = false;
...@@ -43,74 +44,75 @@ struct CustomContainerUser { ...@@ -43,74 +44,75 @@ struct CustomContainerUser {
@Builder specificNoParam() { @Builder specificNoParam() {
Column() { Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) { Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){ Scroll(this.scroller) {
Row(){ Column(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' ) Row(){
.fontColor(Color.White).fontSize('24fp') Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
} .fontColor(Color.White).fontSize('24fp')
Row(){ }
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面` + '\n' + '\n' Row(){
+ `3.清空后台应用,将底层任务栏中应用拖至桌面` + '\n' + '\n' + `4.工作台运行‘点击启动测试.bat’选择冷启动>联系人测试,回车执行` Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面` + '\n' + '\n'
+ '\n' + '\n' +`5.测试应用自动执行冷启动后手动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果' + `3.清空后台应用,将底层任务栏中应用拖至桌面` + '\n' + '\n' + `4.工作台运行‘点击启动测试.bat’选择冷启动>联系人测试,回车执行`
+ '\n' + '\n' + `7.若冷启动测试在规定时延内完成则通过测试` + '\n' + '\n' ) + '\n' + '\n' +`5.测试应用自动执行冷启动后手动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果'
.fontColor(Color.White).fontSize('20fp') + '\n' + '\n' + `7.若冷启动测试在规定时延内完成则通过测试` + '\n' + '\n' )
} .fontColor(Color.White).fontSize('20fp')
Row(){ }
Column(){ Row(){
Button(`开始`) Column(){
.borderRadius(8) Button(`开始`)
.backgroundColor(0x317aff) .borderRadius(8)
.width('30%') .backgroundColor(0x317aff)
.enabled(this.StartEnable) .width('30%')
.opacity(this.StartEnable? 1 : 0.4) .enabled(this.StartEnable)
.onClick(async () => { .opacity(this.StartEnable? 1 : 0.4)
this.num = 0; .onClick(async () => {
this.StartEnable = !this.StartEnable; this.num = 0;
let str = { this.StartEnable = !this.StartEnable;
bundleName:"com.ohos.launcher", let str = {
abilityName: "com.ohos.launcher.MainAbility", bundleName:"com.ohos.launcher",
} abilityName: "com.ohos.launcher.MainAbility",
abilityContext.startAbility(str).then((data) => { }
abilityContext.startAbility(str).then((data) => {
}).catch((error) => { }).catch((error) => {
})
}) })
}) }
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
Contacts
*/
let ContactsFd = fileio.openSync(ContactsColdPath, 0o100 | 0o2002, 0o664);
let ContactsBuf = new ArrayBuffer(4096);
fileio.readSync(ContactsFd,ContactsBuf);
let ContactsReport = String.fromCharCode.apply(null,new Uint8Array(ContactsBuf));
let ContactsHead = ContactsReport.indexOf('time:');
let ContactsTime = ContactsReport.substring(ContactsHead+5);
this.contactsNum = parseFloat(ContactsTime);
if( 0 < this.contactsNum && this.contactsNum < 2300 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
} }
Column(){ Row(){
Button(`结束`) Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '联系人冷启动时延' + this.contactsNum + 'ms' )
.borderRadius(8) .fontColor(Color.White).fontSize('24fp')
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
Contacts
*/
let ContactsFd = fileio.openSync(ContactsColdPath, 0o100 | 0o2002, 0o664);
let ContactsBuf = new ArrayBuffer(4096);
fileio.readSync(ContactsFd,ContactsBuf);
let ContactsReport = String.fromCharCode.apply(null,new Uint8Array(ContactsBuf));
let ContactsHead = ContactsReport.indexOf('time:');
let ContactsTime = ContactsReport.substring(ContactsHead+5);
this.contactsNum = parseFloat(ContactsTime);
if( 0 < this.contactsNum && this.contactsNum < 2300 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
} }
} }
Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '联系人冷启动时延' + this.contactsNum + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
} }
} }
}.width('100%').height('80%').backgroundColor(Color.Black) }.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly) .justifyContent(FlexAlign.SpaceEvenly)
......
...@@ -35,6 +35,7 @@ struct CustomContainerUser { ...@@ -35,6 +35,7 @@ struct CustomContainerUser {
@State mmsNum: number = 0; @State mmsNum: number = 0;
@State cameraNum: number = 0; @State cameraNum: number = 0;
@State contactsNum: number = 0; @State contactsNum: number = 0;
scroller: Scroller = new Scroller();
async aboutToAppear(){ async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name); await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false; this.Vue = false;
...@@ -43,74 +44,75 @@ struct CustomContainerUser { ...@@ -43,74 +44,75 @@ struct CustomContainerUser {
@Builder specificNoParam() { @Builder specificNoParam() {
Column() { Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) { Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){ Scroll(this.scroller) {
Row(){ Column(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' ) Row(){
.fontColor(Color.White).fontSize('24fp') Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
} .fontColor(Color.White).fontSize('24fp')
Row(){ }
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面`+ '\n' + '\n' Row(){
+ `3.开启联系人应用回退到桌面,保证此时后台应用存在` + '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择热启动>联系人测试`+ '\n' + '\n' + Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面`+ '\n' + '\n'
`5.测试应用手动执行热启动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果' + '\n' + '\n' + `3.开启联系人应用回退到桌面,保证此时后台应用存在` + '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择热启动>联系人测试`+ '\n' + '\n' +
+ `7.若所有热启动测试均在规定时延内完成则通过测试` + '\n' + '\n' + '\n' + '\n' ) `5.测试应用手动执行热启动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果' + '\n' + '\n'
.fontColor(Color.White).fontSize('20fp') + `7.若所有热启动测试均在规定时延内完成则通过测试` + '\n' + '\n' + '\n' + '\n' )
} .fontColor(Color.White).fontSize('20fp')
Row(){ }
Column(){ Row(){
Button(`开始`) Column(){
.borderRadius(8) Button(`开始`)
.backgroundColor(0x317aff) .borderRadius(8)
.width('30%') .backgroundColor(0x317aff)
.enabled(this.StartEnable) .width('30%')
.opacity(this.StartEnable? 1 : 0.4) .enabled(this.StartEnable)
.onClick(async () => { .opacity(this.StartEnable? 1 : 0.4)
this.num = 0; .onClick(async () => {
this.StartEnable = !this.StartEnable; this.num = 0;
let str = { this.StartEnable = !this.StartEnable;
bundleName:"com.ohos.launcher", let str = {
abilityName: "com.ohos.launcher.MainAbility", bundleName:"com.ohos.launcher",
} abilityName: "com.ohos.launcher.MainAbility",
abilityContext.startAbility(str).then((data) => { }
abilityContext.startAbility(str).then((data) => {
}).catch((error) => { }).catch((error) => {
})
}) })
}) }
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
Contacts
*/
let ContactsFd = fileio.openSync(ContactsColdPath, 0o100 | 0o2002, 0o664);
let ContactsBuf = new ArrayBuffer(4096);
fileio.readSync(ContactsFd,ContactsBuf);
let ContactsReport = String.fromCharCode.apply(null,new Uint8Array(ContactsBuf));
let ContactsHead = ContactsReport.indexOf(':');
let ContactsTime = ContactsReport.substring(ContactsHead+1);
this.contactsNum = parseFloat(ContactsTime);
if( 0 < this.contactsNum && this.contactsNum < 600 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
} }
Column(){ Row(){
Button(`结束`) Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n' + '联系人热启动时延' + this.contactsNum + 'ms')
.borderRadius(8) .fontColor(Color.White).fontSize('24fp')
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
Contacts
*/
let ContactsFd = fileio.openSync(ContactsColdPath, 0o100 | 0o2002, 0o664);
let ContactsBuf = new ArrayBuffer(4096);
fileio.readSync(ContactsFd,ContactsBuf);
let ContactsReport = String.fromCharCode.apply(null,new Uint8Array(ContactsBuf));
let ContactsHead = ContactsReport.indexOf(':');
let ContactsTime = ContactsReport.substring(ContactsHead+1);
this.contactsNum = parseFloat(ContactsTime);
if( 0 < this.contactsNum && this.contactsNum < 600 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
} }
} }
Row(){
Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n' + '联系人热启动时延' + this.contactsNum + 'ms')
.fontColor(Color.White).fontSize('24fp')
}
} }
} }
}.width('100%').height('80%').backgroundColor(Color.Black) }.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly) .justifyContent(FlexAlign.SpaceEvenly)
......
...@@ -31,6 +31,7 @@ struct CustomContainerUser { ...@@ -31,6 +31,7 @@ struct CustomContainerUser {
@State Vue: boolean = false; @State Vue: boolean = false;
@State StartEnable: boolean = true; @State StartEnable: boolean = true;
@State Fps: string = '0'; @State Fps: string = '0';
scroller: Scroller = new Scroller();
async aboutToAppear(){ async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name); await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false; this.Vue = false;
...@@ -39,83 +40,84 @@ struct CustomContainerUser { ...@@ -39,83 +40,84 @@ struct CustomContainerUser {
@Builder specificNoParam() { @Builder specificNoParam() {
Column() { Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) { Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){ Scroll(this.scroller) {
Row(){ Column(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n') Row(){
.fontColor(Color.White).fontSize('24fp') Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
} .fontColor(Color.White).fontSize('24fp')
Row(){ }
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面`+ '\n' + '\n' Row(){
+ `3.工作台运行’点击启动测试.bat‘选择帧率>桌面`+ '\n' + '\n' +`4.左右滑动系统桌面连续10s以上` + '\n' + '\n' Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面`+ '\n' + '\n'
+ '5.回到DeskFps测试项点击结束键' + '\n' + '\n' + `6.若测试最高帧率大于55帧则通过测试` + `3.工作台运行’点击启动测试.bat‘选择帧率>桌面`+ '\n' + '\n' +`4.左右滑动系统桌面连续10s以上` + '\n' + '\n'
+ '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' ) + '5.回到DeskFps测试项点击结束键' + '\n' + '\n' + `6.若测试最高帧率大于55帧则通过测试`
.fontColor(Color.White).fontSize('20fp') + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' )
} .fontColor(Color.White).fontSize('20fp')
Row(){ }
Column(){ Row(){
Button(`开始`) Column(){
.borderRadius(8) Button(`开始`)
.backgroundColor(0x317aff) .borderRadius(8)
.width('30%') .backgroundColor(0x317aff)
.enabled(this.StartEnable) .width('30%')
.opacity(this.StartEnable? 1 : 0.4) .enabled(this.StartEnable)
.onClick(async () => { .opacity(this.StartEnable? 1 : 0.4)
this.StartEnable = !this.StartEnable; .onClick(async () => {
let str = { this.StartEnable = !this.StartEnable;
bundleName:"com.ohos.launcher", let str = {
abilityName: "com.ohos.launcher.MainAbility", bundleName:"com.ohos.launcher",
} abilityName: "com.ohos.launcher.MainAbility",
abilityContext.startAbility(str).then((data) => { }
abilityContext.startAbility(str).then((data) => {
}).catch((error) => { }).catch((error) => {
})
}) })
}) }
} Column(){
Column(){ Button(`结束`)
Button(`结束`) .borderRadius(8)
.borderRadius(8) .backgroundColor(0x317aff)
.backgroundColor(0x317aff) .width('30%')
.width('30%') .enabled(!this.StartEnable)
.enabled(!this.StartEnable) .opacity(!this.StartEnable? 1 : 0.4)
.opacity(!this.StartEnable? 1 : 0.4) .onClick(() => {
.onClick(() => { this.StartEnable = !this.StartEnable
this.StartEnable = !this.StartEnable let fd = fileio.openSync(Xpath, 0o100 | 0o2002, 0o664);
let fd = fileio.openSync(Xpath, 0o100 | 0o2002, 0o664); let buf = new ArrayBuffer(4096);
let buf = new ArrayBuffer(4096); fileio.readSync(fd,buf);
fileio.readSync(fd,buf); let report = String.fromCharCode.apply(null,new Uint8Array(buf));
let report = String.fromCharCode.apply(null,new Uint8Array(buf)); let headList = new Array();
let headList = new Array(); let endList = new Array();
let endList = new Array(); let head = report.indexOf(":");
let head = report.indexOf(":"); let end = report.indexOf('|');
let end = report.indexOf('|'); let Fps = new Array();
let Fps = new Array();
while(head > -1){ while(head > -1){
headList.push(head); headList.push(head);
head = report.indexOf(":",head + 1); head = report.indexOf(":",head + 1);
} }
while(end > -1){ while(end > -1){
endList.push(end); endList.push(end);
end = report.indexOf("|",end + 1); end = report.indexOf("|",end + 1);
} }
for(let i = 0; i < headList.length; i++) { for(let i = 0; i < headList.length; i++) {
Fps[i] = Number(report.substring(headList[i]+1,endList[i])); Fps[i] = Number(report.substring(headList[i]+1,endList[i]));
} }
let maxFps = Math.max(...Fps); let maxFps = Math.max(...Fps);
this.Fps = maxFps.toString(); this.Fps = maxFps.toString();
if(maxFps >= 55) { if(maxFps >= 55) {
this.Vue = true; this.Vue = true;
} }
}) })
}
}
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `测试结果:` + this.Fps + '帧' )
.fontColor(Color.White).fontSize('24fp')
} }
}
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `测试结果:` + this.Fps + '帧' )
.fontColor(Color.White).fontSize('24fp')
} }
} }
} }
}.width('100%').height('80%').backgroundColor(Color.Black) }.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly) .justifyContent(FlexAlign.SpaceEvenly)
......
...@@ -29,6 +29,7 @@ struct CustomContainerUser { ...@@ -29,6 +29,7 @@ struct CustomContainerUser {
@State Vue: boolean = false; @State Vue: boolean = false;
@State StartEnable: boolean = true; @State StartEnable: boolean = true;
@State time: string = '0'; @State time: string = '0';
scroller: Scroller = new Scroller();
async aboutToAppear(){ async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name); await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false; this.Vue = false;
...@@ -37,70 +38,71 @@ struct CustomContainerUser { ...@@ -37,70 +38,71 @@ struct CustomContainerUser {
@Builder specificNoParam() { @Builder specificNoParam() {
Column() { Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) { Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){ Scroll(this.scroller) {
Row(){ Column(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n') Row(){
.fontColor(Color.White).fontSize('24fp') Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
} .fontColor(Color.White).fontSize('24fp')
Row(){ }
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入信息` + '\n' + '\n' + Row(){
'3.新建一条信息显示输入框'+ '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择完成时延>键盘按键弹出`+ '\n' + '\n' + Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入信息` + '\n' + '\n' +
`5.点击输入框等待键盘弹出` + '\n' + '\n' + '6.待脚本执行结束回到Validator点击结束键' + '\n' + '\n' '3.新建一条信息显示输入框'+ '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择完成时延>键盘按键弹出`+ '\n' + '\n' +
+ `7.若弹出键盘时延小于或等于1000ms则通过测试` + '\n' + '\n' + '\n' + '\n' ) `5.点击输入框等待键盘弹出` + '\n' + '\n' + '6.待脚本执行结束回到Validator点击结束键' + '\n' + '\n'
.fontColor(Color.White).fontSize('20fp') + `7.若弹出键盘时延小于或等于1000ms则通过测试` + '\n' + '\n' + '\n' + '\n' )
} .fontColor(Color.White).fontSize('20fp')
Row(){ }
Column(){ Row(){
Button(`开始`) Column(){
.borderRadius(8) Button(`开始`)
.backgroundColor(0x317aff) .borderRadius(8)
.width('30%') .backgroundColor(0x317aff)
.enabled(this.StartEnable) .width('30%')
.opacity(this.StartEnable? 1 : 0.4) .enabled(this.StartEnable)
.onClick(async () => { .opacity(this.StartEnable? 1 : 0.4)
this.StartEnable = !this.StartEnable; .onClick(async () => {
let bundleName=new String("com.ohos.mms").toString(); this.StartEnable = !this.StartEnable;
let abilityName=new String("com.ohos.mms.MainAbility").toString(); let bundleName=new String("com.ohos.mms").toString();
let str = { let abilityName=new String("com.ohos.mms.MainAbility").toString();
"bundleName": bundleName, let str = {
"abilityName": abilityName, "bundleName": bundleName,
} "abilityName": abilityName,
}
globalThis.abilityContext.startAbility(str, (err, data) => { globalThis.abilityContext.startAbility(str, (err, data) => {
if(err) { if(err) {
return; 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(":");
this.time = report.substring(head+1);
let time = parseFloat(this.time)
if( 0 < time && time < 1000 ) {
this.Vue = true;
} }
}) })
}) }
} }
Column(){ Row(){
Button(`结束`) Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `输入键盘弹出时延:` + this.time + 'ms' )
.borderRadius(8) .fontColor(Color.White).fontSize('24fp')
.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(":");
this.time = report.substring(head+1);
let time = parseFloat(this.time)
if( 0 < time && time < 1000 ) {
this.Vue = true;
}
})
} }
} }
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `输入键盘弹出时延:` + this.time + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
} }
} }
}.width('100%').height('80%').backgroundColor(Color.Black) }.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly) .justifyContent(FlexAlign.SpaceEvenly)
......
...@@ -29,6 +29,7 @@ struct CustomContainerUser { ...@@ -29,6 +29,7 @@ struct CustomContainerUser {
@State Vue: boolean = false; @State Vue: boolean = false;
@State StartEnable: boolean = true; @State StartEnable: boolean = true;
@State time: string = '0'; @State time: string = '0';
scroller: Scroller = new Scroller();
async aboutToAppear(){ async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name); await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false; this.Vue = false;
...@@ -37,70 +38,71 @@ struct CustomContainerUser { ...@@ -37,70 +38,71 @@ struct CustomContainerUser {
@Builder specificNoParam() { @Builder specificNoParam() {
Column() { Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) { Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){ Scroll(this.scroller) {
Row(){ Column(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n') Row(){
.fontColor(Color.White).fontSize('24fp') Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
} .fontColor(Color.White).fontSize('24fp')
Row(){ }
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入信息` + '\n' + '\n' + Row(){
'3.新建一条信息点击输入框打开键盘'+ '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择响应时延>键盘按键输入`+ '\n' + '\n' Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入信息` + '\n' + '\n' +
+`5.随意点击按键等待响应` + '\n' + '\n' + '6.待脚本执行结束回到Validator点击结束键' + '\n' + '\n' + '3.新建一条信息点击输入框打开键盘'+ '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择响应时延>键盘按键输入`+ '\n' + '\n'
`7.若按键响应时延小于或等于150ms则通过测试` + '\n' + '\n' + '\n' + '\n' ) +`5.随意点击按键等待响应` + '\n' + '\n' + '6.待脚本执行结束回到Validator点击结束键' + '\n' + '\n' +
.fontColor(Color.White).fontSize('20fp') `7.若按键响应时延小于或等于150ms则通过测试` + '\n' + '\n' + '\n' + '\n' )
} .fontColor(Color.White).fontSize('20fp')
Row(){ }
Column(){ Row(){
Button(`开始`) Column(){
.borderRadius(8) Button(`开始`)
.backgroundColor(0x317aff) .borderRadius(8)
.width('30%') .backgroundColor(0x317aff)
.enabled(this.StartEnable) .width('30%')
.opacity(this.StartEnable? 1 : 0.4) .enabled(this.StartEnable)
.onClick(async () => { .opacity(this.StartEnable? 1 : 0.4)
this.StartEnable = !this.StartEnable; .onClick(async () => {
let bundleName=new String("com.ohos.mms").toString(); this.StartEnable = !this.StartEnable;
let abilityName=new String("com.ohos.mms.MainAbility").toString(); let bundleName=new String("com.ohos.mms").toString();
let str = { let abilityName=new String("com.ohos.mms.MainAbility").toString();
"bundleName": bundleName, let str = {
"abilityName": abilityName, "bundleName": bundleName,
} "abilityName": abilityName,
}
globalThis.abilityContext.startAbility(str, (err, data) => { globalThis.abilityContext.startAbility(str, (err, data) => {
if(err) { if(err) {
return; 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(":");
this.time = report.substring(head+1);
let time = parseFloat(this.time)
if( 0 < time && time < 150 ) {
this.Vue = true;
} }
}) })
}) }
} }
Column(){ Row(){
Button(`结束`) Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `按键响应时延:` + this.time + 'ms' )
.borderRadius(8) .fontColor(Color.White).fontSize('24fp')
.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(":");
this.time = report.substring(head+1);
let time = parseFloat(this.time)
if( 0 < time && time < 150 ) {
this.Vue = true;
}
})
} }
} }
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `按键响应时延:` + this.time + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
} }
} }
}.width('100%').height('80%').backgroundColor(Color.Black) }.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly) .justifyContent(FlexAlign.SpaceEvenly)
......
...@@ -35,6 +35,7 @@ struct CustomContainerUser { ...@@ -35,6 +35,7 @@ struct CustomContainerUser {
@State mmsNum: number = 0; @State mmsNum: number = 0;
@State cameraNum: number = 0; @State cameraNum: number = 0;
@State contactsNum: number = 0; @State contactsNum: number = 0;
scroller: Scroller = new Scroller();
async aboutToAppear(){ async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name); await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false; this.Vue = false;
...@@ -43,74 +44,75 @@ struct CustomContainerUser { ...@@ -43,74 +44,75 @@ struct CustomContainerUser {
@Builder specificNoParam() { @Builder specificNoParam() {
Column() { Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) { Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){ Scroll(this.scroller) {
Row(){ Column(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' ) Row(){
.fontColor(Color.White).fontSize('24fp') Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
} .fontColor(Color.White).fontSize('24fp')
Row(){ }
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面` + '\n' + '\n' Row(){
+ `3.清空后台应用,将底层任务栏中应用拖至桌面` + '\n' + '\n' + `4.工作台运行‘点击启动测试.bat’选择冷启动>信息测试,回车执行` Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面` + '\n' + '\n'
+ '\n' + '\n' +`5.测试应用自动执行冷启动后手动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果' + `3.清空后台应用,将底层任务栏中应用拖至桌面` + '\n' + '\n' + `4.工作台运行‘点击启动测试.bat’选择冷启动>信息测试,回车执行`
+ '\n' + '\n' + `7.若冷启动测试在规定时延内完成则通过测试` + '\n' + '\n' ) + '\n' + '\n' +`5.测试应用自动执行冷启动后手动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果'
.fontColor(Color.White).fontSize('20fp') + '\n' + '\n' + `7.若冷启动测试在规定时延内完成则通过测试` + '\n' + '\n' )
} .fontColor(Color.White).fontSize('20fp')
Row(){ }
Column(){ Row(){
Button(`开始`) Column(){
.borderRadius(8) Button(`开始`)
.backgroundColor(0x317aff) .borderRadius(8)
.width('30%') .backgroundColor(0x317aff)
.enabled(this.StartEnable) .width('30%')
.opacity(this.StartEnable? 1 : 0.4) .enabled(this.StartEnable)
.onClick(async () => { .opacity(this.StartEnable? 1 : 0.4)
this.num = 0; .onClick(async () => {
this.StartEnable = !this.StartEnable; this.num = 0;
let str = { this.StartEnable = !this.StartEnable;
bundleName:"com.ohos.launcher", let str = {
abilityName: "com.ohos.launcher.MainAbility", bundleName:"com.ohos.launcher",
} abilityName: "com.ohos.launcher.MainAbility",
abilityContext.startAbility(str).then((data) => { }
abilityContext.startAbility(str).then((data) => {
}).catch((error) => { }).catch((error) => {
})
}) })
}) }
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
mms
*/
let MmsFd = fileio.openSync(MmsColdPath, 0o100 | 0o2002, 0o664);
let MmsBuf = new ArrayBuffer(4096);
fileio.readSync(MmsFd,MmsBuf);
let MmsReport = String.fromCharCode.apply(null,new Uint8Array(MmsBuf));
let MmsHead = MmsReport.indexOf('time:');
let MmsTime = MmsReport.substring(MmsHead+5);
this.mmsNum = parseFloat(MmsTime);
if( 0 < this.mmsNum && this.mmsNum < 2300 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
} }
Column(){ Row(){
Button(`结束`) Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '信息冷启动时延' + this.mmsNum + 'ms')
.borderRadius(8) .fontColor(Color.White).fontSize('24fp')
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
mms
*/
let MmsFd = fileio.openSync(MmsColdPath, 0o100 | 0o2002, 0o664);
let MmsBuf = new ArrayBuffer(4096);
fileio.readSync(MmsFd,MmsBuf);
let MmsReport = String.fromCharCode.apply(null,new Uint8Array(MmsBuf));
let MmsHead = MmsReport.indexOf('time:');
let MmsTime = MmsReport.substring(MmsHead+5);
this.mmsNum = parseFloat(MmsTime);
if( 0 < this.mmsNum && this.mmsNum < 2300 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
} }
} }
Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '信息冷启动时延' + this.mmsNum + 'ms')
.fontColor(Color.White).fontSize('24fp')
}
} }
} }
}.width('100%').height('80%').backgroundColor(Color.Black) }.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly) .justifyContent(FlexAlign.SpaceEvenly)
......
...@@ -35,6 +35,7 @@ struct CustomContainerUser { ...@@ -35,6 +35,7 @@ struct CustomContainerUser {
@State mmsNum: number = 0; @State mmsNum: number = 0;
@State cameraNum: number = 0; @State cameraNum: number = 0;
@State contactsNum: number = 0; @State contactsNum: number = 0;
scroller: Scroller = new Scroller();
async aboutToAppear(){ async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name); await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false; this.Vue = false;
...@@ -43,74 +44,75 @@ struct CustomContainerUser { ...@@ -43,74 +44,75 @@ struct CustomContainerUser {
@Builder specificNoParam() { @Builder specificNoParam() {
Column() { Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) { Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){ Scroll(this.scroller) {
Row(){ Column(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' ) Row(){
.fontColor(Color.White).fontSize('24fp') Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
} .fontColor(Color.White).fontSize('24fp')
Row(){ }
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面`+ '\n' + '\n' Row(){
+ `3.开启信息应用回退到桌面,保证此时后台应用存在` + '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择热启动>信息测试`+ '\n' + '\n' + Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面`+ '\n' + '\n'
`5.测试应用手动执行热启动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果' + '\n' + '\n' + `3.开启信息应用回退到桌面,保证此时后台应用存在` + '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择热启动>信息测试`+ '\n' + '\n' +
+ `7.若所有热启动测试均在规定时延内完成则通过测试` + '\n' + '\n' + '\n' + '\n' ) `5.测试应用手动执行热启动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果' + '\n' + '\n'
.fontColor(Color.White).fontSize('20fp') + `7.若所有热启动测试均在规定时延内完成则通过测试` + '\n' + '\n' + '\n' + '\n' )
} .fontColor(Color.White).fontSize('20fp')
Row(){ }
Column(){ Row(){
Button(`开始`) Column(){
.borderRadius(8) Button(`开始`)
.backgroundColor(0x317aff) .borderRadius(8)
.width('30%') .backgroundColor(0x317aff)
.enabled(this.StartEnable) .width('30%')
.opacity(this.StartEnable? 1 : 0.4) .enabled(this.StartEnable)
.onClick(async () => { .opacity(this.StartEnable? 1 : 0.4)
this.num = 0; .onClick(async () => {
this.StartEnable = !this.StartEnable; this.num = 0;
let str = { this.StartEnable = !this.StartEnable;
bundleName:"com.ohos.launcher", let str = {
abilityName: "com.ohos.launcher.MainAbility", bundleName:"com.ohos.launcher",
} abilityName: "com.ohos.launcher.MainAbility",
abilityContext.startAbility(str).then((data) => { }
abilityContext.startAbility(str).then((data) => {
}).catch((error) => { }).catch((error) => {
})
}) })
}) }
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
mms
*/
let MmsFd = fileio.openSync(MmsColdPath, 0o100 | 0o2002, 0o664);
let MmsBuf = new ArrayBuffer(4096);
fileio.readSync(MmsFd,MmsBuf);
let MmsReport = String.fromCharCode.apply(null,new Uint8Array(MmsBuf));
let MmsHead = MmsReport.indexOf(':');
let MmsTime = MmsReport.substring(MmsHead+1);
this.mmsNum = parseFloat(MmsTime);
if( 0 < this.mmsNum && this.mmsNum < 600 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
} }
Column(){ Row(){
Button(`结束`) Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n'+ '信息热启动时延' + this.mmsNum + 'ms')
.borderRadius(8) .fontColor(Color.White).fontSize('24fp')
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
mms
*/
let MmsFd = fileio.openSync(MmsColdPath, 0o100 | 0o2002, 0o664);
let MmsBuf = new ArrayBuffer(4096);
fileio.readSync(MmsFd,MmsBuf);
let MmsReport = String.fromCharCode.apply(null,new Uint8Array(MmsBuf));
let MmsHead = MmsReport.indexOf(':');
let MmsTime = MmsReport.substring(MmsHead+1);
this.mmsNum = parseFloat(MmsTime);
if( 0 < this.mmsNum && this.mmsNum < 600 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
} }
} }
Row(){
Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n'+ '信息热启动时延' + this.mmsNum + 'ms')
.fontColor(Color.White).fontSize('24fp')
}
} }
} }
}.width('100%').height('80%').backgroundColor(Color.Black) }.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly) .justifyContent(FlexAlign.SpaceEvenly)
......
...@@ -29,6 +29,7 @@ struct CustomContainerUser { ...@@ -29,6 +29,7 @@ struct CustomContainerUser {
@State Vue: boolean = false; @State Vue: boolean = false;
@State StartEnable: boolean = true; @State StartEnable: boolean = true;
@State Fps: string = '0'; @State Fps: string = '0';
scroller: Scroller = new Scroller();
async aboutToAppear(){ async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name); await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false; this.Vue = false;
...@@ -37,86 +38,87 @@ struct CustomContainerUser { ...@@ -37,86 +38,87 @@ struct CustomContainerUser {
@Builder specificNoParam() { @Builder specificNoParam() {
Column() { Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) { Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){ Scroll(this.scroller) {
Row(){ Column(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n') Row(){
.fontColor(Color.White).fontSize('24fp') Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
} .fontColor(Color.White).fontSize('24fp')
Row(){ }
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.在图库中预置500张图片`+ '\n' + '\n' Row(){
+ `3.点击开始键进入图库`+ '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择帧率>图库`+ '\n' + '\n' + Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.在图库中预置500张图片`+ '\n' + '\n'
`5.滑动图库缩略图界面连续10s以上` + '\n' + '\n' + '6.回到PhotoFps测试项点击结束键' + '\n' + '\n' + + `3.点击开始键进入图库`+ '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择帧率>图库`+ '\n' + '\n' +
`7.若测试最高帧率大于或等于55帧则通过测试` + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' ) `5.滑动图库缩略图界面连续10s以上` + '\n' + '\n' + '6.回到PhotoFps测试项点击结束键' + '\n' + '\n' +
.fontColor(Color.White).fontSize('20fp') `7.若测试最高帧率大于或等于55帧则通过测试` + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' )
} .fontColor(Color.White).fontSize('20fp')
Row(){ }
Column(){ Row(){
Button(`开始`) Column(){
.borderRadius(8) Button(`开始`)
.backgroundColor(0x317aff) .borderRadius(8)
.width('30%') .backgroundColor(0x317aff)
.enabled(this.StartEnable) .width('30%')
.opacity(this.StartEnable? 1 : 0.4) .enabled(this.StartEnable)
.onClick(async () => { .opacity(this.StartEnable? 1 : 0.4)
this.StartEnable = !this.StartEnable; .onClick(async () => {
let bundleName=new String("com.ohos.photos").toString(); this.StartEnable = !this.StartEnable;
let abilityName=new String("com.ohos.photos.MainAbility").toString(); let bundleName=new String("com.ohos.photos").toString();
let str = { let abilityName=new String("com.ohos.photos.MainAbility").toString();
"bundleName": bundleName, let str = {
"abilityName": abilityName, "bundleName": bundleName,
} "abilityName": abilityName,
}
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 headList = new Array();
let endList = new Array();
let head = report.indexOf(":");
let end = report.indexOf('|');
let Fps = new Array();
globalThis.abilityContext.startAbility(str, (err, data) => { while(head > -1){
if(err) { headList.push(head);
return; head = report.indexOf(":",head + 1);
}
while(end > -1){
endList.push(end);
end = report.indexOf("|",end + 1);
}
for(let i = 0; i < headList.length; i++) {
Fps[i] = Number(report.substring(headList[i]+1,endList[i]));
}
let maxFps = Math.max(...Fps);
this.Fps = maxFps.toString();
if(maxFps >= 55) {
this.Vue = true;
} }
}) })
}) }
} }
Column(){ Row(){
Button(`结束`) Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `测试结果:` + this.Fps + '帧' )
.borderRadius(8) .fontColor(Color.White).fontSize('24fp')
.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 headList = new Array();
let endList = new Array();
let head = report.indexOf(":");
let end = report.indexOf('|');
let Fps = new Array();
while(head > -1){
headList.push(head);
head = report.indexOf(":",head + 1);
}
while(end > -1){
endList.push(end);
end = report.indexOf("|",end + 1);
}
for(let i = 0; i < headList.length; i++) {
Fps[i] = Number(report.substring(headList[i]+1,endList[i]));
}
let maxFps = Math.max(...Fps);
this.Fps = maxFps.toString();
if(maxFps >= 55) {
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) }.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly) .justifyContent(FlexAlign.SpaceEvenly)
......
...@@ -35,6 +35,7 @@ struct CustomContainerUser { ...@@ -35,6 +35,7 @@ struct CustomContainerUser {
@State mmsNum: number = 0; @State mmsNum: number = 0;
@State cameraNum: number = 0; @State cameraNum: number = 0;
@State contactsNum: number = 0; @State contactsNum: number = 0;
scroller: Scroller = new Scroller();
async aboutToAppear(){ async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name); await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false; this.Vue = false;
...@@ -43,74 +44,75 @@ struct CustomContainerUser { ...@@ -43,74 +44,75 @@ struct CustomContainerUser {
@Builder specificNoParam() { @Builder specificNoParam() {
Column() { Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) { Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){ Scroll(this.scroller) {
Row(){ Column(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' ) Row(){
.fontColor(Color.White).fontSize('24fp') Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
} .fontColor(Color.White).fontSize('24fp')
Row(){ }
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面` + '\n' + '\n' Row(){
+ `3.清空后台应用,将底层任务栏中应用拖至桌面` + '\n' + '\n' + `4.工作台运行‘点击启动测试.bat’选择冷启动>图库测试,回车执行` Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面` + '\n' + '\n'
+ '\n' + '\n' +`5.测试应用自动执行冷启动后手动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果' + `3.清空后台应用,将底层任务栏中应用拖至桌面` + '\n' + '\n' + `4.工作台运行‘点击启动测试.bat’选择冷启动>图库测试,回车执行`
+ '\n' + '\n' + `7.若冷启动测试在规定时延内完成则通过测试` + '\n' + '\n' ) + '\n' + '\n' +`5.测试应用自动执行冷启动后手动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果'
.fontColor(Color.White).fontSize('20fp') + '\n' + '\n' + `7.若冷启动测试在规定时延内完成则通过测试` + '\n' + '\n' )
} .fontColor(Color.White).fontSize('20fp')
Row(){ }
Column(){ Row(){
Button(`开始`) Column(){
.borderRadius(8) Button(`开始`)
.backgroundColor(0x317aff) .borderRadius(8)
.width('30%') .backgroundColor(0x317aff)
.enabled(this.StartEnable) .width('30%')
.opacity(this.StartEnable? 1 : 0.4) .enabled(this.StartEnable)
.onClick(async () => { .opacity(this.StartEnable? 1 : 0.4)
this.num = 0; .onClick(async () => {
this.StartEnable = !this.StartEnable; this.num = 0;
let str = { this.StartEnable = !this.StartEnable;
bundleName:"com.ohos.launcher", let str = {
abilityName: "com.ohos.launcher.MainAbility", bundleName:"com.ohos.launcher",
} abilityName: "com.ohos.launcher.MainAbility",
abilityContext.startAbility(str).then((data) => { }
abilityContext.startAbility(str).then((data) => {
}).catch((error) => { }).catch((error) => {
})
}) })
}) }
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
photos
*/
let photosFd = fileio.openSync(PhotosColdPath, 0o100 | 0o2002, 0o664);
let photosBuf = new ArrayBuffer(4096);
fileio.readSync(photosFd,photosBuf);
let photosReport = String.fromCharCode.apply(null,new Uint8Array(photosBuf));
let photosHead = photosReport.indexOf('time:');
let photosTime = photosReport.substring(photosHead+5);
this.photosNum = parseFloat(photosTime);
if( 0 < this.photosNum && this.photosNum < 2300 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
} }
Column(){ Row(){
Button(`结束`) Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '图库冷启动时延' + this.photosNum + 'ms')
.borderRadius(8) .fontColor(Color.White).fontSize('24fp')
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
photos
*/
let photosFd = fileio.openSync(PhotosColdPath, 0o100 | 0o2002, 0o664);
let photosBuf = new ArrayBuffer(4096);
fileio.readSync(photosFd,photosBuf);
let photosReport = String.fromCharCode.apply(null,new Uint8Array(photosBuf));
let photosHead = photosReport.indexOf('time:');
let photosTime = photosReport.substring(photosHead+5);
this.photosNum = parseFloat(photosTime);
if( 0 < this.photosNum && this.photosNum < 2300 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
} }
} }
Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '图库冷启动时延' + this.photosNum + 'ms')
.fontColor(Color.White).fontSize('24fp')
}
} }
} }
}.width('100%').height('80%').backgroundColor(Color.Black) }.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly) .justifyContent(FlexAlign.SpaceEvenly)
......
...@@ -35,6 +35,7 @@ struct CustomContainerUser { ...@@ -35,6 +35,7 @@ struct CustomContainerUser {
@State mmsNum: number = 0; @State mmsNum: number = 0;
@State cameraNum: number = 0; @State cameraNum: number = 0;
@State contactsNum: number = 0; @State contactsNum: number = 0;
scroller: Scroller = new Scroller();
async aboutToAppear(){ async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name); await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false; this.Vue = false;
...@@ -43,74 +44,75 @@ struct CustomContainerUser { ...@@ -43,74 +44,75 @@ struct CustomContainerUser {
@Builder specificNoParam() { @Builder specificNoParam() {
Column() { Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) { Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){ Scroll(this.scroller) {
Row(){ Column(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' ) Row(){
.fontColor(Color.White).fontSize('24fp') Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
} .fontColor(Color.White).fontSize('24fp')
Row(){ }
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面`+ '\n' + '\n' Row(){
+ `3.开启图库应用回退到桌面,保证此时后台应用存在` + '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择热启动>图库测试`+ '\n' + '\n' + Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面`+ '\n' + '\n'
`5.测试应用手动执行热启动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果' + '\n' + '\n' + `3.开启图库应用回退到桌面,保证此时后台应用存在` + '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择热启动>图库测试`+ '\n' + '\n' +
+ `7.若所有热启动测试均在规定时延内完成则通过测试` + '\n' + '\n' + '\n' + '\n' ) `5.测试应用手动执行热启动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果' + '\n' + '\n'
.fontColor(Color.White).fontSize('20fp') + `7.若所有热启动测试均在规定时延内完成则通过测试` + '\n' + '\n' + '\n' + '\n' )
} .fontColor(Color.White).fontSize('20fp')
Row(){ }
Column(){ Row(){
Button(`开始`) Column(){
.borderRadius(8) Button(`开始`)
.backgroundColor(0x317aff) .borderRadius(8)
.width('30%') .backgroundColor(0x317aff)
.enabled(this.StartEnable) .width('30%')
.opacity(this.StartEnable? 1 : 0.4) .enabled(this.StartEnable)
.onClick(async () => { .opacity(this.StartEnable? 1 : 0.4)
this.num = 0; .onClick(async () => {
this.StartEnable = !this.StartEnable; this.num = 0;
let str = { this.StartEnable = !this.StartEnable;
bundleName:"com.ohos.launcher", let str = {
abilityName: "com.ohos.launcher.MainAbility", bundleName:"com.ohos.launcher",
} abilityName: "com.ohos.launcher.MainAbility",
abilityContext.startAbility(str).then((data) => { }
abilityContext.startAbility(str).then((data) => {
}).catch((error) => { }).catch((error) => {
})
}) })
}) }
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
photos
*/
let photosFd = fileio.openSync(PhotosColdPath, 0o100 | 0o2002, 0o664);
let photosBuf = new ArrayBuffer(4096);
fileio.readSync(photosFd,photosBuf);
let photosReport = String.fromCharCode.apply(null,new Uint8Array(photosBuf));
let photosHead = photosReport.indexOf(':');
let photosTime = photosReport.substring(photosHead+1);
this.photosNum = parseFloat(photosTime);
if( 0 < this.photosNum && this.photosNum < 600 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
} }
Column(){ Row(){
Button(`结束`) Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n' + '图库热启动时延' + this.photosNum + 'ms')
.borderRadius(8) .fontColor(Color.White).fontSize('24fp')
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
photos
*/
let photosFd = fileio.openSync(PhotosColdPath, 0o100 | 0o2002, 0o664);
let photosBuf = new ArrayBuffer(4096);
fileio.readSync(photosFd,photosBuf);
let photosReport = String.fromCharCode.apply(null,new Uint8Array(photosBuf));
let photosHead = photosReport.indexOf(':');
let photosTime = photosReport.substring(photosHead+1);
this.photosNum = parseFloat(photosTime);
if( 0 < this.photosNum && this.photosNum < 600 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
} }
} }
Row(){
Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n' + '图库热启动时延' + this.photosNum + 'ms')
.fontColor(Color.White).fontSize('24fp')
}
} }
} }
}.width('100%').height('80%').backgroundColor(Color.Black) }.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly) .justifyContent(FlexAlign.SpaceEvenly)
......
...@@ -29,6 +29,7 @@ struct CustomContainerUser { ...@@ -29,6 +29,7 @@ struct CustomContainerUser {
@State Vue: boolean = false; @State Vue: boolean = false;
@State StartEnable: boolean = true; @State StartEnable: boolean = true;
@State time: string = '0'; @State time: string = '0';
scroller: Scroller = new Scroller();
async aboutToAppear(){ async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name); await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false; this.Vue = false;
...@@ -37,70 +38,71 @@ struct CustomContainerUser { ...@@ -37,70 +38,71 @@ struct CustomContainerUser {
@Builder specificNoParam() { @Builder specificNoParam() {
Column() { Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) { Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){ Scroll(this.scroller) {
Row(){ Column(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n') Row(){
.fontColor(Color.White).fontSize('24fp') Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
} .fontColor(Color.White).fontSize('24fp')
Row(){ }
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.在图库中预置500张图片`+ '\n' + '\n' Row(){
+`3.点击开始键进入图库`+ '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择响应时延>图库缩略列表滑动`+ '\n' + '\n' + Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.在图库中预置500张图片`+ '\n' + '\n'
`5.滑动图库缩略列表等待响应` + '\n' + '\n' + '6.待脚本执行结束回到Validator点击结束键' + '\n' + '\n' + +`3.点击开始键进入图库`+ '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择响应时延>图库缩略列表滑动`+ '\n' + '\n' +
`7.若滑动响应时延小于或等于150ms则通过测试` + '\n' + '\n' + '\n' + '\n' ) `5.滑动图库缩略列表等待响应` + '\n' + '\n' + '6.待脚本执行结束回到Validator点击结束键' + '\n' + '\n' +
.fontColor(Color.White).fontSize('20fp') `7.若滑动响应时延小于或等于150ms则通过测试` + '\n' + '\n' + '\n' + '\n' )
} .fontColor(Color.White).fontSize('20fp')
Row(){ }
Column(){ Row(){
Button(`开始`) Column(){
.borderRadius(8) Button(`开始`)
.backgroundColor(0x317aff) .borderRadius(8)
.width('30%') .backgroundColor(0x317aff)
.enabled(this.StartEnable) .width('30%')
.opacity(this.StartEnable? 1 : 0.4) .enabled(this.StartEnable)
.onClick(async () => { .opacity(this.StartEnable? 1 : 0.4)
this.StartEnable = !this.StartEnable; .onClick(async () => {
let bundleName=new String("com.ohos.photos").toString(); this.StartEnable = !this.StartEnable;
let abilityName=new String("com.ohos.photos.MainAbility").toString(); let bundleName=new String("com.ohos.photos").toString();
let str = { let abilityName=new String("com.ohos.photos.MainAbility").toString();
"bundleName": bundleName, let str = {
"abilityName": abilityName, "bundleName": bundleName,
} "abilityName": abilityName,
}
globalThis.abilityContext.startAbility(str, (err, data) => { globalThis.abilityContext.startAbility(str, (err, data) => {
if(err) { if(err) {
return; 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(":");
this.time = report.substring(head+1);
let time = parseFloat(this.time)
if( 0 < time && time < 150 ) {
this.Vue = true;
} }
}) })
}) }
} }
Column(){ Row(){
Button(`结束`) Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `滑动响应时延:` + this.time + 'ms' )
.borderRadius(8) .fontColor(Color.White).fontSize('24fp')
.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(":");
this.time = report.substring(head+1);
let time = parseFloat(this.time)
if( 0 < time && time < 150 ) {
this.Vue = true;
}
})
} }
} }
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `滑动响应时延:` + this.time + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
} }
} }
}.width('100%').height('80%').backgroundColor(Color.Black) }.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly) .justifyContent(FlexAlign.SpaceEvenly)
......
...@@ -35,6 +35,7 @@ struct CustomContainerUser { ...@@ -35,6 +35,7 @@ struct CustomContainerUser {
@State mmsNum: number = 0; @State mmsNum: number = 0;
@State cameraNum: number = 0; @State cameraNum: number = 0;
@State contactsNum: number = 0; @State contactsNum: number = 0;
scroller: Scroller = new Scroller();
async aboutToAppear(){ async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name); await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false; this.Vue = false;
...@@ -43,74 +44,75 @@ struct CustomContainerUser { ...@@ -43,74 +44,75 @@ struct CustomContainerUser {
@Builder specificNoParam() { @Builder specificNoParam() {
Column() { Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) { Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){ Scroll(this.scroller) {
Row(){ Column(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' ) Row(){
.fontColor(Color.White).fontSize('24fp') Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
} .fontColor(Color.White).fontSize('24fp')
Row(){ }
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面` + '\n' + '\n' Row(){
+ `3.清空后台应用,将底层任务栏中应用拖至桌面` + '\n' + '\n' + `4.工作台运行‘点击启动测试.bat’选择冷启动>设置测试,回车执行` Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面` + '\n' + '\n'
+ '\n' + '\n' +`5.测试应用自动执行冷启动后手动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果' + `3.清空后台应用,将底层任务栏中应用拖至桌面` + '\n' + '\n' + `4.工作台运行‘点击启动测试.bat’选择冷启动>设置测试,回车执行`
+ '\n' + '\n' + `7.若冷启动测试在规定时延内完成则通过测试` + '\n' + '\n' ) + '\n' + '\n' +`5.测试应用自动执行冷启动后手动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果'
.fontColor(Color.White).fontSize('20fp') + '\n' + '\n' + `7.若冷启动测试在规定时延内完成则通过测试` + '\n' + '\n' )
} .fontColor(Color.White).fontSize('20fp')
Row(){ }
Column(){ Row(){
Button(`开始`) Column(){
.borderRadius(8) Button(`开始`)
.backgroundColor(0x317aff) .borderRadius(8)
.width('30%') .backgroundColor(0x317aff)
.enabled(this.StartEnable) .width('30%')
.opacity(this.StartEnable? 1 : 0.4) .enabled(this.StartEnable)
.onClick(async () => { .opacity(this.StartEnable? 1 : 0.4)
this.num = 0; .onClick(async () => {
this.StartEnable = !this.StartEnable; this.num = 0;
let str = { this.StartEnable = !this.StartEnable;
bundleName:"com.ohos.launcher", let str = {
abilityName: "com.ohos.launcher.MainAbility", bundleName:"com.ohos.launcher",
} abilityName: "com.ohos.launcher.MainAbility",
abilityContext.startAbility(str).then((data) => { }
abilityContext.startAbility(str).then((data) => {
}).catch((error) => { }).catch((error) => {
})
}) })
}) }
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
settings
*/
let setFd = fileio.openSync(SettingsColdPath, 0o100 | 0o2002, 0o664);
let setBuf = new ArrayBuffer(4096);
fileio.readSync(setFd,setBuf);
let setReport = String.fromCharCode.apply(null,new Uint8Array(setBuf));
let setHead = setReport.indexOf('time:');
let setTime = setReport.substring(setHead+5);
this.setNum = parseFloat(setTime);
if( 0 < this.setNum && this.setNum < 2300 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
} }
Column(){ Row(){
Button(`结束`) Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '设置冷启动时延' + this.setNum + 'ms')
.borderRadius(8) .fontColor(Color.White).fontSize('24fp')
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
settings
*/
let setFd = fileio.openSync(SettingsColdPath, 0o100 | 0o2002, 0o664);
let setBuf = new ArrayBuffer(4096);
fileio.readSync(setFd,setBuf);
let setReport = String.fromCharCode.apply(null,new Uint8Array(setBuf));
let setHead = setReport.indexOf('time:');
let setTime = setReport.substring(setHead+5);
this.setNum = parseFloat(setTime);
if( 0 < this.setNum && this.setNum < 2300 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
} }
} }
Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '设置冷启动时延' + this.setNum + 'ms')
.fontColor(Color.White).fontSize('24fp')
}
} }
} }
}.width('100%').height('80%').backgroundColor(Color.Black) }.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly) .justifyContent(FlexAlign.SpaceEvenly)
......
...@@ -35,6 +35,7 @@ struct CustomContainerUser { ...@@ -35,6 +35,7 @@ struct CustomContainerUser {
@State mmsNum: number = 0; @State mmsNum: number = 0;
@State cameraNum: number = 0; @State cameraNum: number = 0;
@State contactsNum: number = 0; @State contactsNum: number = 0;
scroller: Scroller = new Scroller();
async aboutToAppear(){ async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name); await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false; this.Vue = false;
...@@ -43,74 +44,75 @@ struct CustomContainerUser { ...@@ -43,74 +44,75 @@ struct CustomContainerUser {
@Builder specificNoParam() { @Builder specificNoParam() {
Column() { Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) { Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){ Scroll(this.scroller) {
Row(){ Column(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' ) Row(){
.fontColor(Color.White).fontSize('24fp') Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
} .fontColor(Color.White).fontSize('24fp')
Row(){ }
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面`+ '\n' + '\n' Row(){
+ `3.开启设置应用回退到桌面,保证此时后台应用存在` + '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择热启动>设置测试`+ '\n' + '\n' + Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入系统桌面`+ '\n' + '\n'
`5.测试应用手动执行热启动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果' + '\n' + '\n' + `3.开启设置应用回退到桌面,保证此时后台应用存在` + '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择热启动>设置测试`+ '\n' + '\n' +
+ `7.若所有热启动测试均在规定时延内完成则通过测试` + '\n' + '\n' + '\n' + '\n' ) `5.测试应用手动执行热启动返回validator界面` + '\n' + '\n' + '6.点击结束键观察测试结果' + '\n' + '\n'
.fontColor(Color.White).fontSize('20fp') + `7.若所有热启动测试均在规定时延内完成则通过测试` + '\n' + '\n' + '\n' + '\n' )
} .fontColor(Color.White).fontSize('20fp')
Row(){ }
Column(){ Row(){
Button(`开始`) Column(){
.borderRadius(8) Button(`开始`)
.backgroundColor(0x317aff) .borderRadius(8)
.width('30%') .backgroundColor(0x317aff)
.enabled(this.StartEnable) .width('30%')
.opacity(this.StartEnable? 1 : 0.4) .enabled(this.StartEnable)
.onClick(async () => { .opacity(this.StartEnable? 1 : 0.4)
this.num = 0; .onClick(async () => {
this.StartEnable = !this.StartEnable; this.num = 0;
let str = { this.StartEnable = !this.StartEnable;
bundleName:"com.ohos.launcher", let str = {
abilityName: "com.ohos.launcher.MainAbility", bundleName:"com.ohos.launcher",
} abilityName: "com.ohos.launcher.MainAbility",
abilityContext.startAbility(str).then((data) => { }
abilityContext.startAbility(str).then((data) => {
}).catch((error) => { }).catch((error) => {
})
}) })
}) }
Column(){
Button(`结束`)
.borderRadius(8)
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
settings
*/
let setFd = fileio.openSync(SettingsColdPath, 0o100 | 0o2002, 0o664);
let setBuf = new ArrayBuffer(4096);
fileio.readSync(setFd,setBuf);
let setReport = String.fromCharCode.apply(null,new Uint8Array(setBuf));
let setHead = setReport.indexOf(':');
let setTime = setReport.substring(setHead+1);
this.setNum = parseFloat(setTime);
if( 0 < this.setNum && this.setNum < 600 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
} }
Column(){ Row(){
Button(`结束`) Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n' + '设置热启动时延' + this.setNum + 'ms')
.borderRadius(8) .fontColor(Color.White).fontSize('24fp')
.backgroundColor(0x317aff)
.width('30%')
.enabled(!this.StartEnable)
.opacity(!this.StartEnable? 1 : 0.4)
.onClick(() => {
this.StartEnable = !this.StartEnable
/*
settings
*/
let setFd = fileio.openSync(SettingsColdPath, 0o100 | 0o2002, 0o664);
let setBuf = new ArrayBuffer(4096);
fileio.readSync(setFd,setBuf);
let setReport = String.fromCharCode.apply(null,new Uint8Array(setBuf));
let setHead = setReport.indexOf(':');
let setTime = setReport.substring(setHead+1);
this.setNum = parseFloat(setTime);
if( 0 < this.setNum && this.setNum < 600 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
} }
} }
Row(){
Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n' + '设置热启动时延' + this.setNum + 'ms')
.fontColor(Color.White).fontSize('24fp')
}
} }
} }
}.width('100%').height('80%').backgroundColor(Color.Black) }.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly) .justifyContent(FlexAlign.SpaceEvenly)
......
...@@ -31,6 +31,7 @@ struct CustomContainerUser { ...@@ -31,6 +31,7 @@ struct CustomContainerUser {
@State Vue: boolean = false; @State Vue: boolean = false;
@State StartEnable: boolean = true; @State StartEnable: boolean = true;
@State time: string = '0'; @State time: string = '0';
scroller: Scroller = new Scroller();
async aboutToAppear(){ async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name); await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false; this.Vue = false;
...@@ -39,67 +40,68 @@ struct CustomContainerUser { ...@@ -39,67 +40,68 @@ struct CustomContainerUser {
@Builder specificNoParam() { @Builder specificNoParam() {
Column() { Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) { Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){ Scroll(this.scroller) {
Row(){ Column(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n') Row(){
.fontColor(Color.White).fontSize('24fp') Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
} .fontColor(Color.White).fontSize('24fp')
Row(){ }
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入桌面开启任务管理器` Row(){
+ '\n' + '\n' + `3.工作台运行’点击启动测试.bat‘选择完成时延>后台任务切换`+ '\n' + '\n' +`4.随意点开一个后台任务` Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入桌面开启任务管理器`
+ '\n' + '\n' + '5.待脚本执行结束回到Validator点击结束键' + '\n' + '\n' + + '\n' + '\n' + `3.工作台运行’点击启动测试.bat‘选择完成时延>后台任务切换`+ '\n' + '\n' +`4.随意点开一个后台任务`
`6.若打开后台任务时延小于或等于600ms则通过测试` + '\n' + '\n' + '\n' + '\n' ) + '\n' + '\n' + '5.待脚本执行结束回到Validator点击结束键' + '\n' + '\n' +
.fontColor(Color.White).fontSize('20fp') `6.若打开后台任务时延小于或等于600ms则通过测试` + '\n' + '\n' + '\n' + '\n' )
} .fontColor(Color.White).fontSize('20fp')
Row(){ }
Column(){ Row(){
Button(`开始`) Column(){
.borderRadius(8) Button(`开始`)
.backgroundColor(0x317aff) .borderRadius(8)
.width('30%') .backgroundColor(0x317aff)
.enabled(this.StartEnable) .width('30%')
.opacity(this.StartEnable? 1 : 0.4) .enabled(this.StartEnable)
.onClick(async () => { .opacity(this.StartEnable? 1 : 0.4)
this.StartEnable = !this.StartEnable; .onClick(async () => {
let str = { this.StartEnable = !this.StartEnable;
bundleName:"com.ohos.launcher", let str = {
abilityName: "com.ohos.launcher.MainAbility", bundleName:"com.ohos.launcher",
} abilityName: "com.ohos.launcher.MainAbility",
abilityContext.startAbility(str).then((data) => { }
abilityContext.startAbility(str).then((data) => {
}).catch((error) => { }).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(":");
this.time = report.substring(head+1);
let time = parseFloat(this.time)
if( 0 < time && time < 600 ) {
this.Vue = true;
}
})
}
} }
Column(){ Row(){
Button(`结束`) Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `打开后台任务时延:` + this.time + 'ms' )
.borderRadius(8) .fontColor(Color.White).fontSize('24fp')
.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(":");
this.time = report.substring(head+1);
let time = parseFloat(this.time)
if( 0 < time && time < 600 ) {
this.Vue = true;
}
})
} }
} }
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `打开后台任务时延:` + this.time + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
} }
} }
}.width('100%').height('80%').backgroundColor(Color.Black) }.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly) .justifyContent(FlexAlign.SpaceEvenly)
......
...@@ -31,6 +31,7 @@ struct CustomContainerUser { ...@@ -31,6 +31,7 @@ struct CustomContainerUser {
@State Vue: boolean = false; @State Vue: boolean = false;
@State StartEnable: boolean = true; @State StartEnable: boolean = true;
@State time: string = '0'; @State time: string = '0';
scroller: Scroller = new Scroller();
async aboutToAppear(){ async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name); await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false; this.Vue = false;
...@@ -39,67 +40,68 @@ struct CustomContainerUser { ...@@ -39,67 +40,68 @@ struct CustomContainerUser {
@Builder specificNoParam() { @Builder specificNoParam() {
Column() { Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) { Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){ Scroll(this.scroller) {
Row(){ Column(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n') Row(){
.fontColor(Color.White).fontSize('24fp') Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
} .fontColor(Color.White).fontSize('24fp')
Row(){ }
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入桌面` + '\n' + '\n' Row(){
+ `3.工作台运行’点击启动测试.bat‘选择响应时延>下拉状态栏`+ '\n' + '\n' +`4.从屏幕顶部滑动下拉通知栏` + '\n' + '\n' Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入桌面` + '\n' + '\n'
+ '5.待脚本执行结束回到Validator点击结束键' + '\n' + '\n' + `6.若下拉通知栏时延小于或等于150ms则通过测试` + + `3.工作台运行’点击启动测试.bat‘选择响应时延>下拉状态栏`+ '\n' + '\n' +`4.从屏幕顶部滑动下拉通知栏` + '\n' + '\n'
'\n' + '\n' + '\n' + '\n' ) + '5.待脚本执行结束回到Validator点击结束键' + '\n' + '\n' + `6.若下拉通知栏时延小于或等于150ms则通过测试` +
.fontColor(Color.White).fontSize('20fp') '\n' + '\n' + '\n' + '\n' )
} .fontColor(Color.White).fontSize('20fp')
Row(){ }
Column(){ Row(){
Button(`开始`) Column(){
.borderRadius(8) Button(`开始`)
.backgroundColor(0x317aff) .borderRadius(8)
.width('30%') .backgroundColor(0x317aff)
.enabled(this.StartEnable) .width('30%')
.opacity(this.StartEnable? 1 : 0.4) .enabled(this.StartEnable)
.onClick(async () => { .opacity(this.StartEnable? 1 : 0.4)
this.StartEnable = !this.StartEnable; .onClick(async () => {
let str = { this.StartEnable = !this.StartEnable;
bundleName:"com.ohos.launcher", let str = {
abilityName: "com.ohos.launcher.MainAbility", bundleName:"com.ohos.launcher",
} abilityName: "com.ohos.launcher.MainAbility",
abilityContext.startAbility(str).then((data) => { }
abilityContext.startAbility(str).then((data) => {
}).catch((error) => { }).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(":");
this.time = report.substring(head+1);
let time = parseFloat(this.time)
if( 0 < time && time < 150 ) {
this.Vue = true;
}
})
}
} }
Column(){ Row(){
Button(`结束`) Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `下拉通知栏时延:` + this.time + 'ms' )
.borderRadius(8) .fontColor(Color.White).fontSize('24fp')
.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(":");
this.time = report.substring(head+1);
let time = parseFloat(this.time)
if( 0 < time && time < 150 ) {
this.Vue = true;
}
})
} }
} }
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `下拉通知栏时延:` + this.time + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
} }
} }
}.width('100%').height('80%').backgroundColor(Color.Black) }.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly) .justifyContent(FlexAlign.SpaceEvenly)
......
...@@ -31,6 +31,7 @@ struct CustomContainerUser { ...@@ -31,6 +31,7 @@ struct CustomContainerUser {
@State Vue: boolean = false; @State Vue: boolean = false;
@State StartEnable: boolean = true; @State StartEnable: boolean = true;
@State time: string = '0'; @State time: string = '0';
scroller: Scroller = new Scroller();
async aboutToAppear(){ async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name); await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false; this.Vue = false;
...@@ -39,67 +40,68 @@ struct CustomContainerUser { ...@@ -39,67 +40,68 @@ struct CustomContainerUser {
@Builder specificNoParam() { @Builder specificNoParam() {
Column() { Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) { Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){ Scroll(this.scroller) {
Row(){ Column(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n') Row(){
.fontColor(Color.White).fontSize('24fp') Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
} .fontColor(Color.White).fontSize('24fp')
Row(){ }
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入桌面` + '\n' + '\n' Row(){
+ `3.工作台运行’点击启动测试.bat‘选择完成时延>启动任务管理器`+ '\n' + '\n' +`4.点击右下角方框开启任务管理器` + '\n' + '\n' Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.点击开始键进入桌面` + '\n' + '\n'
+ '5.待脚本执行结束回到Validator点击结束键' + '\n' + '\n' + `6.若启动任务管理器时延小于或等于1000ms则通过测试` + `3.工作台运行’点击启动测试.bat‘选择完成时延>启动任务管理器`+ '\n' + '\n' +`4.点击右下角方框开启任务管理器` + '\n' + '\n'
+ '\n' + '\n' + '\n' + '\n' ) + '5.待脚本执行结束回到Validator点击结束键' + '\n' + '\n' + `6.若启动任务管理器时延小于或等于1000ms则通过测试`
.fontColor(Color.White).fontSize('20fp') + '\n' + '\n' + '\n' + '\n' )
} .fontColor(Color.White).fontSize('20fp')
Row(){ }
Column(){ Row(){
Button(`开始`) Column(){
.borderRadius(8) Button(`开始`)
.backgroundColor(0x317aff) .borderRadius(8)
.width('30%') .backgroundColor(0x317aff)
.enabled(this.StartEnable) .width('30%')
.opacity(this.StartEnable? 1 : 0.4) .enabled(this.StartEnable)
.onClick(async () => { .opacity(this.StartEnable? 1 : 0.4)
this.StartEnable = !this.StartEnable; .onClick(async () => {
let str = { this.StartEnable = !this.StartEnable;
bundleName:"com.ohos.launcher", let str = {
abilityName: "com.ohos.launcher.MainAbility", bundleName:"com.ohos.launcher",
} abilityName: "com.ohos.launcher.MainAbility",
abilityContext.startAbility(str).then((data) => { }
abilityContext.startAbility(str).then((data) => {
}).catch((error) => { }).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(":");
this.time = report.substring(head+1);
let time = parseFloat(this.time)
if( 0 < time && time < 1000 ) {
this.Vue = true;
}
})
}
} }
Column(){ Row(){
Button(`结束`) Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `启动任务管理器时延:` + this.time + 'ms' )
.borderRadius(8) .fontColor(Color.White).fontSize('24fp')
.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(":");
this.time = report.substring(head+1);
let time = parseFloat(this.time)
if( 0 < time && time < 1000 ) {
this.Vue = true;
}
})
} }
} }
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `启动任务管理器时延:` + this.time + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
} }
} }
}.width('100%').height('80%').backgroundColor(Color.Black) }.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly) .justifyContent(FlexAlign.SpaceEvenly)
......
...@@ -29,6 +29,7 @@ struct CustomContainerUser { ...@@ -29,6 +29,7 @@ struct CustomContainerUser {
@State Vue: boolean = false; @State Vue: boolean = false;
@State StartEnable: boolean = true; @State StartEnable: boolean = true;
@State time: string = '0'; @State time: string = '0';
scroller: Scroller = new Scroller();
async aboutToAppear(){ async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name); await FirstDialog.ChooseDialog(this.StepTips,this.name);
this.Vue = false; this.Vue = false;
...@@ -37,70 +38,71 @@ struct CustomContainerUser { ...@@ -37,70 +38,71 @@ struct CustomContainerUser {
@Builder specificNoParam() { @Builder specificNoParam() {
Column() { Column() {
Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) { Flex({direction:FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) {
Column(){ Scroll(this.scroller) {
Row(){ Column(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n') Row(){
.fontColor(Color.White).fontSize('24fp') Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
} .fontColor(Color.White).fontSize('24fp')
Row(){ }
Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.在图库中预置500张图片`+ '\n' + '\n' Row(){
+ `3.点击开始键进入图库`+ '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择响应时延>查看图片` + '\n' + '\n' + Text(`测试步骤:`+ '\n' + '\n' + '1.测试设备通过USB连接工作台' + '\n' + '\n' + `2.在图库中预置500张图片`+ '\n' + '\n'
`5.点击一张图库缩略图等待响应` + '\n' + '\n' + '6.待脚本执行结束回到Validator点击结束键' + '\n' + '\n' + + `3.点击开始键进入图库`+ '\n' + '\n' + `4.工作台运行’点击启动测试.bat‘选择响应时延>查看图片` + '\n' + '\n' +
`7.若图片响应时延小于或等于150ms则通过测试` + '\n' + '\n' + '\n' + '\n' ) `5.点击一张图库缩略图等待响应` + '\n' + '\n' + '6.待脚本执行结束回到Validator点击结束键' + '\n' + '\n' +
.fontColor(Color.White).fontSize('20fp') `7.若图片响应时延小于或等于150ms则通过测试` + '\n' + '\n' + '\n' + '\n' )
} .fontColor(Color.White).fontSize('20fp')
Row(){ }
Column(){ Row(){
Button(`开始`) Column(){
.borderRadius(8) Button(`开始`)
.backgroundColor(0x317aff) .borderRadius(8)
.width('30%') .backgroundColor(0x317aff)
.enabled(this.StartEnable) .width('30%')
.opacity(this.StartEnable? 1 : 0.4) .enabled(this.StartEnable)
.onClick(async () => { .opacity(this.StartEnable? 1 : 0.4)
this.StartEnable = !this.StartEnable; .onClick(async () => {
let bundleName=new String("com.ohos.photos").toString(); this.StartEnable = !this.StartEnable;
let abilityName=new String("com.ohos.photos.MainAbility").toString(); let bundleName=new String("com.ohos.photos").toString();
let str = { let abilityName=new String("com.ohos.photos.MainAbility").toString();
"bundleName": bundleName, let str = {
"abilityName": abilityName, "bundleName": bundleName,
} "abilityName": abilityName,
}
globalThis.abilityContext.startAbility(str, (err, data) => { globalThis.abilityContext.startAbility(str, (err, data) => {
if(err) { if(err) {
return; 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(":");
this.time = report.substring(head+1);
let time = parseFloat(this.time)
if( 0 < time && time < 150 ) {
this.Vue = true;
} }
}) })
}) }
} }
Column(){ Row(){
Button(`结束`) Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `图片响应时延:` + this.time + 'ms' )
.borderRadius(8) .fontColor(Color.White).fontSize('24fp')
.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(":");
this.time = report.substring(head+1);
let time = parseFloat(this.time)
if( 0 < time && time < 150 ) {
this.Vue = true;
}
})
} }
} }
Row(){
Text('\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n' + `图片响应时延:` + this.time + 'ms' )
.fontColor(Color.White).fontSize('24fp')
}
} }
} }
}.width('100%').height('80%').backgroundColor(Color.Black) }.width('100%').height('80%').backgroundColor(Color.Black)
.justifyContent(FlexAlign.SpaceEvenly) .justifyContent(FlexAlign.SpaceEvenly)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册