未验证 提交 835ad176 编写于 作者: O openharmony_ci 提交者: Gitee

!8177 修改左滑回退颜色保留的bug,将媒体模块的截屏区分目录合入3.2release

Merge pull request !8177 from 田文哲/OpenHarmony-3.2-Release
......@@ -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){
......
......@@ -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',
})
}
}
......@@ -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',
})
}
}
......@@ -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.005;
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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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',
})
}
}
......@@ -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
......@@ -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',
})
}
}
......@@ -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
......@@ -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',
})
}
}
......@@ -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
......@@ -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
......@@ -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',
})
}
}
......@@ -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',
})
}
}
......@@ -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
......@@ -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',
})
}
}
......@@ -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',
})
}
}
......@@ -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',
})
}
}
......@@ -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',
})
}
}
......@@ -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',
})
}
}
......@@ -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',
})
}
}
......@@ -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){
......
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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){
......
/*
* 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',
})
}
}
/*
* 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',
})
}
}
/*
* 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',
})
}
}
......@@ -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',
})
}
}
......@@ -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){
......
......@@ -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
......@@ -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
/*
* 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',
})
}
}
/*
* 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',
})
}
}
......@@ -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
......@@ -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 = 'PhotosColdStart';
@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',
})
}
}
......@@ -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 = 'PhotosHotStart';
@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',
})
}
}
......@@ -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
/*
* 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',
})
}
}
/*
* 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',
})
}
}
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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){
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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 < title2.length; i++) {
for (let i = 0; i < title3.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 < title2.length; i++) {
for (let i = 0; i < title4.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 < title2.length; i++) {
for (let i = 0; i < title5.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", "*");
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册