diff --git a/ability/ability_runtime/aacommand/AACommandPrintSync/entry/src/main/ets/test/Ability.test.ets b/ability/ability_runtime/aacommand/AACommandPrintSync/entry/src/main/ets/test/Ability.test.ets index f5a78b31406e98858a8f8f70d326bd5e19759d63..ade57a953a47d5392303409d33e88c8454a77c86 100644 --- a/ability/ability_runtime/aacommand/AACommandPrintSync/entry/src/main/ets/test/Ability.test.ets +++ b/ability/ability_runtime/aacommand/AACommandPrintSync/entry/src/main/ets/test/Ability.test.ets @@ -32,7 +32,6 @@ export default function abilityTest() { var msg = '测试日志!@#$%^&*()_+QWE{}|?> " ) - await sleep(1000) var finishmsg = 'ACTS_AACommand_printSync_01_0100 end' globalThis.abilityDelegator.finishTest(finishmsg, 1).then((data)=>{ console.log("ACTS_AACommand_printSync_01_0100 finishTest test end ========> callback " ) @@ -63,7 +62,6 @@ export default function abilityTest() { '9aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaae' globalThis.abilityDelegator.printSync(msg); console.log("ACTS_AACommand_printSync_01_0200 printSync end ====> " ) - await sleep(1000) 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 " ) @@ -93,7 +91,6 @@ export default function abilityTest() { 'fffffffffff' globalThis.abilityDelegator.printSync(msg); console.log("ACTS_AACommand_printSync_01_0300 printSync end ====> " ) - await sleep(1000) 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 " ) @@ -111,7 +108,6 @@ export default function abilityTest() { it('ACTS_AACommand_printSync_01_0400', 0, async function (done) { globalThis.abilityDelegator.printSync(null); console.log("ACTS_AACommand_printSync_01_0300 printSync end ====> " ) - await sleep(1000) 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 " ) diff --git a/ability/ability_runtime/aacommand/AACommandRelyHap/entry/src/main/ets/test/Ability.test.ets b/ability/ability_runtime/aacommand/AACommandRelyHap/entry/src/main/ets/test/Ability.test.ets index 7b3dc3d2071e69e7ba2b20ed67ec85fd53ef8237..46b9bfff16ad7538d7f2775ddfaad5c44857896d 100644 --- a/ability/ability_runtime/aacommand/AACommandRelyHap/entry/src/main/ets/test/Ability.test.ets +++ b/ability/ability_runtime/aacommand/AACommandRelyHap/entry/src/main/ets/test/Ability.test.ets @@ -352,17 +352,12 @@ export default function abilityTest() { */ it('ACTS_AACommand_finish_01_0800', 0, async function (done) { var msg = '测试日志!@#$%^&*()_+QWE{}|?> { - console.log('ACTS_AACommand_finish_01_0800 code:'+JSON.stringify(code)) - if(code!=undefined){ - expect().assertFail(); - } - done(); - }, 3000) - var code = globalThis.abilityDelegator.finishTest(msg, 'ABCD',()=>{ + globalThis.abilityDelegator.finishTest(msg, 'ABCD',()=>{ console.log(" ACTS_AACommand_finish_01_0800 finishTest test end ========> callback " ) expect().assertFail(); }) + await sleep(2000); + done(); }) /** @@ -388,15 +383,9 @@ export default function abilityTest() { * @tc.desc: Verify that the process of the test framework can be stopped by calling this interface. */ it('ACTS_AACommand_finish_01_1000', 0, async function (done) { - var code = null - setTimeout(() => { - console.log('ACTS_AACommand_finish_01_1000 code:'+JSON.stringify(code)) - if(code!=undefined){ - expect().assertFail(); - } - done(); - }, 3000) - code = globalThis.abilityDelegator.finishTest(null, 1) + globalThis.abilityDelegator.finishTest(null, 1) + await sleep(2000); + done() }) /** @@ -406,15 +395,9 @@ export default function abilityTest() { * @tc.desc: Verify that the process of the test framework can be stopped by calling this interface. */ it('ACTS_AACommand_finish_01_1100', 0, async function (done) { - var code=null - setTimeout(() => { - console.log('ACTS_AACommand_finish_01_1100 code:'+JSON.stringify(code)) - if(code!=undefined){ - expect().assertFail(); - } - done(); - }, 3000) - code = globalThis.abilityDelegator.finishTest(undefined, 1) + globalThis.abilityDelegator.finishTest(undefined, 1) + await sleep(2000); + done() }) /** diff --git a/ability/ability_runtime/aacommand/AACommandtest/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/aacommand/AACommandtest/entry/src/main/ets/MainAbility/MainAbility.ts index a08ae41d25c439f5c695ae759dbfb30c25cf36a2..31dfb90f624a077dc289f59fe3915dcc19cd8e50 100644 --- a/ability/ability_runtime/aacommand/AACommandtest/entry/src/main/ets/MainAbility/MainAbility.ts +++ b/ability/ability_runtime/aacommand/AACommandtest/entry/src/main/ets/MainAbility/MainAbility.ts @@ -163,28 +163,6 @@ 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_1200 -s unittest OpenHarmonyTestRunner' - abilityDelegator.executeShellCommand(cmd, (err, data) => { - console.log('ACTS_AACommand_finish_01_1200 - executeShellCommand: start ') - console.log('ACTS_AACommand_finish_01_1200 start err: ' + JSON.stringify(err)) - console.log('ACTS_AACommand_finish_01_1200 stdResult = ' + data.stdResult) - globalThis.stdResult21 = data.stdResult; - console.log('ACTS_AACommand_finish_01_1200 - executeShellCommand: end') - }) - - await sleep(4000) - - cmd = 'aa dump -a' - abilityDelegator.executeShellCommand(cmd, (err, data) => { - console.info('ACTS_AACommand_finish_01_1200 : err : ' + JSON.stringify(err)); - console.info('ACTS_AACommand_finish_01_1200 : data : ' + JSON.stringify(data)); - globalThis.stdResult22 = data["stdResult"]; - console.info('ACTS_AACommand_finish_01_1200 end'); - }) - - 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' abilityDelegator.executeShellCommand(cmd, (err, data) => { @@ -251,27 +229,6 @@ 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_0200 -s unittest OpenHarmonyTestRunner' - abilityDelegator.executeShellCommand(cmd, (err, data) => { - console.log('ACTS_AACommand_finish_01_0200 - executeShellCommand: start ') - console.log('ACTS_AACommand_finish_01_0200 start err: ' + JSON.stringify(err)) - console.log('ACTS_AACommand_finish_01_0200 stdResult = ' + data.stdResult) - console.log('ACTS_AACommand_finish_01_0200 - executeShellCommand: end') - }) - - await sleep(4000) - - cmd = 'aa dump -a' - abilityDelegator.executeShellCommand(cmd, (err, data) => { - console.info('ACTS_AACommand_finish_01_0200 : err : ' + JSON.stringify(err)); - console.info('ACTS_AACommand_finish_01_0200 : data : ' + JSON.stringify(data)); - globalThis.stdResult29 = data["stdResult"]; - console.info('ACTS_AACommand_finish_01_0200 end'); - }) - - 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' abilityDelegator.executeShellCommand(cmd, (err, data) => { @@ -293,69 +250,6 @@ 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_0800 -s unittest OpenHarmonyTestRunner' - abilityDelegator.executeShellCommand(cmd, (err, data) => { - console.log('ACTS_AACommand_finish_01_0800 - executeShellCommand: start ') - console.log('ACTS_AACommand_finish_01_0800 start err: ' + JSON.stringify(err)) - console.log('ACTS_AACommand_finish_01_0800 stdResult = ' + data.stdResult) - console.log('ACTS_AACommand_finish_01_0800 - executeShellCommand: end') - }) - - await sleep(3000) - - cmd = 'aa dump -a' - abilityDelegator.executeShellCommand(cmd, (err, data) => { - console.info('ACTS_AACommand_finish_01_0800 : err : ' + JSON.stringify(err)); - console.info('ACTS_AACommand_finish_01_0800 : data : ' + JSON.stringify(data)); - globalThis.stdResult31 = data["stdResult"]; - console.info('ACTS_AACommand_finish_01_0800 end'); - }) - - await sleep(2000) - - cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s ' + - 'class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_1000 -s unittest OpenHarmonyTestRunner' - abilityDelegator.executeShellCommand(cmd, (err, data) => { - console.log('ACTS_AACommand_finish_01_1000 - executeShellCommand: start ') - console.log('ACTS_AACommand_finish_01_1000 start err: ' + JSON.stringify(err)) - console.log('ACTS_AACommand_finish_01_1000 stdResult = ' + data.stdResult) - console.log('ACTS_AACommand_finish_01_1000 - executeShellCommand: end') - }) - - await sleep(3000) - - cmd = 'aa dump -a' - abilityDelegator.executeShellCommand(cmd, (err, data) => { - console.info('ACTS_AACommand_finish_01_1000 : err : ' + JSON.stringify(err)); - console.info('ACTS_AACommand_finish_01_1000 : data : ' + JSON.stringify(data)); - globalThis.stdResult32 = data["stdResult"]; - console.info('ACTS_AACommand_finish_01_1000 end'); - }) - - await sleep(2000) - - cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap ' + - '-s class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_1100 -s unittest OpenHarmonyTestRunner' - abilityDelegator.executeShellCommand(cmd, (err, data) => { - console.log('ACTS_AACommand_finish_01_1100 - executeShellCommand: start ') - console.log('ACTS_AACommand_finish_01_1100 start err: ' + JSON.stringify(err)) - console.log('ACTS_AACommand_finish_01_1100 stdResult = ' + data.stdResult) - console.log('ACTS_AACommand_finish_01_1100 - executeShellCommand: end') - }) - - await sleep(3000) - - cmd = 'aa dump -a' - abilityDelegator.executeShellCommand(cmd, (err, data) => { - console.info('ACTS_AACommand_finish_01_1100 : err : ' + JSON.stringify(err)); - console.info('ACTS_AACommand_finish_01_1100 : data : ' + JSON.stringify(data)); - globalThis.stdResult33 = data["stdResult"]; - console.info('ACTS_AACommand_finish_01_1100 end'); - }) - - await sleep(2000) - cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap' + ' -s class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_1600 -s unittest OpenHarmonyTestRunner' abilityDelegator.executeShellCommand(cmd, (err, data) => { diff --git a/ability/ability_runtime/aacommand/AACommandtest/entry/src/main/ets/test/Ability.test.ets b/ability/ability_runtime/aacommand/AACommandtest/entry/src/main/ets/test/Ability.test.ets index 558191899eb4f11d519fe7fa948aaacef978f9a2..03f09769d3c6d166dfefb7a864a0fb7c560a3bb4 100644 --- a/ability/ability_runtime/aacommand/AACommandtest/entry/src/main/ets/test/Ability.test.ets +++ b/ability/ability_runtime/aacommand/AACommandtest/entry/src/main/ets/test/Ability.test.ets @@ -293,24 +293,6 @@ export default function abilityTest() { done() }) - /** - * @tc.number: ACTS_AACommand_finishTest_1200 - * @tc.name: The parameters of the test command are valid, and the finishTest interface is called in Promise - * mode. The msg parameter is valid(including Chinese and special characters) and the code parameter - * is valid (Number.MAX_VALUE) - * @tc.desc: Verify that the process of the test framework can be stopped by calling this interface. - */ - it('ACTS_AACommand_finishTest_1200', 0, async function (done) { - console.log("ACTS_AACommand_finishTest_1200 --- start") - let - finishmsg = '测试日志!@#$%^&*()_+QWE{}|?>= 0).assertTrue() - done() - }) - /** * @tc.number: ACTS_AACommand_finishTest_0300 * @tc.name: The parameters of the test command are valid, and the finishTest interface is called in @@ -387,43 +356,6 @@ export default function abilityTest() { done() }) - /** - * @tc.number: ACTS_AACommand_finishTest_0800 - * @tc.name: The parameters of the test command are valid, and the finishTest interface is called in - * AsyncCallback - * mode. The msg parameter is invalid(including Chinese and special characters) and the - * code parameter is valid (“ABCD”) - * @tc.desc: Verify that the process of the test framework is not stopped by calling this interface. - */ - it('ACTS_AACommand_finishTest_0800', 0, async function (done) { - console.log("ACTS_AACommand_finishTest_0800 --- start") - expect(globalThis.stdResult31.indexOf("com.example.aacommandrelyhap") >= 0).assertTrue() - done() - }) - - /** - * @tc.number: ACTS_AACommand_finishTest_1000 - * @tc.name: The parameters of the test command are valid, and the finishTest interface is called in Promise - * mode. The msg parameter is invalid(null) and the code parameter is valid (1) - * @tc.desc: Verify that the process of the test framework can be stopped by calling this interface. - */ - it('ACTS_AACommand_finishTest_1000', 0, async function (done) { - console.log("ACTS_AACommand_finishTest_1000 --- start") - expect(globalThis.stdResult32.indexOf("com.example.aacommandrelyhap") >= 0).assertTrue() - done() - }) - - /** - * @tc.number: ACTS_AACommand_finishTest_1100 - * @tc.name: The parameters of the test command are valid, and the finishTest interface is called in Promise - * mode. The msg parameter is invalid(undefined) and the code parameter is valid (1) - * @tc.desc: Verify that the process of the test framework can be stopped by calling this interface. - */ - it('ACTS_AACommand_finishTest_1100', 0, async function (done) { - console.log("ACTS_AACommand_finishTest_1100 --- start") - expect(globalThis.stdResult33.indexOf("com.example.aacommandrelyhap") >= 0).assertTrue() - done() - }) /** * @tc.number: ACTS_AACommand_finishTest_1600 * @tc.name: The parameters of the test command are valid, and the finishTest interface is called in diff --git a/ability/ability_runtime/apicover/apicoverhaptest/signature/openharmony_sx.p7b b/ability/ability_runtime/apicover/apicoverhaptest/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..6c7c8e29e3c4a1f8d0419932ebc28f665e4ae974 100644 Binary files a/ability/ability_runtime/apicover/apicoverhaptest/signature/openharmony_sx.p7b and b/ability/ability_runtime/apicover/apicoverhaptest/signature/openharmony_sx.p7b differ