Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
835ad176
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
835ad176
编写于
3月 28, 2023
作者:
O
openharmony_ci
提交者:
Gitee
3月 28, 2023
浏览文件
操作
浏览文件
下载
差异文件
!8177 修改左滑回退颜色保留的bug,将媒体模块的截屏区分目录合入3.2release
Merge pull request !8177 from 田文哲/OpenHarmony-3.2-Release
上级
49eca13c
93c9c6f7
变更
77
隐藏空白更改
内联
并排
Showing
77 changed file
with
1449 addition
and
251 deletion
+1449
-251
validator/acts_validator/src/main/ets/pages/ArkUI/ArkUI_index.ets
...r/acts_validator/src/main/ets/pages/ArkUI/ArkUI_index.ets
+12
-11
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasFillStyle.ets
...ts_validator/src/main/ets/pages/ArkUI/CanvasFillStyle.ets
+6
-0
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasFont.ets
...or/acts_validator/src/main/ets/pages/ArkUI/CanvasFont.ets
+6
-0
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasGlobalAlpha.ets
..._validator/src/main/ets/pages/ArkUI/CanvasGlobalAlpha.ets
+14
-1
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasGlobalCompositeOperation.ets
...c/main/ets/pages/ArkUI/CanvasGlobalCompositeOperation.ets
+6
-0
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasLineCap.ets
...acts_validator/src/main/ets/pages/ArkUI/CanvasLineCap.ets
+6
-0
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasLineDashOffset.ets
...lidator/src/main/ets/pages/ArkUI/CanvasLineDashOffset.ets
+12
-2
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasLineJoin.ets
...cts_validator/src/main/ets/pages/ArkUI/CanvasLineJoin.ets
+6
-0
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasLineWidth.ets
...ts_validator/src/main/ets/pages/ArkUI/CanvasLineWidth.ets
+10
-2
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasShadowBlur.ets
...s_validator/src/main/ets/pages/ArkUI/CanvasShadowBlur.ets
+11
-1
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasShadowColor.ets
..._validator/src/main/ets/pages/ArkUI/CanvasShadowColor.ets
+6
-0
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasShadowOffsetX.ets
...alidator/src/main/ets/pages/ArkUI/CanvasShadowOffsetX.ets
+12
-1
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasShadowOffsetY.ets
...alidator/src/main/ets/pages/ArkUI/CanvasShadowOffsetY.ets
+12
-1
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasStrokeStyle.ets
..._validator/src/main/ets/pages/ArkUI/CanvasStrokeStyle.ets
+6
-0
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasTextAlign.ets
...ts_validator/src/main/ets/pages/ArkUI/CanvasTextAlign.ets
+6
-0
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasTextBaseline.ets
...validator/src/main/ets/pages/ArkUI/CanvasTextBaseline.ets
+6
-0
validator/acts_validator/src/main/ets/pages/ArkUI/LongPressGesture.ets
...s_validator/src/main/ets/pages/ArkUI/LongPressGesture.ets
+6
-0
validator/acts_validator/src/main/ets/pages/ArkUI/PanGesture.ets
...or/acts_validator/src/main/ets/pages/ArkUI/PanGesture.ets
+6
-0
validator/acts_validator/src/main/ets/pages/ArkUI/PinchGestureTest.ets
...s_validator/src/main/ets/pages/ArkUI/PinchGestureTest.ets
+6
-0
validator/acts_validator/src/main/ets/pages/ArkUI/RotationGestureTest.ets
...alidator/src/main/ets/pages/ArkUI/RotationGestureTest.ets
+6
-0
validator/acts_validator/src/main/ets/pages/ArkUI/ScrollListTest.ets
...cts_validator/src/main/ets/pages/ArkUI/ScrollListTest.ets
+6
-0
validator/acts_validator/src/main/ets/pages/ArkUI/SwipeGestureTest.ets
...s_validator/src/main/ets/pages/ArkUI/SwipeGestureTest.ets
+6
-0
validator/acts_validator/src/main/ets/pages/ArkUI/TapGesture.ets
...or/acts_validator/src/main/ets/pages/ArkUI/TapGesture.ets
+6
-0
validator/acts_validator/src/main/ets/pages/ArkUI/TouchMoveTest.ets
...acts_validator/src/main/ets/pages/ArkUI/TouchMoveTest.ets
+7
-2
validator/acts_validator/src/main/ets/pages/Audio/AudioInputRoutingTypeC.ets
...dator/src/main/ets/pages/Audio/AudioInputRoutingTypeC.ets
+5
-0
validator/acts_validator/src/main/ets/pages/Audio/AudioInputRoutingWiredHeadset.ets
...rc/main/ets/pages/Audio/AudioInputRoutingWiredHeadset.ets
+5
-0
validator/acts_validator/src/main/ets/pages/Audio/AudioOutputRoutingBT.ets
...lidator/src/main/ets/pages/Audio/AudioOutputRoutingBT.ets
+5
-0
validator/acts_validator/src/main/ets/pages/Audio/AudioOutputRoutingTypeC.ets
...ator/src/main/ets/pages/Audio/AudioOutputRoutingTypeC.ets
+5
-0
validator/acts_validator/src/main/ets/pages/Audio/AudioOutputRoutingWiredHeadset.ets
...c/main/ets/pages/Audio/AudioOutputRoutingWiredHeadset.ets
+5
-0
validator/acts_validator/src/main/ets/pages/Audio/Audio_index.ets
...r/acts_validator/src/main/ets/pages/Audio/Audio_index.ets
+10
-9
validator/acts_validator/src/main/ets/pages/Camera/CameraFlash.ets
.../acts_validator/src/main/ets/pages/Camera/CameraFlash.ets
+5
-0
validator/acts_validator/src/main/ets/pages/Camera/CameraOrientation.ets
...validator/src/main/ets/pages/Camera/CameraOrientation.ets
+5
-0
validator/acts_validator/src/main/ets/pages/Camera/CameraPhotoFormat.ets
...validator/src/main/ets/pages/Camera/CameraPhotoFormat.ets
+5
-0
validator/acts_validator/src/main/ets/pages/Camera/CameraPreviewFormat.ets
...lidator/src/main/ets/pages/Camera/CameraPreviewFormat.ets
+5
-0
validator/acts_validator/src/main/ets/pages/Camera/CameraSerialPhoto.ets
...validator/src/main/ets/pages/Camera/CameraSerialPhoto.ets
+5
-0
validator/acts_validator/src/main/ets/pages/Camera/CameraVideo.ets
.../acts_validator/src/main/ets/pages/Camera/CameraVideo.ets
+5
-0
validator/acts_validator/src/main/ets/pages/Camera/Camera_index.ets
...acts_validator/src/main/ets/pages/Camera/Camera_index.ets
+10
-9
validator/acts_validator/src/main/ets/pages/Experience/CameraColdStartTest.ets
...tor/src/main/ets/pages/Experience/CameraColdStartTest.ets
+141
-0
validator/acts_validator/src/main/ets/pages/Experience/ContactsColdStartTest.ets
...r/src/main/ets/pages/Experience/ContactsColdStartTest.ets
+141
-0
validator/acts_validator/src/main/ets/pages/Experience/ContactsHotStartTest.ets
...or/src/main/ets/pages/Experience/ContactsHotStartTest.ets
+141
-0
validator/acts_validator/src/main/ets/pages/Experience/DeskFps.ets
.../acts_validator/src/main/ets/pages/Experience/DeskFps.ets
+6
-0
validator/acts_validator/src/main/ets/pages/Experience/Experience_index.ets
...idator/src/main/ets/pages/Experience/Experience_index.ets
+20
-12
validator/acts_validator/src/main/ets/pages/Experience/KeyboardDisplayTest.ets
...tor/src/main/ets/pages/Experience/KeyboardDisplayTest.ets
+6
-0
validator/acts_validator/src/main/ets/pages/Experience/KeyboardInputTest.ets
...dator/src/main/ets/pages/Experience/KeyboardInputTest.ets
+6
-0
validator/acts_validator/src/main/ets/pages/Experience/MmsColdStartTest.ets
...idator/src/main/ets/pages/Experience/MmsColdStartTest.ets
+141
-0
validator/acts_validator/src/main/ets/pages/Experience/MmsHotStartTest.ets
...lidator/src/main/ets/pages/Experience/MmsHotStartTest.ets
+142
-0
validator/acts_validator/src/main/ets/pages/Experience/PhotoFps.ets
...acts_validator/src/main/ets/pages/Experience/PhotoFps.ets
+6
-0
validator/acts_validator/src/main/ets/pages/Experience/PhotosColdStartTest.ets
...tor/src/main/ets/pages/Experience/PhotosColdStartTest.ets
+10
-61
validator/acts_validator/src/main/ets/pages/Experience/PhotosHotStartTest.ets
...ator/src/main/ets/pages/Experience/PhotosHotStartTest.ets
+10
-47
validator/acts_validator/src/main/ets/pages/Experience/ScrollPhotosList.ets
...idator/src/main/ets/pages/Experience/ScrollPhotosList.ets
+6
-0
validator/acts_validator/src/main/ets/pages/Experience/SettingsColdStartTest.ets
...r/src/main/ets/pages/Experience/SettingsColdStartTest.ets
+142
-0
validator/acts_validator/src/main/ets/pages/Experience/SettingsHotStartTest.ets
...or/src/main/ets/pages/Experience/SettingsHotStartTest.ets
+142
-0
validator/acts_validator/src/main/ets/pages/Experience/StartBackgroundTask.ets
...tor/src/main/ets/pages/Experience/StartBackgroundTask.ets
+6
-0
validator/acts_validator/src/main/ets/pages/Experience/StartNotification.ets
...dator/src/main/ets/pages/Experience/StartNotification.ets
+6
-0
validator/acts_validator/src/main/ets/pages/Experience/StartTaskManager.ets
...idator/src/main/ets/pages/Experience/StartTaskManager.ets
+6
-0
validator/acts_validator/src/main/ets/pages/Experience/ViewPhotoTest.ets
...validator/src/main/ets/pages/Experience/ViewPhotoTest.ets
+6
-0
validator/acts_validator/src/main/ets/pages/Player/PlayAudio.ets
...or/acts_validator/src/main/ets/pages/Player/PlayAudio.ets
+5
-0
validator/acts_validator/src/main/ets/pages/Player/PlayVideo.ets
...or/acts_validator/src/main/ets/pages/Player/PlayVideo.ets
+5
-0
validator/acts_validator/src/main/ets/pages/Player/Player_index.ets
...acts_validator/src/main/ets/pages/Player/Player_index.ets
+10
-9
validator/acts_validator/src/main/ets/pages/common/AudioContainer.ets
...ts_validator/src/main/ets/pages/common/AudioContainer.ets
+3
-4
validator/acts_validator/src/main/ets/pages/common/CameraFlashContainer.ets
...idator/src/main/ets/pages/common/CameraFlashContainer.ets
+3
-4
validator/acts_validator/src/main/ets/pages/common/CameraOrientationContainer.ets
.../src/main/ets/pages/common/CameraOrientationContainer.ets
+3
-4
validator/acts_validator/src/main/ets/pages/common/CameraPhotoContainer.ets
...idator/src/main/ets/pages/common/CameraPhotoContainer.ets
+3
-4
validator/acts_validator/src/main/ets/pages/common/CameraPreviewFormatContainer.ets
...rc/main/ets/pages/common/CameraPreviewFormatContainer.ets
+3
-4
validator/acts_validator/src/main/ets/pages/common/CameraVideoContainer.ets
...idator/src/main/ets/pages/common/CameraVideoContainer.ets
+3
-4
validator/acts_validator/src/main/ets/pages/common/CanvasCustomContainer1.ets
...ator/src/main/ets/pages/common/CanvasCustomContainer1.ets
+2
-2
validator/acts_validator/src/main/ets/pages/common/CanvasCustomContainer2.ets
...ator/src/main/ets/pages/common/CanvasCustomContainer2.ets
+2
-2
validator/acts_validator/src/main/ets/pages/common/CustomContainer.ets
...s_validator/src/main/ets/pages/common/CustomContainer.ets
+2
-2
validator/acts_validator/src/main/ets/pages/common/CustomContainer2.ets
..._validator/src/main/ets/pages/common/CustomContainer2.ets
+2
-2
validator/acts_validator/src/main/ets/pages/common/CustomContainer3.ets
..._validator/src/main/ets/pages/common/CustomContainer3.ets
+2
-2
validator/acts_validator/src/main/ets/pages/common/CustomContainer4.ets
..._validator/src/main/ets/pages/common/CustomContainer4.ets
+2
-2
validator/acts_validator/src/main/ets/pages/common/CustomContainer5.ets
..._validator/src/main/ets/pages/common/CustomContainer5.ets
+2
-2
validator/acts_validator/src/main/ets/pages/common/ExperienceCustomContainer.ets
...r/src/main/ets/pages/common/ExperienceCustomContainer.ets
+2
-2
validator/acts_validator/src/main/ets/pages/common/StartExperienceCustomContainer.ets
.../main/ets/pages/common/StartExperienceCustomContainer.ets
+2
-2
validator/acts_validator/src/main/ets/pages/common/TimeExperienceCustomContainer.ets
...c/main/ets/pages/common/TimeExperienceCustomContainer.ets
+2
-2
validator/acts_validator/src/main/ets/pages/index.ets
validator/acts_validator/src/main/ets/pages/index.ets
+37
-37
validator/acts_validator/src/main/resources/base/profile/main_pages.json
...validator/src/main/resources/base/profile/main_pages.json
+9
-2
未找到文件。
validator/acts_validator/src/main/ets/pages/ArkUI/ArkUI_index.ets
浏览文件 @
835ad176
...
...
@@ -116,7 +116,7 @@ struct IndexPage {
let number = WriteTitle.length + 11;
let Index = ColorBack.indexOf(WriteTitle);
if (this.result === '
Pass
'){
if (this.result === '
true
'){
this.ColorObject[this.current] = '#ff008000';
let Log = (titles+';'+'#ff008000'+';');
let key = ColorBack.substring(Index,Index+number);
...
...
@@ -128,9 +128,9 @@ struct IndexPage {
fileio.closeSync(FD);
let Fd = fileio.openSync(ColorBackPath, 0o102, 0o666);
fileio.writeSync(Fd,Report);
filewrite(name1,results,titles)
filewrite(name1,results,titles)
;
}
else if (this.result === '
Fail
'){
else if (this.result === '
false
'){
this.ColorObject[this.current] = '#ffff0000';
let Log = (titles+';'+'#ffff0000'+';');
let key = ColorBack.substring(Index,Index+number);
...
...
@@ -144,7 +144,7 @@ struct IndexPage {
fileio.writeSync(Fd,Report);
filewrite(name1,results,titles);
}
else
if (this.result === 'None')
{
else {
this.ColorObject[this.current] = this.ColorObject[this.current];
}
}
...
...
@@ -274,20 +274,20 @@ struct IndexPage {
title[i] = str1[i*2];
result[i] = str1[i*2+1];
}
let FailIndex = report.indexOf('
Fail
');
let FailIndex = report.indexOf('
false
');
let FailNum = 0;
while (FailIndex != -1) {
console.log(FailIndex);
FailNum++;
FailIndex = report.indexOf('
Fail
',FailIndex + 1);
FailIndex = report.indexOf('
false
',FailIndex + 1);
}
let failNum = (FailNum).toString();
let PassIndex = report.indexOf('
Pass
');
let PassIndex = report.indexOf('
true
');
let PassNum = 0;
while (PassIndex != -1) {
console.log(PassIndex);
PassNum++;
PassIndex = report.indexOf('
Pass
',PassIndex + 1);
PassIndex = report.indexOf('
true
',PassIndex + 1);
}
let TestNum = FailNum + PassNum;
let testNum = (TestNum).toString();
...
...
@@ -308,9 +308,9 @@ struct IndexPage {
for (let i = 0; i < title.length; i++) {
serializer.startElement("testcase");
serializer.setAttributes("name", String(title[i]));
serializer.setAttributes("status", "
*
");
serializer.setAttributes("status", "
run
");
serializer.setAttributes("time", "*");
serializer.setAttributes("classname", "
*
");
serializer.setAttributes("classname", "
ArkUI
");
serializer.setAttributes("result", String(result[i]));
serializer.setAttributes("level", "*");
serializer.setAttributes("message", "*");
...
...
@@ -342,7 +342,8 @@ function filewrite(name1,results,titles){
console.info("RRRRRRRRRRd"+RD);
let report = String.fromCharCode.apply(null,new Uint8Array(buf));
let WriteTitle = (titles).toString();
let number = WriteTitle.length + 6;
let WriteResult = (results).toString();
let number = WriteTitle.length + WriteResult.length + 2;
let Index = report.indexOf(WriteTitle);
let Log = (titles+";"+results+";").toString();
if (Index == -1){
...
...
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasFillStyle.ets
浏览文件 @
835ad176
...
...
@@ -14,6 +14,7 @@
*/
import {CustomContainer} from '../common/CanvasCustomContainer1';
import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry
@Component
struct SetCircle {
...
...
@@ -92,5 +93,10 @@ struct SetCircle {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
}
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasFont.ets
浏览文件 @
835ad176
...
...
@@ -14,6 +14,7 @@
*/
import {CustomContainer} from '../common/CanvasCustomContainer1';
import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry
@Component
struct SetCircle {
...
...
@@ -402,4 +403,9 @@ struct SetCircle {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
}
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasGlobalAlpha.ets
浏览文件 @
835ad176
...
...
@@ -14,6 +14,7 @@
*/
import {CustomContainer} from '../common/CanvasCustomContainer2';
import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry
@Component
struct SetCircle {
...
...
@@ -42,6 +43,12 @@ struct SetCircle {
})
.onActionUpdate((event: GestureEvent) => {
this.X = event.offsetX;
this.context.globalAlpha = (this.X)*0.005;
this.context.fillStyle = 'rgb(255,0,0)';
this.context.fillRect(150, 150, 50, 50);
this.context.globalAlpha = (this.X)*0.005;
this.context.fillStyle = 'rgb(0,0,255)';
this.context.fillRect(200, 200, 50, 50);
})
.onActionEnd(() => {
console.info('Pan end');
...
...
@@ -58,9 +65,10 @@ struct SetCircle {
.height('100%')
.backgroundColor('#ffffffff')
.onReady(() =>{
this.context.globalAlpha = 0.05;
this.context.fillStyle = 'rgb(255,0,0)';
this.context.fillRect(150, 150, 50, 50);
this.context.globalAlpha =
(this.X)*0.0
05;
this.context.globalAlpha =
0.
05;
this.context.fillStyle = 'rgb(0,0,255)';
this.context.fillRect(200, 200, 50, 50);
})
...
...
@@ -81,4 +89,9 @@ struct SetCircle {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasGlobalCompositeOperation.ets
浏览文件 @
835ad176
...
...
@@ -14,6 +14,7 @@
*/
import {CustomContainer} from '../common/CanvasCustomContainer1';
import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry
@Component
struct SetCircle {
...
...
@@ -244,4 +245,9 @@ struct SetCircle {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasLineCap.ets
浏览文件 @
835ad176
...
...
@@ -14,6 +14,7 @@
*/
import {CustomContainer} from '../common/CanvasCustomContainer1';
import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry
@Component
struct SetCircle {
...
...
@@ -104,4 +105,9 @@ struct SetCircle {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasLineDashOffset.ets
浏览文件 @
835ad176
...
...
@@ -14,6 +14,7 @@
*/
import {CustomContainer} from '../common/CanvasCustomContainer2';
import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry
@Component
struct SetCircle {
...
...
@@ -41,6 +42,10 @@ struct SetCircle {
})
.onActionUpdate((event: GestureEvent) => {
this.X = event.offsetX;
this.context.arc(180, 150, 50, 0, 6.28);
this.context.setLineDash([20,30]);
this.context.lineDashOffset = (this.X)*0.02;
this.context.stroke();
})
.onActionEnd(() => {
console.info('Pan end');
...
...
@@ -48,7 +53,7 @@ struct SetCircle {
)
}.width('70%').height('25%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text('虚线偏移量: ' + (this.X)*0.
1
)
Text('虚线偏移量: ' + (this.X)*0.
02
)
}.width('100%').height('20%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Canvas(this.context)
...
...
@@ -58,7 +63,7 @@ struct SetCircle {
.onReady(() =>{
this.context.arc(180, 150, 50, 0, 6.28);
this.context.setLineDash([20,30]);
this.context.lineDashOffset =
(this.X)*
0.1;
this.context.lineDashOffset = 0.1;
this.context.stroke();
})
}.width('100%').height('55%')
...
...
@@ -78,4 +83,9 @@ struct SetCircle {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasLineJoin.ets
浏览文件 @
835ad176
...
...
@@ -14,6 +14,7 @@
*/
import {CustomContainer} from '../common/CanvasCustomContainer1';
import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry
@Component
struct SetCircle {
...
...
@@ -108,4 +109,9 @@ struct SetCircle {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasLineWidth.ets
浏览文件 @
835ad176
...
...
@@ -14,6 +14,7 @@
*/
import {CustomContainer} from '../common/CanvasCustomContainer2';
import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry
@Component
struct SetCircle {
...
...
@@ -41,6 +42,8 @@ struct SetCircle {
})
.onActionUpdate((event: GestureEvent) => {
this.X = event.offsetX;
this.context.lineWidth = (this.X)*0.1;
this.context.strokeRect(120, 120, 120, 120);
})
.onActionEnd(() => {
console.info('Pan end');
...
...
@@ -49,7 +52,7 @@ struct SetCircle {
}.width('70%').height('30%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text('边框粗细: ' + (this.X)*0.
05
)
Text('边框粗细: ' + (this.X)*0.
1
)
}.width('100%').height('20%')
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Canvas(this.context)
...
...
@@ -57,7 +60,7 @@ struct SetCircle {
.height('100%')
.backgroundColor('#ffffffff')
.onReady(() =>{
this.context.lineWidth =
(this.X)*0.05
;
this.context.lineWidth =
1
;
this.context.strokeRect(120, 120, 120, 120);
})
}.width('100%').height('50%')
...
...
@@ -77,4 +80,9 @@ struct SetCircle {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasShadowBlur.ets
浏览文件 @
835ad176
...
...
@@ -14,6 +14,7 @@
*/
import {CustomContainer} from '../common/CanvasCustomContainer2';
import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry
@Component
struct SetCircle {
...
...
@@ -43,6 +44,10 @@ struct SetCircle {
})
.onActionUpdate((event: GestureEvent) => {
this.X = event.offsetX;
this.context.shadowBlur = this.X;
this.context.shadowColor = 'rgb(0,0,0)';
this.context.fillStyle = 'rgb(255,0,0)';
this.context.fillRect(150, 150, 100, 100);
})
.onActionEnd(() => {
console.info('Pan end');
...
...
@@ -58,7 +63,7 @@ struct SetCircle {
.height('100%')
.backgroundColor('#ffffffff')
.onReady(() =>{
this.context.shadowBlur =
this.X
;
this.context.shadowBlur =
0
;
this.context.shadowColor = 'rgb(0,0,0)';
this.context.fillStyle = 'rgb(255,0,0)';
this.context.fillRect(150, 150, 100, 100);
...
...
@@ -80,4 +85,9 @@ struct SetCircle {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasShadowColor.ets
浏览文件 @
835ad176
...
...
@@ -14,6 +14,7 @@
*/
import {CustomContainer} from '../common/CanvasCustomContainer2';
import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry
@Component
struct SetCircle {
...
...
@@ -98,4 +99,9 @@ struct SetCircle {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasShadowOffsetX.ets
浏览文件 @
835ad176
...
...
@@ -14,6 +14,7 @@
*/
import {CustomContainer} from '../common/CanvasCustomContainer2';
import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry
@Component
struct SetCircle {
...
...
@@ -44,6 +45,11 @@ struct SetCircle {
})
.onActionUpdate((event: GestureEvent) => {
this.X = event.offsetX;
this.context.shadowBlur = 10;
this.context.shadowOffsetX = (this.X)*0.05;
this.context.shadowColor = 'rgb(0,0,0)';
this.context.fillStyle = 'rgb(255,0,0)';
this.context.fillRect(150, 150, 100, 100);
})
.onActionEnd(() => {
console.info('Pan end');
...
...
@@ -61,7 +67,7 @@ struct SetCircle {
.backgroundColor('#ffffffff')
.onReady(() =>{
this.context.shadowBlur = 10;
this.context.shadowOffsetX =
(this.X)*0.05
;
this.context.shadowOffsetX =
0
;
this.context.shadowColor = 'rgb(0,0,0)';
this.context.fillStyle = 'rgb(255,0,0)';
this.context.fillRect(150, 150, 100, 100);
...
...
@@ -83,4 +89,9 @@ struct SetCircle {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasShadowOffsetY.ets
浏览文件 @
835ad176
...
...
@@ -14,6 +14,7 @@
*/
import {CustomContainer} from '../common/CanvasCustomContainer2';
import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry
@Component
struct SetCircle {
...
...
@@ -44,6 +45,11 @@ struct SetCircle {
})
.onActionUpdate((event: GestureEvent) => {
this.X = event.offsetX;
this.context.shadowBlur = 10;
this.context.shadowOffsetY = (this.X)*0.05;
this.context.shadowColor = 'rgb(0,0,0)';
this.context.fillStyle = 'rgb(255,0,0)';
this.context.fillRect(150, 150, 100, 100);
})
.onActionEnd(() => {
console.info('Pan end');
...
...
@@ -60,7 +66,7 @@ struct SetCircle {
.backgroundColor('#ffffffff')
.onReady(() =>{
this.context.shadowBlur = 10;
this.context.shadowOffsetY =
(this.X)*0.05
;
this.context.shadowOffsetY =
0
;
this.context.shadowColor = 'rgb(0,0,0)';
this.context.fillStyle = 'rgb(255,0,0)';
this.context.fillRect(150, 150, 100, 100);
...
...
@@ -82,4 +88,9 @@ struct SetCircle {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasStrokeStyle.ets
浏览文件 @
835ad176
...
...
@@ -14,6 +14,7 @@
*/
import {CustomContainer} from '../common/CanvasCustomContainer1';
import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry
@Component
struct SetCircle {
...
...
@@ -95,4 +96,9 @@ struct SetCircle {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
}
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasTextAlign.ets
浏览文件 @
835ad176
...
...
@@ -14,6 +14,7 @@
*/
import {CustomContainer} from '../common/CanvasCustomContainer1';
import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry
@Component
struct SetCircle {
...
...
@@ -135,4 +136,9 @@ struct SetCircle {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/ArkUI/CanvasTextBaseline.ets
浏览文件 @
835ad176
...
...
@@ -14,6 +14,7 @@
*/
import {CustomContainer} from '../common/CanvasCustomContainer1';
import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry
@Component
struct SetCircle {
...
...
@@ -141,4 +142,9 @@ struct SetCircle {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
}
validator/acts_validator/src/main/ets/pages/ArkUI/LongPressGesture.ets
浏览文件 @
835ad176
...
...
@@ -14,6 +14,7 @@
*/
import {CustomContainer} from '../common/CustomContainer2';
import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry
@Component
struct LongPressGestureExample {
...
...
@@ -59,4 +60,9 @@ struct LongPressGestureExample {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/ArkUI/PanGesture.ets
浏览文件 @
835ad176
...
...
@@ -14,6 +14,7 @@
*/
import {CustomContainer} from '../common/CustomContainer3';
import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry
@Component
struct PanGestureExample {
...
...
@@ -63,4 +64,9 @@ struct PanGestureExample {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
}
validator/acts_validator/src/main/ets/pages/ArkUI/PinchGestureTest.ets
浏览文件 @
835ad176
...
...
@@ -14,6 +14,7 @@
*/
import {CustomContainer} from '../common/CustomContainer2';
import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry
@Component
struct PinchGuestureTest {
...
...
@@ -56,4 +57,9 @@ struct PinchGuestureTest {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/ArkUI/RotationGestureTest.ets
浏览文件 @
835ad176
...
...
@@ -14,6 +14,7 @@
*/
import {CustomContainer} from '../common/CustomContainer2';
import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry
@Component
struct RotationGuestureTest {
...
...
@@ -55,4 +56,9 @@ struct RotationGuestureTest {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/ArkUI/ScrollListTest.ets
浏览文件 @
835ad176
...
...
@@ -14,6 +14,7 @@
*/
import {CustomContainer} from '../common/CustomContainer';
import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry
@Component
struct CustomContainerUser {
...
...
@@ -48,4 +49,9 @@ struct CustomContainerUser {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
}
validator/acts_validator/src/main/ets/pages/ArkUI/SwipeGestureTest.ets
浏览文件 @
835ad176
...
...
@@ -14,6 +14,7 @@
*/
import {CustomContainer} from '../common/CustomContainer3';
import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry
@Component
struct SwipeGestureTest {
...
...
@@ -62,5 +63,10 @@ struct SwipeGestureTest {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
}
validator/acts_validator/src/main/ets/pages/ArkUI/TapGesture.ets
浏览文件 @
835ad176
...
...
@@ -14,6 +14,7 @@
*/
import {CustomContainer} from '../common/CustomContainer4';
import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
@Entry
@Component
struct TapGestureExample {
...
...
@@ -54,4 +55,9 @@ struct TapGestureExample {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/ArkUI/TouchMoveTest.ets
浏览文件 @
835ad176
...
...
@@ -50,7 +50,7 @@ struct CustomContainer1 {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Pass
', title : this.name,
params: {result : '
true
', title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
@@ -68,7 +68,7 @@ struct CustomContainer1 {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Fail
',title : this.name,
params: {result : '
false
',title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
@@ -219,4 +219,9 @@ struct SetCircle {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/ArkUI/ArkUI_index',
})
}
}
validator/acts_validator/src/main/ets/pages/Audio/AudioInputRoutingTypeC.ets
浏览文件 @
835ad176
...
...
@@ -189,4 +189,9 @@ struct audioInputRouting {
}).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Audio/Audio_index',
})
}
}
validator/acts_validator/src/main/ets/pages/Audio/AudioInputRoutingWiredHeadset.ets
浏览文件 @
835ad176
...
...
@@ -189,4 +189,9 @@ struct audioInputRouting {
}).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Audio/Audio_index',
})
}
}
validator/acts_validator/src/main/ets/pages/Audio/AudioOutputRoutingBT.ets
浏览文件 @
835ad176
...
...
@@ -169,4 +169,9 @@ struct audioOutputRouting {
}).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Audio/Audio_index',
})
}
}
validator/acts_validator/src/main/ets/pages/Audio/AudioOutputRoutingTypeC.ets
浏览文件 @
835ad176
...
...
@@ -169,4 +169,9 @@ struct audioOutputRouting {
}).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Audio/Audio_index',
})
}
}
validator/acts_validator/src/main/ets/pages/Audio/AudioOutputRoutingWiredHeadset.ets
浏览文件 @
835ad176
...
...
@@ -168,4 +168,9 @@ struct audioOutputRouting {
}).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Audio/Audio_index',
})
}
}
validator/acts_validator/src/main/ets/pages/Audio/Audio_index.ets
浏览文件 @
835ad176
...
...
@@ -99,7 +99,7 @@ struct IndexPage {
let number = WriteTitle.length + 11;
let Index = ColorBack.indexOf(WriteTitle);
if (this.result === '
Pass
'){
if (this.result === '
true
'){
this.ColorObject[this.current] = '#ff008000';
let Log = (titles+';'+'#ff008000'+';');
let key = ColorBack.substring(Index,Index+number);
...
...
@@ -113,7 +113,7 @@ struct IndexPage {
fileio.writeSync(Fd,Report);
filewrite(name1,results,titles)
}
else if (this.result === '
Fail
'){
else if (this.result === '
false
'){
this.ColorObject[this.current] = '#ffff0000';
let Log = (titles+';'+'#ffff0000'+';');
let key = ColorBack.substring(Index,Index+number);
...
...
@@ -257,20 +257,20 @@ struct IndexPage {
title[i] = str1[i*2];
result[i] = str1[i*2+1];
}
let FailIndex = report.indexOf('
Fail
');
let FailIndex = report.indexOf('
false
');
let FailNum = 0;
while (FailIndex != -1) {
console.log(FailIndex);
FailNum++;
FailIndex = report.indexOf('
Fail
',FailIndex + 1);
FailIndex = report.indexOf('
false
',FailIndex + 1);
}
let failNum = (FailNum).toString();
let PassIndex = report.indexOf('
Pass
');
let PassIndex = report.indexOf('
true
');
let PassNum = 0;
while (PassIndex != -1) {
console.log(PassIndex);
PassNum++;
PassIndex = report.indexOf('
Pass
',PassIndex + 1);
PassIndex = report.indexOf('
true
',PassIndex + 1);
}
let TestNum = FailNum + PassNum;
let testNum = (TestNum).toString();
...
...
@@ -291,9 +291,9 @@ struct IndexPage {
for (let i = 0; i < title.length; i++) {
serializer.startElement("testcase");
serializer.setAttributes("name", String(title[i]));
serializer.setAttributes("status", "
*
");
serializer.setAttributes("status", "
run
");
serializer.setAttributes("time", "*");
serializer.setAttributes("classname", "
*
");
serializer.setAttributes("classname", "
Audio
");
serializer.setAttributes("result", String(result[i]));
serializer.setAttributes("level", "*");
serializer.setAttributes("message", "*");
...
...
@@ -325,7 +325,8 @@ function filewrite(name1,results,titles){
console.info("RRRRRRRRRRd"+RD);
let report = String.fromCharCode.apply(null,new Uint8Array(buf));
let WriteTitle = (titles).toString();
let number = WriteTitle.length + 6;
let WriteResult = (results).toString();
let number = WriteTitle.length + WriteResult.length + 2;
let Index = report.indexOf(WriteTitle);
let Log = (titles+";"+results+";").toString();
if (Index == -1){
...
...
validator/acts_validator/src/main/ets/pages/Camera/CameraFlash.ets
浏览文件 @
835ad176
...
...
@@ -129,4 +129,9 @@ struct cameraOrientation {
}).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Camera/Camera_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/Camera/CameraOrientation.ets
浏览文件 @
835ad176
...
...
@@ -171,4 +171,9 @@ struct cameraOrientation {
}).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Camera/Camera_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/Camera/CameraPhotoFormat.ets
浏览文件 @
835ad176
...
...
@@ -251,4 +251,9 @@ struct cameraOrientation {
}).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Camera/Camera_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/Camera/CameraPreviewFormat.ets
浏览文件 @
835ad176
...
...
@@ -224,4 +224,9 @@ struct cameraFormat {
}).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Camera/Camera_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/Camera/CameraSerialPhoto.ets
浏览文件 @
835ad176
...
...
@@ -186,4 +186,9 @@ struct cameraOrientation {
}).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Camera/Camera_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/Camera/CameraVideo.ets
浏览文件 @
835ad176
...
...
@@ -269,4 +269,9 @@ struct cameraOrientation {
}).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Camera/Camera_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/Camera/Camera_index.ets
浏览文件 @
835ad176
...
...
@@ -100,7 +100,7 @@ struct IndexPage {
let number = WriteTitle.length + 11;
let Index = ColorBack.indexOf(WriteTitle);
if (this.result === '
Pass
'){
if (this.result === '
true
'){
this.ColorObject[this.current] = '#ff008000';
let Log = (titles+';'+'#ff008000'+';');
let key = ColorBack.substring(Index,Index+number);
...
...
@@ -114,7 +114,7 @@ struct IndexPage {
fileio.writeSync(Fd,Report);
filewrite(name1,results,titles)
}
else if (this.result === '
Fail
'){
else if (this.result === '
false
'){
this.ColorObject[this.current] = '#ffff0000';
let Log = (titles+';'+'#ffff0000'+';');
let key = ColorBack.substring(Index,Index+number);
...
...
@@ -258,20 +258,20 @@ struct IndexPage {
title[i] = str1[i*2];
result[i] = str1[i*2+1];
}
let FailIndex = report.indexOf('
Fail
');
let FailIndex = report.indexOf('
false
');
let FailNum = 0;
while (FailIndex != -1) {
console.log(FailIndex);
FailNum++;
FailIndex = report.indexOf('
Fail
',FailIndex + 1);
FailIndex = report.indexOf('
false
',FailIndex + 1);
}
let failNum = (FailNum).toString();
let PassIndex = report.indexOf('
Pass
');
let PassIndex = report.indexOf('
true
');
let PassNum = 0;
while (PassIndex != -1) {
console.log(PassIndex);
PassNum++;
PassIndex = report.indexOf('
Pass
',PassIndex + 1);
PassIndex = report.indexOf('
true
',PassIndex + 1);
}
let TestNum = FailNum + PassNum;
let testNum = (TestNum).toString();
...
...
@@ -292,9 +292,9 @@ struct IndexPage {
for (let i = 0; i < title.length; i++) {
serializer.startElement("testcase");
serializer.setAttributes("name", String(title[i]));
serializer.setAttributes("status", "
*
");
serializer.setAttributes("status", "
run
");
serializer.setAttributes("time", "*");
serializer.setAttributes("classname", "
*
");
serializer.setAttributes("classname", "
Camera
");
serializer.setAttributes("result", String(result[i]));
serializer.setAttributes("level", "*");
serializer.setAttributes("message", "*");
...
...
@@ -326,7 +326,8 @@ function filewrite(name1,results,titles){
console.info("RRRRRRRRRRd"+RD);
let report = String.fromCharCode.apply(null,new Uint8Array(buf));
let WriteTitle = (titles).toString();
let number = WriteTitle.length + 6;
let WriteResult = (results).toString();
let number = WriteTitle.length + WriteResult.length + 2;
let Index = report.indexOf(WriteTitle);
let Log = (titles+";"+results+";").toString();
if (Index == -1){
...
...
validator/acts_validator/src/main/ets/pages/Experience/CameraColdStartTest.ets
0 → 100644
浏览文件 @
835ad176
/*
* 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 router from '@ohos.router';
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/StartExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
import context from '@ohos.app.ability.common';
let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir;
let CameraColdPath = path + '/ColdStartCamera.log';
@Entry
@Component
struct CustomContainerUser {
@State name: string = 'CameraColdStart';
@State StepTips: string = '操作步骤:根据操作提示运行脚本文件,启动应用'+'\n'+'预期结果:所有应用冷启动时延低于2000ms则测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State num: number = 0;
@State setNum: number = 0;
@State photosNum: number = 0;
@State mmsNum: number = 0;
@State cameraNum: number = 0;
@State contactsNum: number = 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' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.清空后台应用`+ '\n' + '\n'
+ `3.双击执行.bat选择冷启动测试输入待测应用编号`+ '\n' + '\n' +`4.测试应用冷启动返回validator界面`
+ '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `6.若冷启动测试在规定时延内完成则通过测试`
+ '\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.num = 0;
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
/*
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(':');
let CameraTime = CameraReport.substring(CameraHead+1);
this.cameraNum = parseFloat(CameraTime);
if( this.cameraNum < 2000 ) {
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)
.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,
num: $num,
setNum: $setNum,
photosNum: $photosNum,
mmsNum: $mmsNum,
cameraNum: $cameraNum,
contactsNum: $contactsNum,
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
validator/acts_validator/src/main/ets/pages/Experience/ContactsColdStartTest.ets
0 → 100644
浏览文件 @
835ad176
/*
* 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 router from '@ohos.router';
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/StartExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
import context from '@ohos.app.ability.common';
let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir;
let ContactsColdPath = path + '/ColdStartContacts.log';
@Entry
@Component
struct CustomContainerUser {
@State name: string = 'ContactsColdStart';
@State StepTips: string = '操作步骤:根据操作提示运行脚本文件,启动应用'+'\n'+'预期结果:所有应用冷启动时延低于2000ms则测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State num: number = 0;
@State setNum: number = 0;
@State photosNum: number = 0;
@State mmsNum: number = 0;
@State cameraNum: number = 0;
@State contactsNum: number = 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' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.清空后台应用`+ '\n' + '\n'
+ `3.双击执行.bat选择冷启动测试输入待测应用编号`+ '\n' + '\n' +`4.测试应用冷启动返回validator界面`
+ '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `6.若冷启动测试在规定时延内完成则通过测试`
+ '\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.num = 0;
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
/*
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( this.contactsNum < 2000 ) {
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)
.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,
num: $num,
setNum: $setNum,
photosNum: $photosNum,
mmsNum: $mmsNum,
cameraNum: $cameraNum,
contactsNum: $contactsNum,
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
validator/acts_validator/src/main/ets/pages/Experience/ContactsHotStartTest.ets
0 → 100644
浏览文件 @
835ad176
/*
* 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 router from '@ohos.router';
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/StartExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
import context from '@ohos.app.ability.common';
let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir;
let ContactsColdPath = path + '/HotStartContacts.log';
@Entry
@Component
struct CustomContainerUser {
@State name: string = 'ContactsHotStart';
@State StepTips: string = '操作步骤:根据操作提示运行脚本文件,启动应用'+'\n'+'预期结果:所有应用热启动时延低于1000ms则测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State num: number = 0;
@State setNum: number = 0;
@State photosNum: number = 0;
@State mmsNum: number = 0;
@State cameraNum: number = 0;
@State contactsNum: number = 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' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.开启应用回退到桌面,保证此时后台应用存在`+ '\n' + '\n'
+ `3.双击执行.bat选择热启动测试输入待测应用编号`+ '\n' + '\n' +`4.依次测试完所有应用热启动返回validator界面`
+ '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `5.若所有热启动测试均在规定时延内完成则通过测试`
+ '\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.num = 0;
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
/*
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( this.contactsNum < 1000 ) {
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)
.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,
num: $num,
setNum: $setNum,
photosNum: $photosNum,
mmsNum: $mmsNum,
cameraNum: $cameraNum,
contactsNum: $contactsNum,
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
validator/acts_validator/src/main/ets/pages/Experience/DeskFps.ets
浏览文件 @
835ad176
...
...
@@ -17,6 +17,7 @@ import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/ExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
import context from '@ohos.app.ability.common';
import router from '@ohos.router';
let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir;
...
...
@@ -132,4 +133,9 @@ struct CustomContainerUser {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
validator/acts_validator/src/main/ets/pages/Experience/Experience_index.ets
浏览文件 @
835ad176
...
...
@@ -28,7 +28,7 @@ let path1 = path + '/Experience';
let VarColor = [];
let ColorBackPath = path + '/ExperienceColorBack.txt';
let txtPath = path1 + '/ExperienceReport.txt';
let xmlPath =path1 + '/ExperienceTest.xml';
let xmlPath =
path1 + '/ExperienceTest.xml';
@Entry
@Component
...
...
@@ -41,8 +41,15 @@ struct IndexPage {
private TestCaseList = [
{title:'DeskFps',uri:'pages/Experience/DeskFps'},
{title:'PhotoFps',uri:'pages/Experience/PhotoFps'},
{title:'ColdStart',uri:'pages/Experience/ColdStartTest'},
{title:'HotStart',uri:'pages/Experience/HotStartTest'},
{title:'CameraColdStart',uri:'pages/Experience/CameraColdStartTest'},
{title:'SettingsColdStart',uri:'pages/Experience/SettingsColdStartTest'},
{title:'PhotosColdStart',uri:'pages/Experience/PhotosColdStartTest'},
{title:'MmsColdStart',uri:'pages/Experience/MmsColdStartTest'},
{title:'ContactsColdStart',uri:'pages/Experience/ContactsColdStartTest'},
{title:'SettingsHotStart',uri:'pages/Experience/SettingsHotStartTest'},
{title:'PhotosHotStart',uri:'pages/Experience/PhotosHotStartTest'},
{title:'MmsHotStart',uri:'pages/Experience/MmsHotStartTest'},
{title:'ContactsHotStart',uri:'pages/Experience/ContactsHotStartTest'},
{title:'ViewPhoto',uri:'pages/Experience/ViewPhotoTest'},
{title:'KeyboardDisplay',uri:'pages/Experience/KeyboardDisplayTest'},
{title:'StartTaskManager',uri:'pages/Experience/StartTaskManager'},
...
...
@@ -105,7 +112,7 @@ struct IndexPage {
let number = WriteTitle.length + 11;
let Index = ColorBack.indexOf(WriteTitle);
if (this.result === '
Pass
'){
if (this.result === '
true
'){
this.ColorObject[this.current] = '#ff008000';
let Log = (titles+';'+'#ff008000'+';');
let key = ColorBack.substring(Index,Index+number);
...
...
@@ -119,7 +126,7 @@ struct IndexPage {
fileio.writeSync(Fd,Report);
filewrite(name1,results,titles)
}
else if (this.result === '
Fail
'){
else if (this.result === '
false
'){
this.ColorObject[this.current] = '#ffff0000';
let Log = (titles+';'+'#ffff0000'+';');
let key = ColorBack.substring(Index,Index+number);
...
...
@@ -263,20 +270,20 @@ struct IndexPage {
title[i] = str1[i*2];
result[i] = str1[i*2+1];
}
let FailIndex = report.indexOf('
Fail
');
let FailIndex = report.indexOf('
false
');
let FailNum = 0;
while (FailIndex != -1) {
console.log(FailIndex);
FailNum++;
FailIndex = report.indexOf('
Fail
',FailIndex + 1);
FailIndex = report.indexOf('
false
',FailIndex + 1);
}
let failNum = (FailNum).toString();
let PassIndex = report.indexOf('
Pass
');
let PassIndex = report.indexOf('
true
');
let PassNum = 0;
while (PassIndex != -1) {
console.log(PassIndex);
PassNum++;
PassIndex = report.indexOf('
Pass
',PassIndex + 1);
PassIndex = report.indexOf('
true
',PassIndex + 1);
}
let TestNum = FailNum + PassNum;
let testNum = (TestNum).toString();
...
...
@@ -297,9 +304,9 @@ struct IndexPage {
for (let i = 0; i < title.length; i++) {
serializer.startElement("testcase");
serializer.setAttributes("name", String(title[i]));
serializer.setAttributes("status", "
*
");
serializer.setAttributes("status", "
run
");
serializer.setAttributes("time", "*");
serializer.setAttributes("classname", "
*
");
serializer.setAttributes("classname", "
Experience
");
serializer.setAttributes("result", String(result[i]));
serializer.setAttributes("level", "*");
serializer.setAttributes("message", "*");
...
...
@@ -331,7 +338,8 @@ function filewrite(name1,results,titles){
console.info("RRRRRRRRRRd"+RD);
let report = String.fromCharCode.apply(null,new Uint8Array(buf));
let WriteTitle = (titles).toString();
let number = WriteTitle.length + 6;
let WriteResult = (results).toString();
let number = WriteTitle.length + WriteResult.length + 2;
let Index = report.indexOf(WriteTitle);
let Log = (titles+";"+results+";").toString();
if (Index == -1){
...
...
validator/acts_validator/src/main/ets/pages/Experience/KeyboardDisplayTest.ets
浏览文件 @
835ad176
...
...
@@ -15,6 +15,7 @@
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/TimeExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
let path = globalThis.dir;
let Xpath = path + '/CompleteTimeKeyboard.log';
...
...
@@ -117,4 +118,9 @@ struct CustomContainerUser {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/Experience/KeyboardInputTest.ets
浏览文件 @
835ad176
...
...
@@ -15,6 +15,7 @@
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/TimeExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
import router from '@ohos.router';
let path = globalThis.dir;
let Xpath = path + '/ResponseTimeKeyboard.log';
...
...
@@ -117,4 +118,9 @@ struct CustomContainerUser {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/Experience/MmsColdStartTest.ets
0 → 100644
浏览文件 @
835ad176
/*
* 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 router from '@ohos.router';
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/StartExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
import context from '@ohos.app.ability.common';
let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir;
let MmsColdPath = path + '/ColdStartMms.log';
@Entry
@Component
struct CustomContainerUser {
@State name: string = 'MmsColdStart';
@State StepTips: string = '操作步骤:根据操作提示运行脚本文件,启动应用'+'\n'+'预期结果:所有应用冷启动时延低于2000ms则测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State num: number = 0;
@State setNum: number = 0;
@State photosNum: number = 0;
@State mmsNum: number = 0;
@State cameraNum: number = 0;
@State contactsNum: number = 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' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.清空后台应用`+ '\n' + '\n'
+ `3.双击执行.bat选择冷启动测试输入待测应用编号`+ '\n' + '\n' +`4.依次测试完所有应用冷启动返回validator界面`
+ '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `6.若所有冷启动测试均在规定时延内完成则通过测试`
+ '\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.num = 0;
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
/*
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( this.mmsNum < 2000 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
}
Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '信息冷启动时延' + this.mmsNum + 'ms' + '\n' + '通过冷启动测试项' + this.num + '个')
.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,
num: $num,
setNum: $setNum,
photosNum: $photosNum,
mmsNum: $mmsNum,
cameraNum: $cameraNum,
contactsNum: $contactsNum,
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
validator/acts_validator/src/main/ets/pages/Experience/MmsHotStartTest.ets
0 → 100644
浏览文件 @
835ad176
/*
* 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 router from '@ohos.router';
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/StartExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
import context from '@ohos.app.ability.common';
let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir;
let MmsColdPath = path + '/HotStartMms.log';
@Entry
@Component
struct CustomContainerUser {
@State name: string = 'MmsHotStart';
@State StepTips: string = '操作步骤:根据操作提示运行脚本文件,启动应用'+'\n'+'预期结果:所有应用热启动时延低于1000ms则测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State num: number = 0;
@State setNum: number = 0;
@State photosNum: number = 0;
@State mmsNum: number = 0;
@State cameraNum: number = 0;
@State contactsNum: number = 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' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.开启应用回退到桌面,保证此时后台应用存在`+ '\n' + '\n'
+ `3.双击执行.bat选择热启动测试输入待测应用编号`+ '\n' + '\n' +`4.依次测试完所有应用热启动返回validator界面`
+ '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `5.若所有热启动测试均在规定时延内完成则通过测试`
+ '\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.num = 0;
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
/*
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( this.mmsNum < 1000 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
}
Row(){
Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n'+ '信息热启动时延' + this.mmsNum + 'ms'
+ '\n' + '通过热启动测试项' + this.num + '个' )
.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,
num: $num,
setNum: $setNum,
photosNum: $photosNum,
mmsNum: $mmsNum,
cameraNum: $cameraNum,
contactsNum: $contactsNum,
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
validator/acts_validator/src/main/ets/pages/Experience/PhotoFps.ets
浏览文件 @
835ad176
...
...
@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import router from '@ohos.router';
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/ExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
...
...
@@ -133,4 +134,9 @@ struct CustomContainerUser {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/Experience/ColdStartTest.ets
→
validator/acts_validator/src/main/ets/pages/Experience/
Photos
ColdStartTest.ets
浏览文件 @
835ad176
...
...
@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import router from '@ohos.router';
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/StartExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
...
...
@@ -19,15 +20,11 @@ import context from '@ohos.app.ability.common';
let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir;
let SettingsColdPath = path + '/ColdStartSetting.log';
let PhotosColdPath = path + '/ColdStartPhotos.log';
let MmsColdPath = path + '/ColdStartMms.log';
let CameraColdPath = path + '/ColdStartCamera.log';
let ContactsColdPath = path + '/ColdStartContacts.log';
@Entry
@Component
struct CustomContainerUser {
@State name: string = 'ColdStart';
@State name: string = '
Photos
ColdStart';
@State StepTips: string = '操作步骤:根据操作提示运行脚本文件,启动应用'+'\n'+'预期结果:所有应用冷启动时延低于2000ms则测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
...
...
@@ -88,19 +85,6 @@ struct CustomContainerUser {
.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( this.setNum < 2000 ) {
this.num++
}
/*
photos
*/
...
...
@@ -114,55 +98,15 @@ struct CustomContainerUser {
if( this.photosNum < 2000 ) {
this.num++
}
/*
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( this.mmsNum < 2000 ) {
this.num++
}
/*
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(':');
let CameraTime = CameraReport.substring(CameraHead+1);
this.cameraNum = parseFloat(CameraTime);
if( this.cameraNum < 2000 ) {
this.num++
}
/*
mms
*/
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( this.contactsNum < 2000 ) {
this.num++
}
if( this.num === 5 ) {
if( this.num === 1 ) {
this.Vue = true;
}
})
}
}
Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '设置冷启动时延' + this.setNum + 'ms' + '\n' + '图库冷启动时延' + this.photosNum
+ 'ms' + '\n'+ '信息冷启动时延' + this.mmsNum + 'ms' + '\n' + '相机冷启动时延' + this.cameraNum + 'ms' + '\n'
+ '联系人冷启动时延' + this.contactsNum + 'ms' + '\n' + '通过冷启动测试项' + this.num + '个')
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '图库冷启动时延' + this.photosNum + 'ms'
+ '\n' + '通过冷启动测试项' + this.num + '个')
.fontColor(Color.White).fontSize('24fp')
}
}
...
...
@@ -190,4 +134,9 @@ struct CustomContainerUser {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
validator/acts_validator/src/main/ets/pages/Experience/HotStartTest.ets
→
validator/acts_validator/src/main/ets/pages/Experience/
Photos
HotStartTest.ets
浏览文件 @
835ad176
...
...
@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import router from '@ohos.router';
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/StartExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
...
...
@@ -19,14 +20,11 @@ import context from '@ohos.app.ability.common';
let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir;
let SettingsColdPath = path + '/HotStartSetting.log';
let PhotosColdPath = path + '/HotStartPhotos.log';
let MmsColdPath = path + '/HotStartMms.log';
let ContactsColdPath = path + '/HotStartContacts.log';
@Entry
@Component
struct CustomContainerUser {
@State name: string = 'HotStart';
@State name: string = '
Photos
HotStart';
@State StepTips: string = '操作步骤:根据操作提示运行脚本文件,启动应用'+'\n'+'预期结果:所有应用热启动时延低于1000ms则测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
...
...
@@ -87,19 +85,6 @@ struct CustomContainerUser {
.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( this.setNum < 1000 ) {
this.num++
}
/*
photos
*/
...
...
@@ -113,42 +98,15 @@ struct CustomContainerUser {
if( this.photosNum < 1000 ) {
this.num++
}
/*
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( this.mmsNum < 1000 ) {
this.num++
}
/*
mms
*/
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( this.contactsNum < 1000 ) {
this.num++
}
if( this.num === 4 ) {
if( this.num === 1 ) {
this.Vue = true;
}
})
}
}
Row(){
Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '设置热启动时延' + this.setNum + 'ms'
+ '\n' + '图库热启动时延' + this.photosNum + 'ms' + '\n'+ '信息热启动时延' + this.mmsNum + 'ms' + '\n'
+ '联系人热启动时延' + this.contactsNum + 'ms' + '\n' + '通过热启动测试项' + this.num + '个' )
Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n' + '图库热启动时延' + this.photosNum + 'ms'
+ '\n' + '通过热启动测试项' + this.num + '个' )
.fontColor(Color.White).fontSize('24fp')
}
}
...
...
@@ -176,4 +134,9 @@ struct CustomContainerUser {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
validator/acts_validator/src/main/ets/pages/Experience/ScrollPhotosList.ets
浏览文件 @
835ad176
...
...
@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import router from '@ohos.router';
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/TimeExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
...
...
@@ -117,4 +118,9 @@ struct CustomContainerUser {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/Experience/SettingsColdStartTest.ets
0 → 100644
浏览文件 @
835ad176
/*
* 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 router from '@ohos.router';
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/StartExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
import context from '@ohos.app.ability.common';
let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir;
let SettingsColdPath = path + '/ColdStartSetting.log';
@Entry
@Component
struct CustomContainerUser {
@State name: string = 'SettingsColdStart';
@State StepTips: string = '操作步骤:根据操作提示运行脚本文件,启动应用'+'\n'+'预期结果:所有应用冷启动时延低于2000ms则测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State num: number = 0;
@State setNum: number = 0;
@State photosNum: number = 0;
@State mmsNum: number = 0;
@State cameraNum: number = 0;
@State contactsNum: number = 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' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.清空后台应用`+ '\n' + '\n'
+ `3.双击执行.bat选择冷启动测试输入待测应用编号`+ '\n' + '\n' +`4.依次测试完所有应用冷启动返回validator界面`
+ '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `6.若所有冷启动测试均在规定时延内完成则通过测试`
+ '\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.num = 0;
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
/*
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( this.setNum < 2000 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
}
Row(){
Text('\n' + '\n' + `测试结果:` + '\n' + '\n' + '设置冷启动时延' + this.setNum + 'ms'
+ '\n' + '通过冷启动测试项' + this.num + '个')
.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,
num: $num,
setNum: $setNum,
photosNum: $photosNum,
mmsNum: $mmsNum,
cameraNum: $cameraNum,
contactsNum: $contactsNum,
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
validator/acts_validator/src/main/ets/pages/Experience/SettingsHotStartTest.ets
0 → 100644
浏览文件 @
835ad176
/*
* 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 router from '@ohos.router';
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/StartExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
import context from '@ohos.app.ability.common';
let abilityContext = getContext(this) as context.UIAbilityContext;
let path = globalThis.dir;
let SettingsColdPath = path + '/HotStartSetting.log';
@Entry
@Component
struct CustomContainerUser {
@State name: string = 'SettingsHotStart';
@State StepTips: string = '操作步骤:根据操作提示运行脚本文件,启动应用'+'\n'+'预期结果:所有应用热启动时延低于1000ms则测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State num: number = 0;
@State setNum: number = 0;
@State photosNum: number = 0;
@State mmsNum: number = 0;
@State cameraNum: number = 0;
@State contactsNum: number = 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' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.开启应用回退到桌面,保证此时后台应用存在`+ '\n' + '\n'
+ `3.双击执行.bat选择热启动测试输入待测应用编号`+ '\n' + '\n' +`4.依次测试完所有应用热启动返回validator界面`
+ '\n' + '\n' + '5.点击停止键观察测试结果' + '\n' + '\n' + `5.若所有热启动测试均在规定时延内完成则通过测试`
+ '\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.num = 0;
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
/*
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( this.setNum < 1000 ) {
this.num++
}
if( this.num === 1 ) {
this.Vue = true;
}
})
}
}
Row(){
Text('\n' + '\n' + '\n' + '\n' + `测试结果:` + '\n' + '\n' + '设置热启动时延' + this.setNum + 'ms'
+ '\n' + '通过热启动测试项' + this.num + '个' )
.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,
num: $num,
setNum: $setNum,
photosNum: $photosNum,
mmsNum: $mmsNum,
cameraNum: $cameraNum,
contactsNum: $contactsNum,
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
validator/acts_validator/src/main/ets/pages/Experience/StartBackgroundTask.ets
浏览文件 @
835ad176
...
...
@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import router from '@ohos.router';
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/TimeExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
...
...
@@ -115,4 +116,9 @@ struct CustomContainerUser {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/Experience/StartNotification.ets
浏览文件 @
835ad176
...
...
@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import router from '@ohos.router';
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/TimeExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
...
...
@@ -115,4 +116,9 @@ struct CustomContainerUser {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/Experience/StartTaskManager.ets
浏览文件 @
835ad176
...
...
@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import router from '@ohos.router';
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/TimeExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
...
...
@@ -115,4 +116,9 @@ struct CustomContainerUser {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/Experience/ViewPhotoTest.ets
浏览文件 @
835ad176
...
...
@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import router from '@ohos.router';
import fileio from '@ohos.fileio';
import {CustomContainer} from '../common/TimeExperienceCustomContainer';
import FirstDialog from '../model/FirstDialog';
...
...
@@ -117,4 +118,9 @@ struct CustomContainerUser {
})
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Experience/Experience_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/Player/PlayAudio.ets
浏览文件 @
835ad176
...
...
@@ -76,4 +76,9 @@ struct playAudio {
}).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Player/Player_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/Player/PlayVideo.ets
浏览文件 @
835ad176
...
...
@@ -77,4 +77,9 @@ struct playVideo {
}).height('10%').width('100%')
}.width('100%').height('100%').backgroundColor(Color.Black)
}
onBackPress(){
router.replaceUrl({
url:'pages/Player/Player_index',
})
}
}
\ No newline at end of file
validator/acts_validator/src/main/ets/pages/Player/Player_index.ets
浏览文件 @
835ad176
...
...
@@ -96,7 +96,7 @@ struct IndexPage {
let number = WriteTitle.length + 11;
let Index = ColorBack.indexOf(WriteTitle);
if (this.result === '
Pass
'){
if (this.result === '
true
'){
this.ColorObject[this.current] = '#ff008000';
let Log = (titles+';'+'#ff008000'+';');
let key = ColorBack.substring(Index,Index+number);
...
...
@@ -110,7 +110,7 @@ struct IndexPage {
fileio.writeSync(Fd,Report);
filewrite(name1,results,titles)
}
else if (this.result === '
Fail
'){
else if (this.result === '
false
'){
this.ColorObject[this.current] = '#ffff0000';
let Log = (titles+';'+'#ffff0000'+';');
let key = ColorBack.substring(Index,Index+number);
...
...
@@ -254,20 +254,20 @@ struct IndexPage {
title[i] = str1[i*2];
result[i] = str1[i*2+1];
}
let FailIndex = report.indexOf('
Fail
');
let FailIndex = report.indexOf('
false
');
let FailNum = 0;
while (FailIndex != -1) {
console.log(FailIndex);
FailNum++;
FailIndex = report.indexOf('
Fail
',FailIndex + 1);
FailIndex = report.indexOf('
false
',FailIndex + 1);
}
let failNum = (FailNum).toString();
let PassIndex = report.indexOf('
Pass
');
let PassIndex = report.indexOf('
true
');
let PassNum = 0;
while (PassIndex != -1) {
console.log(PassIndex);
PassNum++;
PassIndex = report.indexOf('
Pass
',PassIndex + 1);
PassIndex = report.indexOf('
true
',PassIndex + 1);
}
let TestNum = FailNum + PassNum;
let testNum = (TestNum).toString();
...
...
@@ -288,9 +288,9 @@ struct IndexPage {
for (let i = 0; i < title.length; i++) {
serializer.startElement("testcase");
serializer.setAttributes("name", String(title[i]));
serializer.setAttributes("status", "
*
");
serializer.setAttributes("status", "
run
");
serializer.setAttributes("time", "*");
serializer.setAttributes("classname", "
*
");
serializer.setAttributes("classname", "
Player
");
serializer.setAttributes("result", String(result[i]));
serializer.setAttributes("level", "*");
serializer.setAttributes("message", "*");
...
...
@@ -322,7 +322,8 @@ function filewrite(name1,results,titles){
console.info("RRRRRRRRRRd"+RD);
let report = String.fromCharCode.apply(null,new Uint8Array(buf));
let WriteTitle = (titles).toString();
let number = WriteTitle.length + 6;
let WriteResult = (results).toString();
let number = WriteTitle.length + WriteResult.length + 2;
let Index = report.indexOf(WriteTitle);
let Log = (titles+";"+results+";").toString();
if (Index == -1){
...
...
validator/acts_validator/src/main/ets/pages/common/AudioContainer.ets
浏览文件 @
835ad176
...
...
@@ -15,7 +15,6 @@
import prompt from '@ohos.prompt';
import fileio from '@ohos.fileio';
import router from '@ohos.router';
// @ts-ignore
import screenshot from '@ohos.screenshot';
import image from '@ohos.multimedia.image';
import Logger from '../model/Logger';
...
...
@@ -48,7 +47,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Pass
', title : this.name,
params: {result : '
true
', title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
@@ -66,7 +65,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Fail
',title : this.name,
params: {result : '
false
',title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
@@ -107,7 +106,7 @@ export struct CustomContainer {
};
let name = this.name;
let displayName = `${info.prefix}${name}${info.suffix}`;
let dirPath = path + '/' + displayName;
let dirPath = path + '/
screenshot' + '/
' + displayName;
let imagePackerApi = image.createImagePacker();
let arrayBuffer = await imagePackerApi.packing(data, packOpts);
let fd = fileio.openSync(dirPath,0o102,0o666);
...
...
validator/acts_validator/src/main/ets/pages/common/CameraFlashContainer.ets
浏览文件 @
835ad176
...
...
@@ -16,7 +16,6 @@
import fileio from '@ohos.fileio';
import prompt from '@ohos.prompt';
import router from '@ohos.router';
// @ts-ignore
import screenshot from '@ohos.screenshot';
import image from '@ohos.multimedia.image';
import Logger from '../model/Logger';
...
...
@@ -56,7 +55,7 @@ export struct CustomContainer {
.onClick(() => {
router.back({
url: this.Url,
params: { result: '
Pass
', title: this.name,
params: { result: '
true
', title: this.name,
}
})
this.getScreen(isFullScreen);
...
...
@@ -75,7 +74,7 @@ export struct CustomContainer {
.onClick(() => {
router.back({
url: this.Url,
params: { result: '
Fail
', title: this.name,
params: { result: '
false
', title: this.name,
}
})
this.getScreen(isFullScreen);
...
...
@@ -123,7 +122,7 @@ export struct CustomContainer {
};
let name = this.name;
let displayName = `${info.prefix}${name}${info.suffix}`;
let dirPath = path + '/' + displayName;
let dirPath = path + '/
screenshot' +'/
' + displayName;
let imagePackerApi = image.createImagePacker();
let arrayBuffer = await imagePackerApi.packing(data, packOpts);
let fd = fileio.openSync(dirPath, 0o102, 0o666);
...
...
validator/acts_validator/src/main/ets/pages/common/CameraOrientationContainer.ets
浏览文件 @
835ad176
...
...
@@ -16,7 +16,6 @@
import fileio from '@ohos.fileio';
import prompt from '@ohos.prompt';
import router from '@ohos.router';
// @ts-ignore
import screenshot from '@ohos.screenshot';
import image from '@ohos.multimedia.image';
import Logger from '../model/Logger';
...
...
@@ -56,7 +55,7 @@ export struct CustomContainer {
if (this.clickFrequency === this.testingFrequency){
router.back({
url:this.Url,
params: {result : '
Pass
', title : this.name,
params: {result : '
true
', title : this.name,
}
})
}
...
...
@@ -75,7 +74,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Fail
',title : this.name,
params: {result : '
false
',title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
@@ -121,7 +120,7 @@ export struct CustomContainer {
};
let name = this.name;
let displayName = `${info.prefix}${name}${info.suffix}`;
let dirPath = path + '/' + displayName;
let dirPath = path + '/
screenshot' + '/
' + displayName;
let imagePackerApi = image.createImagePacker();
let arrayBuffer = await imagePackerApi.packing(data, packOpts);
let fd = fileio.openSync(dirPath,0o102,0o666);
...
...
validator/acts_validator/src/main/ets/pages/common/CameraPhotoContainer.ets
浏览文件 @
835ad176
...
...
@@ -16,7 +16,6 @@
import fileio from '@ohos.fileio';
import prompt from '@ohos.prompt';
import router from '@ohos.router';
// @ts-ignore
import screenshot from '@ohos.screenshot';
import image from '@ohos.multimedia.image';
import Logger from '../model/Logger';
...
...
@@ -49,7 +48,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Pass
', title : this.name,
params: {result : '
true
', title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
@@ -67,7 +66,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Fail
',title : this.name,
params: {result : '
false
',title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
@@ -113,7 +112,7 @@ export struct CustomContainer {
};
let name = this.name;
let displayName = `${info.prefix}${name}${info.suffix}`;
let dirPath = path + '/' + displayName;
let dirPath = path + '/
screenshot' + '/
' + displayName;
let imagePackerApi = image.createImagePacker();
let arrayBuffer = await imagePackerApi.packing(data, packOpts);
let fd = fileio.openSync(dirPath,0o102,0o666);
...
...
validator/acts_validator/src/main/ets/pages/common/CameraPreviewFormatContainer.ets
浏览文件 @
835ad176
...
...
@@ -16,7 +16,6 @@
import fileio from '@ohos.fileio';
import prompt from '@ohos.prompt';
import router from '@ohos.router';
// @ts-ignore
import screenshot from '@ohos.screenshot';
import image from '@ohos.multimedia.image';
import Logger from '../model/Logger';
...
...
@@ -49,7 +48,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Pass
', title : this.name,
params: {result : '
true
', title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
@@ -67,7 +66,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Fail
',title : this.name,
params: {result : '
false
',title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
@@ -113,7 +112,7 @@ export struct CustomContainer {
};
let name = this.name;
let displayName = `${info.prefix}${name}${info.suffix}`;
let dirPath = path + '/' + displayName;
let dirPath = path + '/
screenshot' + '/
' + displayName;
let imagePackerApi = image.createImagePacker();
let arrayBuffer = await imagePackerApi.packing(data, packOpts);
let fd = fileio.openSync(dirPath,0o102,0o666);
...
...
validator/acts_validator/src/main/ets/pages/common/CameraVideoContainer.ets
浏览文件 @
835ad176
...
...
@@ -16,7 +16,6 @@
import fileio from '@ohos.fileio';
import prompt from '@ohos.prompt';
import router from '@ohos.router';
// @ts-ignore
import screenshot from '@ohos.screenshot';
import image from '@ohos.multimedia.image';
import Logger from '../model/Logger';
...
...
@@ -49,7 +48,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Pass
', title : this.name,
params: {result : '
true
', title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
@@ -67,7 +66,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Fail
',title : this.name,
params: {result : '
false
',title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
@@ -113,7 +112,7 @@ export struct CustomContainer {
};
let name = this.name;
let displayName = `${info.prefix}${name}${info.suffix}`;
let dirPath = path + '/' + displayName;
let dirPath = path + '/
screenshot' + '/
' + displayName;
let imagePackerApi = image.createImagePacker();
let arrayBuffer = await imagePackerApi.packing(data, packOpts);
let fd = fileio.openSync(dirPath,0o102,0o666);
...
...
validator/acts_validator/src/main/ets/pages/common/CanvasCustomContainer1.ets
浏览文件 @
835ad176
...
...
@@ -50,7 +50,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Pass
', title : this.name,
params: {result : '
true
', title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
@@ -68,7 +68,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Fail
',title : this.name,
params: {result : '
false
',title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
validator/acts_validator/src/main/ets/pages/common/CanvasCustomContainer2.ets
浏览文件 @
835ad176
...
...
@@ -52,7 +52,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Pass
', title : this.name,
params: {result : '
true
', title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
@@ -70,7 +70,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Fail
',title : this.name,
params: {result : '
false
',title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
validator/acts_validator/src/main/ets/pages/common/CustomContainer.ets
浏览文件 @
835ad176
...
...
@@ -48,7 +48,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Pass
', title : this.name,
params: {result : '
true
', title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
@@ -66,7 +66,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Fail
',title : this.name,
params: {result : '
false
',title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
validator/acts_validator/src/main/ets/pages/common/CustomContainer2.ets
浏览文件 @
835ad176
...
...
@@ -48,7 +48,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Pass
', title : this.name,
params: {result : '
true
', title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
@@ -66,7 +66,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Fail
',title : this.name,
params: {result : '
false
',title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
validator/acts_validator/src/main/ets/pages/common/CustomContainer3.ets
浏览文件 @
835ad176
...
...
@@ -49,7 +49,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Pass
', title : this.name,
params: {result : '
true
', title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
@@ -67,7 +67,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Fail
',title : this.name,
params: {result : '
false
',title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
validator/acts_validator/src/main/ets/pages/common/CustomContainer4.ets
浏览文件 @
835ad176
...
...
@@ -48,7 +48,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Pass
', title : this.name,
params: {result : '
true
', title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
@@ -66,7 +66,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Fail
',title : this.name,
params: {result : '
false
',title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
validator/acts_validator/src/main/ets/pages/common/CustomContainer5.ets
浏览文件 @
835ad176
...
...
@@ -50,7 +50,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Pass
', title : this.name,
params: {result : '
true
', title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
@@ -68,7 +68,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Fail
',title : this.name,
params: {result : '
false
',title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
validator/acts_validator/src/main/ets/pages/common/ExperienceCustomContainer.ets
浏览文件 @
835ad176
...
...
@@ -50,7 +50,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Pass
', title : this.name,
params: {result : '
true
', title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
@@ -68,7 +68,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Fail
',title : this.name,
params: {result : '
false
',title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
validator/acts_validator/src/main/ets/pages/common/StartExperienceCustomContainer.ets
浏览文件 @
835ad176
...
...
@@ -55,7 +55,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Pass
', title : this.name,
params: {result : '
true
', title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
@@ -73,7 +73,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Fail
',title : this.name,
params: {result : '
false
',title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
validator/acts_validator/src/main/ets/pages/common/TimeExperienceCustomContainer.ets
浏览文件 @
835ad176
...
...
@@ -50,7 +50,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Pass
', title : this.name,
params: {result : '
true
', title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
@@ -68,7 +68,7 @@ export struct CustomContainer {
.onClick(()=>{
router.back({
url:this.Url,
params: {result : '
Fail
',title : this.name,
params: {result : '
false
',title : this.name,
}
})
this.getScreen(isFullScreen);
...
...
validator/acts_validator/src/main/ets/pages/index.ets
浏览文件 @
835ad176
...
...
@@ -306,120 +306,120 @@ struct IndexPage {
}
let report = ArkUIReport + AudioReport + CameraReport + PlayerReport + ExperienceReport;
let FailIndex = report.indexOf('
Fail
');
let FailIndex = report.indexOf('
false
');
let FailNum = 0;
while(FailIndex != -1) {
console.log(FailIndex);
FailNum++;
FailIndex = report.indexOf('
Fail
',FailIndex + 1);
FailIndex = report.indexOf('
false
',FailIndex + 1);
}
let failNum = (FailNum).toString();
let PassIndex = report.indexOf('
Pass
');
let PassIndex = report.indexOf('
true
');
let PassNum = 0;
while(PassIndex != -1) {
console.log(PassIndex);
PassNum++;
PassIndex = report.indexOf('
Pass
',PassIndex + 1);
PassIndex = report.indexOf('
true
',PassIndex + 1);
}
let TestNum = FailNum + PassNum;
let testNum = (TestNum).toString();
/*
* ArkUI
*/
let ArkUIFailIndex = ArkUIReport.indexOf('
Fail
');
let ArkUIFailIndex = ArkUIReport.indexOf('
false
');
let ArkUIFailNum = 0;
while (ArkUIFailIndex != -1) {
console.log(ArkUIFailIndex);
ArkUIFailNum++;
ArkUIFailIndex = ArkUIReport.indexOf('
Fail
',ArkUIFailIndex + 1);
ArkUIFailIndex = ArkUIReport.indexOf('
false
',ArkUIFailIndex + 1);
}
let ArkuiFailNum = (ArkUIFailNum).toString();
let ArkUIPassIndex = ArkUIReport.indexOf('
Pass
');
let ArkUIPassIndex = ArkUIReport.indexOf('
true
');
let ArkUIPassNum = 0;
while (ArkUIPassIndex != -1) {
console.log(ArkUIPassIndex);
ArkUIPassNum++;
ArkUIPassIndex = ArkUIReport.indexOf('
Pass
',ArkUIPassIndex + 1);
ArkUIPassIndex = ArkUIReport.indexOf('
true
',ArkUIPassIndex + 1);
}
let ArkUITestNum = ArkUIFailNum + ArkUIPassNum;
let ArkuiTestNum = (ArkUITestNum).toString();
/*
* Audio
*/
let AudioFailIndex = AudioReport.indexOf('
Fail
');
let AudioFailIndex = AudioReport.indexOf('
false
');
let AudioFailNum = 0;
while (AudioFailIndex != -1) {
console.log(AudioFailIndex);
AudioFailNum++;
AudioFailIndex = AudioReport.indexOf('
Fail
',AudioFailIndex + 1);
AudioFailIndex = AudioReport.indexOf('
false
',AudioFailIndex + 1);
}
let audioFailNum = (AudioFailNum).toString();
let AudioPassIndex = AudioReport.indexOf('
Pass
');
let AudioPassIndex = AudioReport.indexOf('
true
');
let AudioPassNum = 0;
while (AudioPassIndex != -1) {
console.log(AudioPassIndex);
AudioPassNum++;
AudioPassIndex = AudioReport.indexOf('
Pass
',AudioPassIndex + 1);
AudioPassIndex = AudioReport.indexOf('
true
',AudioPassIndex + 1);
}
let AudioTestNum = AudioFailNum + AudioPassNum;
let audioTestNum = (AudioTestNum).toString();
/*
* Camera
*/
let CameraFailIndex = CameraReport.indexOf('
Fail
');
let CameraFailIndex = CameraReport.indexOf('
false
');
let CameraFailNum = 0;
while (CameraFailIndex != -1) {
console.log(CameraFailIndex);
CameraFailNum++;
CameraFailIndex = CameraReport.indexOf('
Fail
',CameraFailIndex + 1);
CameraFailIndex = CameraReport.indexOf('
false
',CameraFailIndex + 1);
}
let cameraFailNum = (CameraFailNum).toString();
let CameraPassIndex = CameraReport.indexOf('
Pass
');
let CameraPassIndex = CameraReport.indexOf('
true
');
let CameraPassNum = 0;
while (CameraPassIndex != -1) {
console.log(CameraPassIndex);
CameraPassNum++;
CameraPassIndex = CameraReport.indexOf('
Pass
',CameraPassIndex + 1);
CameraPassIndex = CameraReport.indexOf('
true
',CameraPassIndex + 1);
}
let CameraTestNum = CameraFailNum + CameraPassNum;
let cameraTestNum = (CameraTestNum).toString();
/*
* Player
*/
let PlayerFailIndex = PlayerReport.indexOf('
Fail
');
let PlayerFailIndex = PlayerReport.indexOf('
false
');
let PlayerFailNum = 0;
while (PlayerFailIndex != -1) {
console.log(PlayerFailIndex);
PlayerFailNum++;
PlayerFailIndex = PlayerReport.indexOf('
Fail
',PlayerFailIndex + 1);
PlayerFailIndex = PlayerReport.indexOf('
false
',PlayerFailIndex + 1);
}
let playerFailNum = (PlayerFailNum).toString();
let PlayerPassIndex = PlayerReport.indexOf('
Pass
');
let PlayerPassIndex = PlayerReport.indexOf('
true
');
let PlayerPassNum = 0;
while (PlayerPassIndex != -1) {
console.log(PlayerPassIndex);
PlayerPassNum++;
PlayerPassIndex = PlayerReport.indexOf('
Pass
',PlayerPassIndex + 1);
PlayerPassIndex = PlayerReport.indexOf('
true
',PlayerPassIndex + 1);
}
let PlayerTestNum = PlayerFailNum + PlayerPassNum;
let playerTestNum = (PlayerTestNum).toString();
/*
* Experience
*/
let ExperienceFailIndex = ExperienceReport.indexOf('
Fail
');
let ExperienceFailIndex = ExperienceReport.indexOf('
false
');
let ExperienceFailNum = 0;
while (ExperienceFailIndex != -1) {
console.log(ExperienceFailIndex);
ExperienceFailNum++;
ExperienceFailIndex = ExperienceReport.indexOf('
Fail
',ExperienceFailIndex + 1);
ExperienceFailIndex = ExperienceReport.indexOf('
false
',ExperienceFailIndex + 1);
}
let experienceFailNum = (ExperienceFailNum).toString();
let ExperiencePassIndex = ExperienceReport.indexOf('
Pass
');
let ExperiencePassIndex = ExperienceReport.indexOf('
true
');
let ExperiencePassNum = 0;
while (ExperiencePassIndex != -1) {
console.log(ExperiencePassIndex);
ExperiencePassNum++;
ExperiencePassIndex = ExperienceReport.indexOf('
Pass
',ExperiencePassIndex + 1);
ExperiencePassIndex = ExperienceReport.indexOf('
true
',ExperiencePassIndex + 1);
}
let ExperienceTestNum = ExperienceFailNum + ExperiencePassNum;
let experienceTestNum = (ExperienceTestNum).toString();
...
...
@@ -457,9 +457,9 @@ struct IndexPage {
for (let i = 0; i < title1.length; i++) {
serializer.startElement("testcase");
serializer.setAttributes("name", String(title1[i]));
serializer.setAttributes("status", "
*
");
serializer.setAttributes("status", "
run
");
serializer.setAttributes("time", "*");
serializer.setAttributes("classname", "
*
");
serializer.setAttributes("classname", "
ArkUI
");
serializer.setAttributes("result", String(result1[i]));
serializer.setAttributes("level", "*");
serializer.setAttributes("message", "*");
...
...
@@ -482,9 +482,9 @@ struct IndexPage {
for (let i = 0; i < title2.length; i++) {
serializer.startElement("testcase");
serializer.setAttributes("name", String(title2[i]));
serializer.setAttributes("status", "
*
");
serializer.setAttributes("status", "
run
");
serializer.setAttributes("time", "*");
serializer.setAttributes("classname", "
*
");
serializer.setAttributes("classname", "
Audio
");
serializer.setAttributes("result", String(result2[i]));
serializer.setAttributes("level", "*");
serializer.setAttributes("message", "*");
...
...
@@ -504,12 +504,12 @@ struct IndexPage {
serializer.setAttributes("tests", cameraTestNum);
serializer.setAttributes("message", "*");
serializer.setAttributes("modulename", "ActsCameraTest");
for (let i = 0; i < title
2
.length; i++) {
for (let i = 0; i < title
3
.length; i++) {
serializer.startElement("testcase");
serializer.setAttributes("name", String(title3[i]));
serializer.setAttributes("status", "
*
");
serializer.setAttributes("status", "
run
");
serializer.setAttributes("time", "*");
serializer.setAttributes("classname", "
*
");
serializer.setAttributes("classname", "
Camera
");
serializer.setAttributes("result", String(result3[i]));
serializer.setAttributes("level", "*");
serializer.setAttributes("message", "*");
...
...
@@ -529,12 +529,12 @@ struct IndexPage {
serializer.setAttributes("tests", playerTestNum);
serializer.setAttributes("message", "*");
serializer.setAttributes("modulename", "ActsPlayerTest");
for (let i = 0; i < title
2
.length; i++) {
for (let i = 0; i < title
4
.length; i++) {
serializer.startElement("testcase");
serializer.setAttributes("name", String(title4[i]));
serializer.setAttributes("status", "
*
");
serializer.setAttributes("status", "
run
");
serializer.setAttributes("time", "*");
serializer.setAttributes("classname", "
*
");
serializer.setAttributes("classname", "
Player
");
serializer.setAttributes("result", String(result4[i]));
serializer.setAttributes("level", "*");
serializer.setAttributes("message", "*");
...
...
@@ -554,12 +554,12 @@ struct IndexPage {
serializer.setAttributes("tests", experienceTestNum);
serializer.setAttributes("message", "*");
serializer.setAttributes("modulename", "ActsExperienceTest");
for (let i = 0; i < title
2
.length; i++) {
for (let i = 0; i < title
5
.length; i++) {
serializer.startElement("testcase");
serializer.setAttributes("name", String(title5[i]));
serializer.setAttributes("status", "
*
");
serializer.setAttributes("status", "
run
");
serializer.setAttributes("time", "*");
serializer.setAttributes("classname", "
*
");
serializer.setAttributes("classname", "
Experience
");
serializer.setAttributes("result", String(result5[i]));
serializer.setAttributes("level", "*");
serializer.setAttributes("message", "*");
...
...
validator/acts_validator/src/main/resources/base/profile/main_pages.json
浏览文件 @
835ad176
...
...
@@ -44,8 +44,15 @@
"pages/Experience/Experience_index"
,
"pages/Experience/PhotoFps"
,
"pages/Experience/DeskFps"
,
"pages/Experience/ColdStartTest"
,
"pages/Experience/HotStartTest"
,
"pages/Experience/ContactsColdStartTest"
,
"pages/Experience/ContactsHotStartTest"
,
"pages/Experience/MmsColdStartTest"
,
"pages/Experience/MmsHotStartTest"
,
"pages/Experience/PhotosColdStartTest"
,
"pages/Experience/PhotosHotStartTest"
,
"pages/Experience/SettingsColdStartTest"
,
"pages/Experience/SettingsHotStartTest"
,
"pages/Experience/CameraColdStartTest"
,
"pages/Experience/ViewPhotoTest"
,
"pages/Experience/KeyboardDisplayTest"
,
"pages/Experience/StartTaskManager"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录