提交 47713768 编写于 作者: C chengxingzhen

xts用例优化

Signed-off-by: Nchengxingzhen <chengxingzhen@huawei.com>
上级 b360ddb6
......@@ -6,8 +6,8 @@
"description": "$string:entry_test_desc",
"mainElement": "MainAbility",
"deviceTypes": [
"default",
"tablet"
"default",
"tablet"
],
"deliveryWithInstall": true,
"installationFree": false,
......
......@@ -44,7 +44,7 @@ export default class MainAbility extends Ability {
abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
cmd = 'aa test -b com.example.aacommandrelyhap -m entry_test -s class ACTS_AACommand_01_3#ACTS_AACo' +
cmd = 'aa test -b com.example.aacommandrelyhap -m entry_test -s class AACommandPrintOneTest#ACTS_AACo' +
'mmand_print_01_0100 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_print_01_0100 - executeShellCommand: start ')
......@@ -52,13 +52,12 @@ export default class MainAbility extends Ability {
console.log('ACTS_AACommand_print_01_0100 stdResult = ' + data.stdResult)
globalThis.stdResult3 = data.stdResult;
console.log('ACTS_AACommand_print_01_0100 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_print_01_0100', this.context);
})
await sleep(4000)
await sleep(3000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_AAComm' +
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class AACommandPrintOneTest#ACTS_AAComm' +
'and_print_01_0200 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_print_01_0200 - executeShellCommand: start ')
......@@ -66,13 +65,12 @@ export default class MainAbility extends Ability {
console.log('ACTS_AACommand_print_01_0200 stdResult = ' + data.stdResult)
globalThis.stdResult4 = data.stdResult;
console.log('ACTS_AACommand_print_01_0200 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_print_01_0200', this.context);
})
await sleep(4000)
await sleep(3000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_' +
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class AACommandPrintOneTest#ACTS_' +
'AACommand_print_01_0300 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_print_01_0300 - executeShellCommand: start ')
......@@ -80,13 +78,12 @@ export default class MainAbility extends Ability {
console.log('ACTS_AACommand_print_01_0300 stdResult = ' + data.stdResult)
globalThis.stdResult5 = data.stdResult;
console.log('ACTS_AACommand_print_01_0300 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_print_01_0300', this.context);
})
await sleep(4000)
await sleep(3000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_AAComma' +
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class AACommandPrintOneTest#ACTS_AAComma' +
'nd_print_01_0400 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_print_01_0400 - executeShellCommand: start ')
......@@ -94,13 +91,12 @@ export default class MainAbility extends Ability {
console.log('ACTS_AACommand_print_01_0400 stdResult = ' + data.stdResult)
globalThis.stdResult6 = data.stdResult;
console.log('ACTS_AACommand_print_01_0400 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_print_01_0400', this.context);
})
await sleep(4000)
await sleep(3000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_AAComm' +
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class AACommandPrintOneTest#ACTS_AAComm' +
'and_print_01_0500 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_print_01_0500 - executeShellCommand: start ')
......@@ -108,13 +104,12 @@ export default class MainAbility extends Ability {
console.log('ACTS_AACommand_print_01_0500 stdResult = ' + data.stdResult)
globalThis.stdResult7 = data.stdResult;
console.log('ACTS_AACommand_print_01_0500 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_print_01_0500', this.context);
})
await sleep(4000)
await sleep(3000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_AA' +
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class AACommandPrintOneTest#ACTS_AA' +
'Command_print_01_0600 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_print_01_0600 - executeShellCommand: start ')
......@@ -122,42 +117,38 @@ export default class MainAbility extends Ability {
console.log('ACTS_AACommand_print_01_0600 stdResult = ' + data.stdResult)
globalThis.stdResult8 = data.stdResult;
console.log('ACTS_AACommand_print_01_0600 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_print_01_0600', this.context);
})
await sleep(4000)
await sleep(3000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class ' +
'ACTS_AACommand_01_3#ACTS_AACommand_print_01_0700 -s unittest OpenHarmonyTestRunner'
'AACommandPrintOneTest#ACTS_AACommand_print_01_0700 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_print_01_0700 - executeShellCommand: start ')
console.log('ACTS_AACommand_print_01_0700 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_print_01_0700 stdResult = ' + data.stdResult)
globalThis.stdResult9 = data.stdResult;
console.log('ACTS_AACommand_print_01_0700 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_print_01_0700', this.context);
})
await sleep(4000)
await sleep(3000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s ' +
'class ACTS_AACommand_01_3#ACTS_AACommand_print_01_0800 -s unittest OpenHarmonyTestRunner'
'class AACommandPrintOneTest#ACTS_AACommand_print_01_0800 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_print_01_0800 - executeShellCommand: start ')
console.log('ACTS_AACommand_print_01_0800 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_print_01_0800 stdResult = ' + data.stdResult)
globalThis.stdResult10 = data.stdResult;
console.log('ACTS_AACommand_print_01_0800 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_print_01_0800', this.context);
})
setTimeout(() => {
Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
}, 5000)
}, 6000)
}
onDestroy() {
......
......@@ -33,6 +33,12 @@
}
]
}
],
"requestPermissions": [
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
]
}
}
\ No newline at end of file
......@@ -13,13 +13,10 @@
* limitations under the License.
*/
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
import { describe, it } from '@ohos/hypium'
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
export default function abilityTest() {
describe('ACTS_AACommand_01_3', function () {
describe('AACommandPrintTest', function () {
/**
* @tc.number: ACTS_AACommand_printSync_01_0100
* @tc.name: The -b, -p, -s, -w and other parameters of the test command are valid,
......@@ -27,7 +24,8 @@ export default function abilityTest() {
* @tc.desc: Verify that the test framework can be started normally and the logs can be output normally through
* the test command.
*/
it('ACTS_AACommand_printSync_01_0100', 0, async function (done) {
it('ACTS_AACommand_printSync_01_0100', 0, async function (done) {
done()
console.log("ACTS_AACommand_printSync_01_0100 start ====> " )
var msg = '测试日志!@#$%^&*()_+QWE{}|?><Fafq3146'
globalThis.abilityDelegator.printSync(msg);
......@@ -37,7 +35,6 @@ export default function abilityTest() {
console.log("ACTS_AACommand_printSync_01_0100 finishTest test end ========> callback " )
console.log("ACTS_AACommand_printSync_01_0100 finishTest test end " +
"========> callback data: "+JSON.stringify(data))
done()
})
})
......@@ -49,6 +46,7 @@ export default function abilityTest() {
* the test command.
*/
it('ACTS_AACommand_printSync_01_0200', 0, async function (done) {
done()
var msg = '0callbackaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'aaaaaaaaaa' +
'1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
......@@ -65,7 +63,6 @@ export default function abilityTest() {
var finishmsg = 'ACTS_AACommand_printSync_01_0200 end'
globalThis.abilityDelegator.finishTest(finishmsg, 1).then(()=>{
console.log("ACTS_AACommand_printSync_01_0200 print test end ========> callback " )
done()
})
})
......@@ -77,6 +74,7 @@ export default function abilityTest() {
* the test command.
*/
it('ACTS_AACommand_printSync_01_0300', 0, async function (done) {
done()
var msg = '0callbackaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'aaaaaaaaaa' +
'1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
......@@ -94,7 +92,6 @@ export default function abilityTest() {
var finishmsg = 'ACTS_AACommand_printSync_01_0300 end'
globalThis.abilityDelegator.finishTest(finishmsg, 1).then(()=>{
console.log("ACTS_AACommand_printSync_01_0300 print test end ========> callback " )
done()
})
})
......@@ -106,12 +103,12 @@ export default function abilityTest() {
* the test command.
*/
it('ACTS_AACommand_printSync_01_0400', 0, async function (done) {
done()
globalThis.abilityDelegator.printSync(null);
console.log("ACTS_AACommand_printSync_01_0300 printSync end ====> " )
var finishmsg = 'ACTS_AACommand_printSync_01_0400 end'
globalThis.abilityDelegator.finishTest(finishmsg, 1).then(()=>{
console.log("ACTS_AACommand_printSync_01_0400 print test end ========> callback " )
done()
})
})
})
......
......@@ -13,7 +13,7 @@
* limitations under the License.
*/
import abilityTest from './Ability.test'
import abilityTest from './AACommandPrint.test'
export default function testsuite() {
abilityTest()
......
......@@ -45,59 +45,54 @@ export default class MainAbility extends Ability {
abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
cmd = 'aa test -b com.example.aacommandprintsync -m entry_test -s class ' +
'ACTS_AACommand_01_3#ACTS_AACommand_printSync_01_0100 -s unittest OpenHarmonyTestRunner'
'AACommandPrintTest#ACTS_AACommand_printSync_01_0100 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_printSync_01_0100 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_printSync_01_0100 stdResult = ' + data.stdResult)
globalThis.stdResult1 = data.stdResult;
console.log('ACTS_AACommand_printSync_01_0100 - executeShellCommand: end ')
await startAbilityTest('ACTS_AACommand_printSync_01_0100', this.context);
})
await sleep(3000)
cmd = 'aa test -m entry_test -b com.example.aacommandprintsync -s class ' +
'ACTS_AACommand_01_3#ACTS_AACommand_printSync_01_0200 -s unittest OpenHarmonyTestRunner'
'AACommandPrintTest#ACTS_AACommand_printSync_01_0200 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_printSync_01_0200 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_printSync_01_0200 stdResult = ' + data.stdResult)
globalThis.stdResult2 = data.stdResult;
console.log('ACTS_AACommand_printSync_01_0200 - executeShellCommand: end ')
await startAbilityTest('ACTS_AACommand_printSync_01_0200', this.context);
})
await sleep(3000)
cmd = 'aa test -m entry_test -b com.example.aacommandprintsync -s class ' +
'ACTS_AACommand_01_3#ACTS_AACommand_printSync_01_0300 -s unittest OpenHarmonyTestRunner'
'AACommandPrintTest#ACTS_AACommand_printSync_01_0300 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_printSync_01_0300 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_printSync_01_0300 stdResult = ' + data.stdResult)
globalThis.stdResult3 = data.stdResult;
console.log('ACTS_AACommand_printSync_01_0300 - executeShellCommand: end ')
await startAbilityTest('ACTS_AACommand_printSync_01_0300', this.context);
})
await sleep(3000)
cmd = 'aa test -m entry_test -b com.example.aacommandprintsync -s class ' +
'ACTS_AACommand_01_3#ACTS_AACommand_printSync_01_0400 -s unittest OpenHarmonyTestRunner'
'AACommandPrintTest#ACTS_AACommand_printSync_01_0400 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_printSync_01_0400 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_printSync_01_0400 stdResult = ' + data.stdResult)
globalThis.stdResult4 = data.stdResult;
console.log('ACTS_AACommand_printSync_01_0400 - executeShellCommand: end ')
await startAbilityTest('ACTS_AACommand_printSync_01_0400', this.context);
})
setTimeout(() => {
Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
}, 5000)
}, 6000)
}
onDestroy() {
......
......@@ -33,6 +33,12 @@
}
]
}
],
"requestPermissions": [
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
]
}
}
\ No newline at end of file
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { describe, it } from '@ohos/hypium'
export default function abilityTest() {
describe('AACommandPrintOneTest', function () {
/**
* @tc.number: ACTS_AACommand_print_01_0100
* @tc.name: The -b, -p, -s, -w and other parameters of the test command are valid, and the print interface is
* called in AsyncCallback mode. The print information includes Chinese, special characters, etc.
* @tc.desc: Verify that the test framework can be started normally and the logs can be output normally through
* the test command.
*/
it('ACTS_AACommand_print_01_0100', 0, async function (done) {
console.log("ACTS_AACommand_print_01_0100 start ====> " )
done()
var msg = '测试日志!@#$%^&*()_+QWE{}|?><Fafq3146'
globalThis.abilityDelegator.print(msg,(err,data)=>{
console.log("ACTS_AACommand_print_01_0100 print test end ========> callback " )
console.log("ACTS_AACommand_print_01_0100 print test end ========> callback err: "+JSON.stringify(err) )
console.log("ACTS_AACommand_print_01_0100 print test end ========> callback data: "+JSON.stringify(data))
})
var finishmsg = 'ACTS_AACommand_print_01_0100 end'
globalThis.abilityDelegator.finishTest(finishmsg, 1).then((data)=>{
console.log("ACTS_AACommand_print_01_0100 finishTest test end ========> callback " )
console.log("ACTS_AACommand_print_01_0100 finishTest test end ========> callback data: "+JSON.stringify(data))
})
})
/**
* @tc.number: ACTS_AACommand_print_01_0200
* @tc.name: The -b, -p, -s, -w and other parameters of the test command are valid, and the print interface is
* called in AsyncCallback mode. The length of the print message is 1000 characters.
* @tc.desc: Verify that the test framework can be started normally and the logs can be output normally through
* the test command.
*/
it('ACTS_AACommand_print_01_0200', 0, async function (done) {
done()
var msg = '0callbackaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'aaaaaaaaaa' +
'1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'2aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'3aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'4aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'5aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'6aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'7aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'8aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'9aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaae'
globalThis.abilityDelegator.print(msg,()=>{
console.log("print test end ========> callback " )
})
var finishmsg = 'ACTS_AACommand_print_01_0200 end'
globalThis.abilityDelegator.finishTest(finishmsg, 1).then(()=>{
console.log("ACTS_AACommand_print_01_0200 print test end ========> callback " )
})
})
/**
* @tc.number: ACTS_AACommand_print_01_0300
* @tc.name: The -b, -p, -s, -w and other parameters of the test command are valid, and the print interface is
* called in AsyncCallback mode. The length of the print message is greater than 1000 characters.
* @tc.desc: Verify that the test framework can be started normally and the logs can be output normally through
* the test command.
*/
it('ACTS_AACommand_print_01_0300', 0, async function (done) {
done()
var msg = '0callbackaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'2aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'3aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'4aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'5aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'6aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'7aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'8aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'9aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaae' +
'fffffffffff'
globalThis.abilityDelegator.print(msg,()=>{
console.log("print test end ========> callback " )
})
var finishmsg = 'ACTS_AACommand_print_01_0300 end'
globalThis.abilityDelegator.finishTest(finishmsg, 1).then(()=>{
console.log("ACTS_AACommand_print_01_0300 print test end ========> callback " )
})
})
/**
* @tc.number: ACTS_AACommand_print_01_0400
* @tc.name: The -b, -p, -s, -w and other parameters of the test command are valid, and the print interface is
* called in AsyncCallback mode. print information is null.
* @tc.desc: Verify that the test framework can be started normally and the logs can be output normally through
* the test command.
*/
it('ACTS_AACommand_print_01_0400', 0, async function (done) {
done()
globalThis.abilityDelegator.print(null,()=>{
console.log("print test end ========> callback " )
})
var finishmsg = 'ACTS_AACommand_print_01_0400 end'
globalThis.abilityDelegator.finishTest(finishmsg, 1).then(()=>{
console.log("ACTS_AACommand_print_01_0400 print test end ========> callback " )
})
})
/**
* @tc.number: ACTS_AACommand_print_01_0500
* @tc.name: The -b, -p, -s, -w and other parameters of the test command are valid, and the print interface is
* called in Promise mode. The print information includes Chinese, special characters, etc.
* @tc.desc: Verify that the test framework can be started normally and the logs can be output normally through
* the test command.
*/
it('ACTS_AACommand_print_01_0500', 0, async function (done) {
done()
var msg = '测试日志!@#$%^&*()_+QWE{}|?><Fafq3146'
globalThis.abilityDelegator.print(msg).then(()=>{
console.log("ACTS_AACommand_print_01_0500 print test end ========> callback " )
})
var finishmsg = 'ACTS_AACommand_print_01_0500 end'
globalThis.abilityDelegator.finishTest(finishmsg, 1).then(()=>{
console.log("ACTS_AACommand_print_01_0500 print test end ========> callback " )
})
})
/**
* @tc.number: ACTS_AACommand_print_01_0600
* @tc.name: The -b, -p, -s, -w and other parameters of the test command are valid, and the print interface is
* called in Promise mode. The length of the print message is 1000 characters.
* @tc.desc: Verify that the test framework can be started normally and the logs can be output normally
* through the test command.
*/
it('ACTS_AACommand_print_01_0600', 0, async function (done) {
done()
var msg = '0callbackaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'2aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'3aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'4aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'5aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'6aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'7aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'8aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'9aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaae'
globalThis.abilityDelegator.print(msg).then(()=>{
console.log("ACTS_AACommand_print_01_0600 print test end ========> callback " )
})
var finishmsg = 'ACTS_AACommand_print_01_0600 end'
globalThis.abilityDelegator.finishTest(finishmsg, 1).then(()=>{
console.log("ACTS_AACommand_print_01_0600 2 print test end ========> callback " )
})
})
/**
* @tc.number: ACTS_AACommand_print_01_0700
* @tc.name: The -b, -p, -s, -w and other parameters of the test command are valid, and the print interface is
* called in Promise mode. The length of the print message is greater than 1000 characters.
* @tc.desc: Verify that the test framework can be started normally and the logs can be output normally through
* the test command.
*/
it('ACTS_AACommand_print_01_0700', 0, async function (done) {
done()
var msg = '0callbackaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'2aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'3aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'4aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'5aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'6aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'7aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'8aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'9aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaae' +
'fffffffffff'
globalThis.abilityDelegator.print(msg).then(()=>{
console.log("ACTS_AACommand_print_01_0700 print test end ========> callback " )
})
var finishmsg = 'ACTS_AACommand_print_01_0700 end'
globalThis.abilityDelegator.finishTest(finishmsg, 1).then(()=>{
console.log("ACTS_AACommand_print_01_0700 2 print test end ========> callback " )
})
})
/**
* @tc.number: ACTS_AACommand_print_01_0800
* @tc.name: The -b, -p, -s, -w and other parameters of the test command are valid, and the print interface is
* called in Promise mode. print information is null.
* @tc.desc: Verify that the test framework can be started normally and the logs can be output normally
* through the test command.
*/
it('ACTS_AACommand_print_01_0800', 0, async function (done) {
done()
globalThis.abilityDelegator.print("").then(()=>{
console.log("ACTS_AACommand_print_01_0800 print test end ========> callback " )
})
var finishmsg = 'ACTS_AACommand_print_01_0800 end'
globalThis.abilityDelegator.finishTest(finishmsg, 1).then(()=>{
console.log("ACTS_AACommand_print_01_0800 2 print test end ========> callback " )
})
})
})
};
......@@ -13,8 +13,10 @@
* limitations under the License.
*/
import abilityTest from './Ability.test'
import aaCommandTest from './AACommand.test'
import aaCommandPrintOneTest from './AACommandPrintOne.test'
export default function testsuite() {
abilityTest()
aaCommandTest()
aaCommandPrintOneTest()
}
\ No newline at end of file
......@@ -13,7 +13,7 @@
* limitations under the License.
*/
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
import { describe, it, expect } from '@ohos/hypium'
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
export default function abilityTest() {
describe('ACTS_AACommand_01_3', function () {
......
......@@ -46,20 +46,19 @@ export default class MainAbility extends Ability {
abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s ' +
'class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_0700 -s unittest OpenHarmonyTestRunner'
'class AACommandTest#ACTS_AACommand_finish_01_0700 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_0700 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_0700 stdResult = ' + data.stdResult)
globalThis.stdResult1 = data.stdResult;
console.log('ACTS_AACommand_finish_01_0700 - executeShellCommand: end ')
await startAbilityTest('ACTS_AACommand_finish_01_0700', this.context);
})
await sleep(4000)
cmd = 'aa dump -a'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.info('ACTS_AACommand_finish_01_0700 : err : ' + JSON.stringify(err));
console.info('ACTS_AACommand_finish_01_0700 : data : ' + JSON.stringify(data));
globalThis.stdResult2 = data["stdResult"];
......@@ -69,21 +68,20 @@ export default class MainAbility extends Ability {
await sleep(2000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class ' +
'ACTS_AACommand_01_3#ACTS_AACommand_finish_01_0400 -s unittest OpenHarmonyTestRunner'
'AACommandTest#ACTS_AACommand_finish_01_0400 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_0400 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_0400 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_0400 stdResult = ' + data.stdResult)
globalThis.stdResult11 = data.stdResult;
console.log('ACTS_AACommand_finish_01_0400 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_0400', this.context);
})
await sleep(4000)
cmd = 'aa dump -a'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.info('ACTS_AACommand_finish_01_0700 : err : ' + JSON.stringify(err));
console.info('ACTS_AACommand_finish_01_0700 : data : ' + JSON.stringify(data));
globalThis.stdResult12 = data["stdResult"];
......@@ -93,21 +91,20 @@ export default class MainAbility extends Ability {
await sleep(2000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s ' +
'class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_0100 -s unittest OpenHarmonyTestRunner'
'class AACommandTest#ACTS_AACommand_finish_01_0100 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_0100 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_0100 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_0100 stdResult = ' + data.stdResult)
globalThis.stdResult13 = data.stdResult;
console.log('ACTS_AACommand_finish_01_0100 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_0100', this.context);
})
await sleep(4000)
cmd = 'aa dump -a'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.info('ACTS_AACommand_finish_01_0700 : err : ' + JSON.stringify(err));
console.info('ACTS_AACommand_finish_01_0700 : data : ' + JSON.stringify(data));
globalThis.stdResult14 = data["stdResult"];
......@@ -117,21 +114,20 @@ export default class MainAbility extends Ability {
await sleep(2000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class ' +
'ACTS_AACommand_01_3#ACTS_AACommand_finish_01_0500 -s unittest OpenHarmonyTestRunner'
'AACommandTest#ACTS_AACommand_finish_01_0500 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_0500 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_0500 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_0500 stdResult = ' + data.stdResult)
globalThis.stdResult15 = data.stdResult;
console.log('ACTS_AACommand_finish_01_0500 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_0500', this.context);
})
await sleep(4000)
cmd = 'aa dump -a'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.info('ACTS_AACommand_finish_01_0500 : err : ' + JSON.stringify(err));
console.info('ACTS_AACommand_finish_01_0500 : data : ' + JSON.stringify(data));
globalThis.stdResult16 = data["stdResult"];
......@@ -141,21 +137,20 @@ export default class MainAbility extends Ability {
await sleep(2000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s ' +
'class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_0600 -s unittest OpenHarmonyTestRunner'
'class AACommandTest#ACTS_AACommand_finish_01_0600 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_0600 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_0600 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_0600 stdResult = ' + data.stdResult)
globalThis.stdResult17 = data.stdResult;
console.log('ACTS_AACommand_finish_01_0600 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_0600', this.context);
})
await sleep(4000)
cmd = 'aa dump -a'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.info('ACTS_AACommand_finish_01_0600 : err : ' + JSON.stringify(err));
console.info('ACTS_AACommand_finish_01_0600 : data : ' + JSON.stringify(data));
globalThis.stdResult18 = data["stdResult"];
......@@ -165,21 +160,20 @@ export default class MainAbility extends Ability {
await sleep(2000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s ' +
'class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_0900 -s unittest OpenHarmonyTestRunner'
'class AACommandTest#ACTS_AACommand_finish_01_0900 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_0900 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_0900 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_0900 stdResult = ' + data.stdResult)
globalThis.stdResult19 = data.stdResult;
console.log('ACTS_AACommand_finish_01_0900 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_0900', this.context);
})
await sleep(4000)
cmd = 'aa dump -a'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.info('ACTS_AACommand_finish_01_0900 : err : ' + JSON.stringify(err));
console.info('ACTS_AACommand_finish_01_0900 : data : ' + JSON.stringify(data));
globalThis.stdResult20 = data["stdResult"];
......@@ -189,21 +183,20 @@ export default class MainAbility extends Ability {
await sleep(2000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap ' +
'-s class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_1300 -s unittest OpenHarmonyTestRunner'
'-s class AACommandTest#ACTS_AACommand_finish_01_1300 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_1300 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_1300 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_1300 stdResult = ' + data.stdResult)
globalThis.stdResult23 = data.stdResult;
console.log('ACTS_AACommand_finish_01_1300 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_1300', this.context);
})
await sleep(4000)
cmd = 'aa dump -a'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.info('ACTS_AACommand_finish_01_1300 : err : ' + JSON.stringify(err));
console.info('ACTS_AACommand_finish_01_1300 : data : ' + JSON.stringify(data));
globalThis.stdResult24 = data["stdResult"];
......@@ -213,21 +206,20 @@ export default class MainAbility extends Ability {
await sleep(2000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap ' +
'-s class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_1400 -s unittest OpenHarmonyTestRunner'
'-s class AACommandTest#ACTS_AACommand_finish_01_1400 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_1400 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_1400 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_1400 stdResult = ' + data.stdResult)
globalThis.stdResult25 = data.stdResult;
console.log('ACTS_AACommand_finish_01_1400 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_1400', this.context);
})
await sleep(4000)
cmd = 'aa dump -a'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.info('ACTS_AACommand_finish_01_1400 : err : ' + JSON.stringify(err));
console.info('ACTS_AACommand_finish_01_1400 : data : ' + JSON.stringify(data));
globalThis.stdResult26 = data["stdResult"];
......@@ -237,21 +229,20 @@ export default class MainAbility extends Ability {
await sleep(2000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap ' +
'-s class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_1500 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
'-s class AACommandTest#ACTS_AACommand_finish_01_1500 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_1500 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_1500 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_1500 stdResult = ' + data.stdResult)
globalThis.stdResult27 = data.stdResult;
console.log('ACTS_AACommand_finish_01_1500 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_1500', this.context);
})
await sleep(4000)
cmd = 'aa dump -a'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.info('ACTS_AACommand_finish_01_1500 : err : ' + JSON.stringify(err));
console.info('ACTS_AACommand_finish_01_1500 : data : ' + JSON.stringify(data));
globalThis.stdResult28 = data["stdResult"];
......@@ -261,43 +252,41 @@ export default class MainAbility extends Ability {
await sleep(2000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap ' +
'-s class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_0300 -s unittest OpenHarmonyTestRunner'
'-s class AACommandTest#ACTS_AACommand_finish_01_0300 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_0300 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_0300 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_0300 stdResult = ' + data.stdResult)
console.log('ACTS_AACommand_finish_01_0300 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_0300', this.context);
})
await sleep(3000)
await sleep(2000)
cmd = 'aa dump -a'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.info('ACTS_AACommand_finish_01_0300 : err : ' + JSON.stringify(err));
console.info('ACTS_AACommand_finish_01_0300 : data : ' + JSON.stringify(data));
globalThis.stdResult30 = data["stdResult"];
console.info('ACTS_AACommand_finish_01_0300 end');
})
await sleep(2000)
await sleep(4000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap' +
' -s class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_1600 -s unittest OpenHarmonyTestRunner'
' -s class AACommandTest#ACTS_AACommand_finish_01_1600 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_1600 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_1600 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_1600 stdResult = ' + data.stdResult)
console.log('ACTS_AACommand_finish_01_1600 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_1600', this.context);
})
await sleep(3000)
await sleep(2000)
cmd = 'aa dump -a'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.info('ACTS_AACommand_finish_01_1600 : err : ' + JSON.stringify(err));
console.info('ACTS_AACommand_finish_01_1600 : data : ' + JSON.stringify(data));
globalThis.stdResult34 = data["stdResult"];
......@@ -306,7 +295,7 @@ export default class MainAbility extends Ability {
setTimeout(() => {
Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
}, 5000)
}, 6000)
}
onDestroy() {
......
......@@ -33,6 +33,12 @@
}
]
}
],
"requestPermissions": [
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
]
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册