From 61870610cd520d86e3822d0f3cb9913f147af270 Mon Sep 17 00:00:00 2001 From: chengxingzhen Date: Mon, 17 Apr 2023 17:03:26 +0800 Subject: [PATCH] =?UTF-8?q?xts-ams=E6=94=AF=E6=8C=81release=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E8=B0=83=E8=AF=95=E8=B0=83=E4=BC=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chengxingzhen --- ability/ability_runtime/stage/BUILD.gn | 1 + .../stage/actsdebuggabletest/BUILD.gn | 24 + .../actsdebuggabletest/AppScope/app.json | 19 + .../resources/base/element/string.json | 8 + .../resources/base/media/app_icon.png | Bin 0 -> 6790 bytes .../actsdebuggabletest/BUILD.gn | 43 ++ .../actsdebuggabletest/Test.json | 33 + .../ets/TestRunner/OpenHarmonyTestRunner.ts | 86 +++ .../src/main/ets/entryability/EntryAbility.ts | 66 ++ .../entry/src/main/ets/pages/Index.ets | 35 + .../test/ActsDebuggableAaProcessTest.test.ets | 664 ++++++++++++++++++ .../test/ActsDebuggableAaStartTest.test.ets | 300 ++++++++ .../entry/src/main/ets/test/List.test.ets | 22 + .../src/main/ets/testability/TestAbility.ets | 72 ++ .../src/main/ets/testability/pages/Index.ets | 50 ++ .../entry/src/main/module.json | 47 ++ .../main/resources/base/element/color.json | 8 + .../main/resources/base/element/string.json | 24 + .../src/main/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../resources/base/profile/main_pages.json | 5 + .../main/resources/en_US/element/string.json | 24 + .../main/resources/zh_CN/element/string.json | 24 + .../signature/openharmony_sx.p7b | Bin 0 -> 3424 bytes .../timeout/AppScope/app.json | 19 + .../resources/base/element/string.json | 8 + .../resources/base/media/app_icon.png | Bin 0 -> 6790 bytes .../stage/actsdebuggabletest/timeout/BUILD.gn | 46 ++ .../src/main/ets/entryability/EntryAbility.ts | 66 ++ .../entry/src/main/ets/pages/Index.ets | 32 + .../timeout/entry/src/main/module.json | 37 + .../main/resources/base/element/color.json | 8 + .../main/resources/base/element/string.json | 16 + .../src/main/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../resources/base/profile/main_pages.json | 5 + .../main/resources/en_US/element/string.json | 16 + .../main/resources/zh_CN/element/string.json | 16 + .../timeout/signature/openharmony_sx.p7b | Bin 0 -> 3420 bytes 37 files changed, 1824 insertions(+) create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/BUILD.gn create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/AppScope/app.json create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/AppScope/resources/base/element/string.json create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/AppScope/resources/base/media/app_icon.png create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/BUILD.gn create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/Test.json create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/entryability/EntryAbility.ts create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/pages/Index.ets create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/test/ActsDebuggableAaProcessTest.test.ets create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/test/ActsDebuggableAaStartTest.test.ets create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/test/List.test.ets create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/testability/TestAbility.ets create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/testability/pages/Index.ets create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/module.json create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/resources/base/element/color.json create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/resources/base/element/string.json create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/resources/base/media/icon.png create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/resources/base/profile/main_pages.json create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/resources/en_US/element/string.json create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/resources/zh_CN/element/string.json create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/signature/openharmony_sx.p7b create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/timeout/AppScope/app.json create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/timeout/AppScope/resources/base/element/string.json create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/timeout/AppScope/resources/base/media/app_icon.png create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/timeout/BUILD.gn create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/timeout/entry/src/main/ets/entryability/EntryAbility.ts create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/timeout/entry/src/main/ets/pages/Index.ets create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/timeout/entry/src/main/module.json create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/timeout/entry/src/main/resources/base/element/color.json create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/timeout/entry/src/main/resources/base/element/string.json create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/timeout/entry/src/main/resources/base/media/icon.png create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/timeout/entry/src/main/resources/base/profile/main_pages.json create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/timeout/entry/src/main/resources/en_US/element/string.json create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/timeout/entry/src/main/resources/zh_CN/element/string.json create mode 100644 ability/ability_runtime/stage/actsdebuggabletest/timeout/signature/openharmony_sx.p7b diff --git a/ability/ability_runtime/stage/BUILD.gn b/ability/ability_runtime/stage/BUILD.gn index 6e32bc095..269205519 100644 --- a/ability/ability_runtime/stage/BUILD.gn +++ b/ability/ability_runtime/stage/BUILD.gn @@ -17,6 +17,7 @@ group("stage") { testonly = true if (is_standard_system) { deps = [ + "actsdebuggabletest:actsdebuggabletest", "actslifecyclemultihap2:ActsLifecycleMultiHap2", "actslifecyclemultihap3:ActsLifecycleMultiHap3", "actslifecyclemultihaptest:ActsLifecycleMultiHapTest", diff --git a/ability/ability_runtime/stage/actsdebuggabletest/BUILD.gn b/ability/ability_runtime/stage/actsdebuggabletest/BUILD.gn new file mode 100644 index 000000000..acc3585d2 --- /dev/null +++ b/ability/ability_runtime/stage/actsdebuggabletest/BUILD.gn @@ -0,0 +1,24 @@ +# Copyright (c) 2021 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("//test/xts/tools/build/suite.gni") + +group("actsdebuggabletest") { + testonly = true + if (is_standard_system) { + deps = [ + "actsdebuggabletest:ActsDebuggableTest", + "timeout:ActsDebuggableTimeout", + ] + } +} diff --git a/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/AppScope/app.json b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/AppScope/app.json new file mode 100644 index 000000000..adb4358fc --- /dev/null +++ b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/AppScope/app.json @@ -0,0 +1,19 @@ +{ + "app": { + "bundleName": "com.example.debuggable", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:app_icon", + "label": "$string:app_name", + "distributedNotificationEnabled": true, + "keepAlive": true, + "singleUser": true, + "minAPIVersion": 9, + "targetAPIVersion": 9, + "car": { + "apiCompatibleVersion": 9, + "singleUser": false + } + } +} diff --git a/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/AppScope/resources/base/element/string.json b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/AppScope/resources/base/element/string.json new file mode 100644 index 000000000..f7ce431a9 --- /dev/null +++ b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "Debuggable" + } + ] +} diff --git a/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/AppScope/resources/base/media/app_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|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A}?J{a+ah*@31WTs#&J#o1`H98#6IQf;Wv0N_!);f&9g7o-k(lW5rWnDUR zQBFIRG+X=6NnsI@mxnwm;tf5;_Uxg?jZ8m-m0}&6+DA!qam(p$mN5R})yA_7m$q@| zFEd|dpS595rxQr-n#GjI5i-AhnUE>Cr;jpCqSrD~EwK_DqI^7%3#p5)%T_od!t3SOmH9MyXeeGO2(UQL;ax|x?Ncixmeo1=$ z{-);Au{*tfzOG?KQ~K|ak8-HQ?`Pekhe2WM(8s{xv-p>Zmu_6{G!-oE$7$mY`MOJorI=+mMx?H;`pr!;fVYz?5~yXBACruWB`Ph zZM}90_<^OBxIhyZ9BW$`>6JvO;%VFpqVr8|7t3~AmxYak6?`Pp#c;**_SYmi`&z23 z`p6_~ePvH)C6x-G9$hgL=eVALq`-AiamN>!3~Lxw&{H(b{B(7xSRm6<3<{%{yXiH# zos5Rv1L+8fUKJLo%P>4I&$}y { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); + hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); + hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); + }) + hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); + } +} \ No newline at end of file diff --git a/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/entryability/EntryAbility.ts b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/entryability/EntryAbility.ts new file mode 100644 index 000000000..3db7faf65 --- /dev/null +++ b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/entryability/EntryAbility.ts @@ -0,0 +1,66 @@ +/* + * 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 hilog from '@ohos.hilog'; +import Ability from '@ohos.app.ability.UIAbility'; +import Window from '@ohos.window'; + +export default class EntryAbility extends Ability { + onCreate(want, launchParam) { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); + hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? ''); + hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:' + JSON.stringify(launchParam) ?? ''); + } + + onDestroy() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: Window.WindowStage) { + // Main window is created, set main page for this ability + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/Index', (err, data) => { + if (err.code) { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.ERROR); + hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + return; + } + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? ''); + }); + } + + onWindowStageDestroy() { + // Main window is destroyed, release UI related resources + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground() { + // Ability has brought to foreground + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground() { + // Ability has back to background + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); + } +} diff --git a/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/pages/Index.ets b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/pages/Index.ets new file mode 100644 index 000000000..7db1fa619 --- /dev/null +++ b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/pages/Index.ets @@ -0,0 +1,35 @@ +/* + * 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 AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' + +@Entry +@Component +struct Index { + @State message: string = 'Hello World'; + + build() { + Row() { + Column() { + Text(this.message) + .fontSize(50) + .fontWeight(FontWeight.Bold) + + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/test/ActsDebuggableAaProcessTest.test.ets b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/test/ActsDebuggableAaProcessTest.test.ets new file mode 100644 index 000000000..edb29b229 --- /dev/null +++ b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/test/ActsDebuggableAaProcessTest.test.ets @@ -0,0 +1,664 @@ +/* + * 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 hilog from '@ohos.hilog'; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; +import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; +import backgroundTaskManager from '@ohos.resourceschedule.backgroundTaskManager'; + +let abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator(); + +async function requestSuspendDelay() { + hilog.info(0x0000, 'debuggabletest', '%{public}s', 'requestSuspendDelay start '); + let myReason = 'test ActsDebuggableAaProcessTest'; + let delayInfo = backgroundTaskManager.requestSuspendDelay(myReason, () => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', 'requestSuspendDelay delay will timeout. '); + }); + globalThis.delayId = delayInfo.requestId; + hilog.info(0x0000, 'debuggabletest', '%{public}s', 'requestSuspendDelay delayId is ' + globalThis.delayId); + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'requestSuspendDelay actualDelayTime is ' + delayInfo.actualDelayTime); +} + +function sleep(time) { + return new Promise((resolve, reject) => { + setTimeout(() => { + resolve(null); + }, time) + }); +} + +export default function actsDebuggableAaProcessTest() { + + describe('ActsDebuggableAaProcessTest', function () { + beforeAll(async function () { + await abilityDelegator.executeShellCommand('aa start -b com.example.timeout -a EntryAbility').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', 'beforeAll aa start data is: ' + data.stdResult); + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', 'beforeAll err is: ' + JSON.stringify(err)); + }); + await sleep(2000); + await requestSuspendDelay(); + }) + + beforeEach(async function () { + await abilityDelegator.executeShellCommand('hilog -r').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'beforeEach ActsDebuggableAaProcessTest hilog -r data is: ' + JSON.stringify(data)); + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'beforeEach ActsDebuggableAaProcessTest hilog -r err is: ' + JSON.stringify(err)); + }); + await sleep(2000); + }) + + afterEach(function () { + }) + + afterAll(async function () { + await abilityDelegator.executeShellCommand('aa force-stop com.example.timeout').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'afterAll force-stop data is: ' + JSON.stringify(data)); + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'afterAll force-stop err is: ' + JSON.stringify(err)); + }); + await sleep(1000); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_0800 + * @tc.name aa process -b com.example.timeout -a EntryAbility -m entry -p 'sleep 100' -S + * @tc.desc Function test + * @tc.level 1 + */ + it('SUB_AA_AMS_Debuggable_0800', 1, async function (done) { + await abilityDelegator.executeShellCommand( + 'aa process -b com.example.timeout -a EntryAbility -m entry -p \'sleep 100\' -S').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0800 data is: ' + JSON.stringify(data)); + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0800 err is: ' + JSON.stringify(err)); + }); + await sleep(500); + + let res = undefined + await abilityDelegator.executeShellCommand('hilog -x | grep debuggablePipe').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', 'SUB_AA_AMS_Debuggable_0800 data is: ' + data.stdResult); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0800 err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('debuggablePipe perfCmd:sleep 100'); + expect(res).assertContain('debuggablePipe sandbox: true'); + expect(res).assertContain('debuggablePipe abilityName:EntryAbility'); + expect(res).assertContain('debuggablePipe moduleName:entry'); + expect(res).assertContain('debuggablePipe bundleName:com.example.timeout'); + done(); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_0900 + * @tc.name aa process -b com.example.timeout -a EntryAbility -p 'sleep 100' -S + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_AMS_Debuggable_0900', 1, async function (done) { + await abilityDelegator.executeShellCommand( + 'aa process -b com.example.timeout -a EntryAbility -p \'sleep 100\' -S').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0900 data is: ' + JSON.stringify(data)); + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0900 err is: ' + JSON.stringify(err)); + }); + await sleep(500); + + let res = undefined + await abilityDelegator.executeShellCommand('hilog -x | grep debuggablePipe').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0900 data is: ' + data.stdResult); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0900 err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('debuggablePipe perfCmd:sleep 100'); + expect(res).assertContain('debuggablePipe sandbox: true'); + expect(res).assertContain('debuggablePipe abilityName:EntryAbility'); + expect(res).assertContain('debuggablePipe moduleName:'); + expect(res).assertContain('debuggablePipe bundleName:com.example.timeout'); + done(); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_1000 + * @tc.name aa process -b com.example.timeout -a EntryAbility -m entry -p 'sleep 100' + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_AMS_Debuggable_1000', 1, async function (done) { + await abilityDelegator.executeShellCommand( + 'aa process -b com.example.timeout -a EntryAbility -m entry -p \'sleep 100\'').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_1000 data is: ' + JSON.stringify(data)); + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_1000 err is: ' + JSON.stringify(err)); + }); + await sleep(500); + + let res = undefined; + await abilityDelegator.executeShellCommand('hilog -x | grep debuggablePipe').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', 'SUB_AA_AMS_Debuggable_1000 data is: ' + data.stdResult); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_1000 err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('debuggablePipe perfCmd:sleep 100'); + expect(res).assertContain('debuggablePipe abilityName:EntryAbility'); + expect(res).assertContain('debuggablePipe moduleName:entry'); + expect(res).assertContain('debuggablePipe bundleName:com.example.timeout'); + expect(res.indexOf('debuggablePipe sandbox: true') > 0).assertFalse(); + done() + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_1100 + * @tc.name aa process -b com.example.timeout -a EntryAbility -m entry -S + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_AMS_Debuggable_1100', 1, async function (done) { + let res = undefined; + await abilityDelegator.executeShellCommand('aa process -b com.example.timeout -a EntryAbility -m entry -S') + .then(data => { + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_1100 err is: ' + JSON.stringify(err)); + }) + expect(res).assertContain('usage: aa process '); + await sleep(500); + + await abilityDelegator.executeShellCommand('hilog -x | grep debuggablePipe').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_1100 SUB_AA_AMS_Debuggable_1100 hilog data is: ' + data.stdResult); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_1100 hilog err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain( + 'debuggablePipe aa process must contains -p or -D and param length must be less than 1024.'); + done(); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_1200 + * @tc.name aa process -b com.ohos.test -a EntryAbility -m entry -p 'sleep 100' -S + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_AMS_Debuggable_1200', 1, async function (done) { + let res = undefined; + await abilityDelegator.executeShellCommand( + 'aa process -b com.ohos.test -a EntryAbility -m entry -p \'sleep 100\' -S').then(data => { + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', 'SUB_AA_AMS_Debuggable_1200 err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('error: failed to start native process.'); + await sleep(500); + + await abilityDelegator.executeShellCommand('hilog -x | grep debuggablePipe').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', 'SUB_AA_AMS_Debuggable_1200 data is: ' + data.stdResult); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', 'SUB_AA_AMS_Debuggable_1200 err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('debuggablePipe abilityName:EntryAbility'); + expect(res).assertContain('debuggablePipe moduleName:entry'); + expect(res).assertContain('debuggablePipe bundleName:com.ohos.test'); + expect(res).assertContain('debuggablePipe fail to start native process'); + done(); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_1300 + * @tc.name aa process -b com.example.timeout -a test -m entry -p 'sleep 100' -S + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_AMS_Debuggable_1300', 1, async function (done) { + let res = undefined; + await abilityDelegator.executeShellCommand( + 'aa process -b com.example.timeout -a test -m entry -p \'sleep 100\' -S').then(data => { + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', 'SUB_AA_AMS_Debuggable_1300 err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('error: failed to start native process.'); + await sleep(500); + + await abilityDelegator.executeShellCommand('hilog -x | grep debuggablePipe').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', 'SUB_AA_AMS_Debuggable_1300 data is: ' + data.stdResult); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', 'SUB_AA_AMS_Debuggable_1300 err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('debuggablePipe abilityName:test'); + expect(res).assertContain('debuggablePipe moduleName:entry'); + expect(res).assertContain('debuggablePipe bundleName:com.example.timeout'); + expect(res).assertContain('debuggablePipe fail to start native process'); + done(); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_1400 + * @tc.name aa process -b com.example.timeout -a EntryAbility -m test -p 'sleep 100' -S + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_AMS_Debuggable_1400', 1, async function (done) { + let res = undefined; + await abilityDelegator.executeShellCommand( + 'aa process -b com.example.timeout -a EntryAbility -m test -p \'sleep 100\' -S').then(data => { + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', 'SUB_AA_AMS_Debuggable_1400 err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('error: failed to start native process.'); + await sleep(500); + + await abilityDelegator.executeShellCommand('hilog -x | grep debuggablePipe').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', 'SUB_AA_AMS_Debuggable_1400 data is: ' + data.stdResult); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', 'SUB_AA_AMS_Debuggable_1400 err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('debuggablePipe abilityName:EntryAbility'); + expect(res).assertContain('debuggablePipe moduleName:test'); + expect(res).assertContain('debuggablePipe bundleName:com.example.timeout'); + expect(res).assertContain('debuggablePipe fail to start native process'); + done(); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_1500 + * @tc.name aa process -b com.example.timeout -a EntryAbility -m entry -p 'value length large than 1024' -S + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_AMS_Debuggable_1500', 1, async function (done) { + let res = undefined; + let cmd = 'aa process -b com.example.timeout -a EntryAbility -m entry -p ' + + '\'qwertyuiopasdfghjklzxcvbnm123456qwert' + + 'yuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghj' + + 'klzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123' + + '456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuio' + + 'pasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzx' + + 'cvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456q' + + 'wertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasd' + + 'fghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbn' + + 'm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwert' + + 'yuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghj' + + 'klzxcvbnm123456\' -S'; + await abilityDelegator.executeShellCommand(cmd).then(data => { + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_1500 aa process err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('usage: aa process '); + await sleep(500); + + await abilityDelegator.executeShellCommand('hilog -x | grep debuggablePipe').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_1500 hilog data is: ' + data.stdResult); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_1500 hilog err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain( + 'debuggablePipe aa process must contains -p or -D and param length must be less than 1024.'); + done(); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_1600 + * @tc.name aa process -b com.example.timeout -a EntryAbility -m entry -p sleep 100 -S + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_AMS_Debuggable_1600', 1, async function (done) { + await abilityDelegator.executeShellCommand( + 'aa process -b com.example.timeout -a EntryAbility -m entry -p sleep 100 -S') + .then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_1600 aa process data is: ' + JSON.stringify(data)); + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_1600 aa process err is: ' + JSON.stringify(err)); + }); + await sleep(500); + + let res = undefined; + await abilityDelegator.executeShellCommand('hilog -x | grep debuggablePipe').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_1600 hilog data is: ' + data.stdResult); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_1600 hilog err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('debuggablePipe perfCmd:sleep'); + expect(res).assertContain('debuggablePipe sandbox: true'); + expect(res).assertContain('debuggablePipe abilityName:EntryAbility'); + expect(res).assertContain('debuggablePipe moduleName:entry'); + expect(res).assertContain('debuggablePipe bundleName:com.example.timeout'); + done(); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_1700 + * @tc.name aa process -b com.example.timeout -a EntryAbility -m entry -S -p + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_AMS_Debuggable_1700', 1, async function (done) { + let res = undefined; + await abilityDelegator.executeShellCommand('aa process -b com.example.timeout -a EntryAbility -m entry -S -p') + .then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_1700 aa process data is: ' + data.stdResult); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_1700 aa process err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('error: option requires a value.'); + expect(res).assertContain('usage: aa process '); + done(); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_1800 + * @tc.name aa process -b com.example.timeout -a EntryAbility -m entry -D 'sleep 100' + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_AMS_Debuggable_1800', 1, async function (done) { + await abilityDelegator.executeShellCommand( + 'aa process -b com.example.timeout -a EntryAbility -m entry -D \'sleep 100\'').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_1800 data is: ' + JSON.stringify(data)); + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_1800 err is: ' + JSON.stringify(err)); + }); + await sleep(500); + + let res = undefined; + await abilityDelegator.executeShellCommand('hilog -x | grep debuggablePipe').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', 'SUB_AA_AMS_Debuggable_1800 data is: ' + data.stdResult); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_1800 err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('debuggablePipe debugCmd:sleep 100'); + expect(res).assertContain('debuggablePipe abilityName:EntryAbility'); + expect(res).assertContain('debuggablePipe moduleName:entry'); + expect(res).assertContain('debuggablePipe bundleName:com.example.timeout'); + expect(res.indexOf('debuggablePipe sandbox: true') > 0).assertFalse(); + done(); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_1900 + * @tc.name aa process -b com.example.timeout -a EntryAbility -m entry -D 'sleep 100' -S + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_AMS_Debuggable_1900', 1, async function (done) { + await abilityDelegator.executeShellCommand( + 'aa process -b com.example.timeout -a EntryAbility -m entry -D \'sleep 100\' -S').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_1900 data is: ' + JSON.stringify(data)); + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_1900 err is: ' + JSON.stringify(err)); + }); + await sleep(500); + + let res = undefined + await abilityDelegator.executeShellCommand('hilog -x | grep debuggablePipe').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', 'SUB_AA_AMS_Debuggable_1900 data is: ' + data.stdResult); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_1900 err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('debuggablePipe debugCmd:sleep 100'); + expect(res).assertContain('debuggablePipe sandbox: true'); + expect(res).assertContain('debuggablePipe abilityName:EntryAbility'); + expect(res).assertContain('debuggablePipe moduleName:entry'); + expect(res).assertContain('debuggablePipe bundleName:com.example.timeout'); + done(); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_2000 + * @tc.name aa process -b com.example.timeout -a EntryAbility -m entry -D sleep 100 -S + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_AMS_Debuggable_2000', 1, async function (done) { + await abilityDelegator.executeShellCommand( + 'aa process -b com.example.timeout -a EntryAbility -m entry -D sleep 100 -S').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_2000 aa process data is: ' + JSON.stringify(data)); + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_2000 aa process err is: ' + JSON.stringify(err)); + }); + await sleep(500); + + let res = undefined; + await abilityDelegator.executeShellCommand('hilog -x | grep debuggablePipe').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_2000 hilog data is: ' + data.stdResult); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_2000 hilog err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('debuggablePipe debugCmd:sleep'); + expect(res).assertContain('debuggablePipe sandbox: true'); + expect(res).assertContain('debuggablePipe abilityName:EntryAbility'); + expect(res).assertContain('debuggablePipe moduleName:entry'); + expect(res).assertContain('debuggablePipe bundleName:com.example.timeout'); + expect(res.indexOf('debuggablePipe debugCmd:sleep 100') > 0).assertFalse(); + done(); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_2100 + * @tc.name aa process -b com.example.timeout -a EntryAbility -m entry -p 'sleep 100' -D 'sleep 100' -S + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_AMS_Debuggable_2100', 1, async function (done) { + await abilityDelegator.executeShellCommand( + 'aa process -b com.example.timeout -a EntryAbility -m entry -p \'sleep 100\' -D \'sleep 100\' -S') + .then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_2100 data is: ' + JSON.stringify(data)); + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_2100 err is: ' + JSON.stringify(err)); + }); + await sleep(500); + + let res = undefined + await abilityDelegator.executeShellCommand('hilog -x | grep debuggablePipe').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_2100 data is: ' + data.stdResult); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_2100 err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('debuggablePipe perfCmd:sleep 100'); + expect(res).assertContain('debuggablePipe sandbox: true'); + expect(res).assertContain('debuggablePipe abilityName:EntryAbility'); + expect(res).assertContain('debuggablePipe moduleName:entry'); + expect(res).assertContain('debuggablePipe bundleName:com.example.timeout'); + done(); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_2200 + * @tc.name aa process -b com.example.timeout -a EntryAbility -m entry -D 'sleep 100' -p 'sleep 100' -S + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_AMS_Debuggable_2200', 1, async function (done) { + await abilityDelegator.executeShellCommand( + 'aa process -b com.example.timeout -a EntryAbility -m entry -D \'sleep 100\' -p \'sleep 100\' -S') + .then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_2200 data is: ' + JSON.stringify(data)); + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_2200 err is: ' + JSON.stringify(err)); + }); + await sleep(500); + + let res = undefined + await abilityDelegator.executeShellCommand('hilog -x | grep debuggablePipe').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', 'SUB_AA_AMS_Debuggable_2200 data is: ' + data.stdResult); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_2200 err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('debuggablePipe perfCmd:sleep 100'); + expect(res).assertContain('debuggablePipe sandbox: true'); + expect(res).assertContain('debuggablePipe abilityName:EntryAbility'); + expect(res).assertContain('debuggablePipe moduleName:entry'); + expect(res).assertContain('debuggablePipe bundleName:com.example.timeout'); + done(); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_2300 + * @tc.name aa process -b com.example.timeout -a EntryAbility -m entry -D 'value length large than 1024' -S + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_AMS_Debuggable_2300',1, async function (done) { + let res = undefined; + let cmd = 'aa process -b com.example.timeout -a EntryAbility -m entry -D ' + + '\'qwertyuiopasdfghjklzxcvbnm123456qwert' + + 'yuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghj' + + 'klzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123' + + '456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuio' + + 'pasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzx' + + 'cvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456q' + + 'wertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasd' + + 'fghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbn' + + 'm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwert' + + 'yuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghj' + + 'klzxcvbnm123456\' -S'; + await abilityDelegator.executeShellCommand(cmd).then(data => { + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_2300 aa process err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('usage: aa process '); + await sleep(500); + + await abilityDelegator.executeShellCommand('hilog -x | grep debuggablePipe').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_2300 hilog data is: ' + data.stdResult); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_2300 hilog err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain( + 'debuggablePipe aa process must contains -p or -D and param length must be less than 1024.'); + done(); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_2400 + * @tc.name aa process -b com.example.timeout -a EntryAbility -m entry -S -D + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_AMS_Debuggable_2400',1, async function (done) { + let res = undefined; + await abilityDelegator.executeShellCommand('aa process -b com.example.timeout -a EntryAbility -m entry -S -D') + .then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_2400 aa process data is: ' + data.stdResult); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_2400 aa process err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('error: option requires a value.'); + expect(res).assertContain('usage: aa process '); + done(); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_2500 + * @tc.name aa process -h + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_AMS_Debuggable_2500',1, async function (done) { + let res = undefined; + await abilityDelegator.executeShellCommand('aa process -h').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_2500 aa process data is: ' + data.stdResult); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_2500 aa process err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('usage: aa process '); + expect(res).assertContain('-h, --help'); + expect(res).assertContain('list available commands'); + expect(res).assertContain('-a -b [-m ]'); + expect(res).assertContain('-p '); + expect(res).assertContain('performance optimization command. Either -p or -D must be selected, -p takes precedence.'); + expect(res).assertContain('debug command. Either -p or -D must be selected, -p takes precedence.'); + expect(res).assertContain('-D '); + expect(res).assertContain('[-S]'); + expect(res).assertContain('debug ability with an element name'); + done(); + }) + }) +} \ No newline at end of file diff --git a/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/test/ActsDebuggableAaStartTest.test.ets b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/test/ActsDebuggableAaStartTest.test.ets new file mode 100644 index 000000000..26db976fc --- /dev/null +++ b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/test/ActsDebuggableAaStartTest.test.ets @@ -0,0 +1,300 @@ +/* + * 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 hilog from '@ohos.hilog'; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; +import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; +import backgroundTaskManager from '@ohos.resourceschedule.backgroundTaskManager'; + +let abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator(); + +async function cancelSuspendDelay() { + hilog.info(0x0000, 'debuggabletest', '%{public}s', 'cancelSuspendDelay delayId ' + globalThis.delayId); + backgroundTaskManager.cancelSuspendDelay(globalThis.delayId); +} + +function sleep(time) { + return new Promise((resolve, reject) => { + setTimeout(() => { + resolve(null); + }, time) + }); +} + +export default function actsDebuggableAaStartTest() { + describe('ActsDebuggableAaStartTest', function () { + beforeAll(async function () { + }) + + beforeEach(async function () { + await abilityDelegator.executeShellCommand('aa force-stop com.example.timeout').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'beforeEach ActsDebuggableAaStartTest force-stop data is: ' + JSON.stringify(data)); + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'beforeEach ActsDebuggableAaStartTest force-stop err is: ' + JSON.stringify(err)); + }); + await sleep(1000); + await abilityDelegator.executeShellCommand('hilog -r').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'beforeEach ActsDebuggableAaStartTest hilog -r data is: ' + JSON.stringify(data)); + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'beforeEach ActsDebuggableAaStartTest hilog -r err is: ' + JSON.stringify(err)); + }); + await sleep(2000); + }) + afterEach(function () { + }) + afterAll(async function () { + await cancelSuspendDelay(); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_0100 + * @tc.name aa start -b com.example.timeout -a EntryAbility -p 'sleep 100' -S + * @tc.desc Function test + * @tc.level 1 + */ + it('SUB_AA_AMS_Debuggable_0100',1, async function (done) { + await abilityDelegator.executeShellCommand( + 'aa start -b com.example.timeout -a EntryAbility -p \'sleep 100\' -S').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0100 data is: ' + JSON.stringify(data)); + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0100 err is: ' + JSON.stringify(err)); + }); + await sleep(800); + + let res = undefined; + await abilityDelegator.executeShellCommand('hilog -x | grep debuggablePipe').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0100 hilog data is: ' + data.stdResult); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0100 hilog err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('debuggablePipe perfCmd:sleep 100'); + expect(res).assertContain('debuggablePipe sandbox: true'); + done(); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_0200 + * @tc.name aa start -b com.example.timeout -a EntryAbility -p 'sleep 100' + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_AMS_Debuggable_0200',1, async function (done) { + await abilityDelegator.executeShellCommand('aa start -b com.example.timeout -a EntryAbility -p \'sleep 100\'') + .then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0200 data is: ' + JSON.stringify(data)); + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0200 err is: ' + JSON.stringify(err)); + }); + await sleep(800); + + let res = undefined; + await abilityDelegator.executeShellCommand('hilog -x | grep debuggablePipe').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0200 hilog data is: ' + data.stdResult); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0200 hilog err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('debuggablePipe perfCmd:sleep 100'); + expect(res.indexOf('debuggablePipe sandbox: true') > 0).assertFalse(); + done(); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_0300 + * @tc.name aa start -b com.example.timeout -a EntryAbility + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_AMS_Debuggable_0300',1, async function (done) { + let res = undefined; + await abilityDelegator.executeShellCommand('aa start -b com.example.timeout -a EntryAbility').then(data => { + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0300 err is: ' + JSON.stringify(err)); + }) + expect(res).assertContain('start ability successfully.'); + done(); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_0400 + * @tc.name aa start -b com.example.timeout -a EntryAbility -S -p + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_AMS_Debuggable_0400',1, async function (done) { + let res = undefined; + await abilityDelegator.executeShellCommand('aa start -b com.example.timeout -a EntryAbility -S -p') + .then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0400 data is: ' + JSON.stringify(data)); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0400 err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('error: option requires a value.'); + expect(res).assertContain('usage: aa start '); + done(); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_0500 + * @tc.name aa start -b com.example.timeout -a EntryAbility -S + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_AMS_Debuggable_0500',1, async function (done) { + let res = undefined; + await abilityDelegator.executeShellCommand('aa start -b com.example.timeout -a EntryAbility -S').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0500 data is: ' + JSON.stringify(data)); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0500 err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('start ability successfully.'); + await sleep(800); + + await abilityDelegator.executeShellCommand('hilog -x | grep debuggablePipe').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0500 hilog data is: ' + data.stdResult); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0500 hilog err is: ' + JSON.stringify(err)); + }); + + expect(res.indexOf('debuggablePipe perfCmd') > 0).assertFalse(); + expect(res.indexOf('debuggablePipe sandbox') > 0).assertFalse(); + done(); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_0600 + * @tc.name aa start -b com.example.timeout -a EntryAbility -p sleep 100 -S + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_AMS_Debuggable_0600',1, async function (done) { + let res = undefined; + await abilityDelegator.executeShellCommand('aa start -b com.example.timeout -a EntryAbility -p sleep 100 -S') + .then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0600 data is: ' + JSON.stringify(data)); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0600 err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('start ability successfully.'); + await sleep(800); + + await abilityDelegator.executeShellCommand('hilog -x | grep debuggablePipe').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0600 hilog data is: ' + data.stdResult); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0600 hilog err is: ' + JSON.stringify(err)); + }); + + expect(res).assertContain('debuggablePipe perfCmd:sleep'); + expect(res).assertContain('debuggablePipe sandbox: true'); + expect(res.indexOf('debuggablePipe perfCmd:sleep 100') > 0).assertFalse(); + done(); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_0700 + * @tc.name aa start -b com.example.timeout -a EntryAbility -p 'value length large than 1024' -S + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_AMS_Debuggable_0700',1, async function (done) { + let res = undefined; + await abilityDelegator.executeShellCommand('aa start -b com.example.timeout -a EntryAbility -p \'qwertyuiopas' + + 'dfghjklzxcvbnm123456qwert' + + 'yuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghj' + + 'klzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123' + + '456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuio' + + 'pasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzx' + + 'cvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456q' + + 'wertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasd' + + 'fghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbn' + + 'm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwert' + + 'yuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghjklzxcvbnm123456qwertyuiopasdfghj' + + 'klzxcvbnm123456\' -S').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0700 data is: ' + JSON.stringify(data)); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0700 err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('usage: aa start '); + await sleep(800); + + await abilityDelegator.executeShellCommand('hilog -x | grep debuggablePipe').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0700 hilog data is: ' + data.stdResult); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_0700 hilog err is: ' + JSON.stringify(err)); + }); + + expect(res).assertContain('debuggablePipe aa start -p param length must be less than 1024.'); + done(); + }) + + /* + * @tc.number SUB_AA_AMS_Debuggable_2600 + * @tc.name aa start -h + * @tc.desc Function test + * @tc.level 3 + */ + it('SUB_AA_AMS_Debuggable_2600',1, async function (done) { + let res = undefined; + await abilityDelegator.executeShellCommand('aa start -h').then(data => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_2600 aa process data is: ' + data.stdResult); + res = data.stdResult; + }).catch(err => { + hilog.info(0x0000, 'debuggabletest', '%{public}s', + 'SUB_AA_AMS_Debuggable_2600 aa process err is: ' + JSON.stringify(err)); + }); + expect(res).assertContain('usage: aa start '); + expect(res).assertContain('[-p ]'); + expect(res).assertContain('[-S]'); + done(); + }) + }) +} \ No newline at end of file diff --git a/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/test/List.test.ets b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/test/List.test.ets new file mode 100644 index 000000000..25eec8eea --- /dev/null +++ b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/test/List.test.ets @@ -0,0 +1,22 @@ +/* + * 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 aastartTest from './ActsDebuggableAaStartTest.test'; +import aaprocessTest from './ActsDebuggableAaProcessTest.test'; + +export default function testsuite() { + aaprocessTest(); + aastartTest(); +} \ No newline at end of file diff --git a/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/testability/TestAbility.ets b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/testability/TestAbility.ets new file mode 100644 index 000000000..c2b960ff3 --- /dev/null +++ b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/testability/TestAbility.ets @@ -0,0 +1,72 @@ +/* + * 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 hilog from '@ohos.hilog'; +import Ability from '@ohos.app.ability.UIAbility'; +import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; +import { Hypium } from '@ohos/hypium'; +import testsuite from '../test/List.test'; +import Window from '@ohos.window'; + +export default class TestAbility extends Ability { + onCreate(want, launchParam) { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onCreate'); + hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? ''); + hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:'+ JSON.stringify(launchParam) ?? ''); + var abilityDelegator: any + abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() + var abilityDelegatorArguments: any + abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); + Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) + } + + onDestroy() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); + } + + onWindowStageCreate(windowStage: Window.WindowStage) { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); + windowStage.loadContent('testability/pages/Index', (err, data) => { + if (err.code) { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.ERROR); + hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + return; + } + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', + JSON.stringify(data) ?? ''); + }); + } + + onWindowStageDestroy() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageDestroy'); + } + + onForeground() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onForeground'); + } + + onBackground() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onBackground'); + } +} \ No newline at end of file diff --git a/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/testability/pages/Index.ets b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/testability/pages/Index.ets new file mode 100644 index 000000000..90d1baade --- /dev/null +++ b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/ets/testability/pages/Index.ets @@ -0,0 +1,50 @@ +/* + * 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 hilog from '@ohos.hilog'; + +@Entry +@Component +struct Index { + aboutToAppear() { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); + } + @State message: string = 'Hello Debuggable' + build() { + Row() { + Column() { + Text(this.message) + .fontSize(50) + .fontWeight(FontWeight.Bold) + Button() { + Text('next page') + .fontSize(20) + .fontWeight(FontWeight.Bold) + }.type(ButtonType.Capsule) + .margin({ + top: 20 + }) + .backgroundColor('#0D9FFB') + .width('35%') + .height('5%') + .onClick(()=>{ + }) + } + .width('100%') + } + .height('100%') + } + } \ No newline at end of file diff --git a/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/module.json b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/module.json new file mode 100644 index 000000000..7b7b47f86 --- /dev/null +++ b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/module.json @@ -0,0 +1,47 @@ +{ + "module": { + "name": "entry", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [ + "default", + "tablet" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "EntryAbility", + "srcEntrance": "./ets/entryability/EntryAbility.ts", + "description": "$string:EntryAbility_desc", + "icon": "$media:icon", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:icon", + "startWindowBackground": "$color:start_window_background", + "visible": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ] + }, + { + "name": "TestAbility", + "srcEntrance": "./ets/testability/TestAbility.ets", + "description": "$string:TestAbility_desc", + "icon": "$media:icon", + "label": "$string:TestAbility_label", + "visible": true, + "startWindowIcon": "$media:icon", + "startWindowBackground": "$color:start_window_background" + } + ] + } +} \ No newline at end of file diff --git a/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/resources/base/element/color.json b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/resources/base/element/color.json new file mode 100644 index 000000000..3c712962d --- /dev/null +++ b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/resources/base/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + } + ] +} \ No newline at end of file diff --git a/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/resources/base/element/string.json new file mode 100644 index 000000000..d656140d5 --- /dev/null +++ b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/resources/base/element/string.json @@ -0,0 +1,24 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + }, + { + "name": "TestAbility_desc", + "value": "the test ability" + }, + { + "name": "TestAbility_label", + "value": "test label" + } + ] +} \ No newline at end of file diff --git a/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/stage/actsdebuggabletest/actsdebuggabletest/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuCD;w45K0@eqauiqWf7l&o)+YLHm~|L~ z7$0v5mkobriU!H<@mVJHLlmQqzQ3d6Rh_-|%Yy2li*tHO>_vcnuZ7OR_xkAIuIU&x z-|8Y0wj|6|a6_I(v91y%k_kNw6pnkNdxjqG8!%Vz_d%c_!X+6-;1`GC9_FpjoHev5f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1cx=XAv*&zcG$oey}=M(5-X!@h_;NP6)>YjYGq~0y1!)4(DS+&=S;LW-kyav_U4S;6I$VEFdI}>0w7JkMmxJgWrMxihocqERr6~@NvWeo%>(3rzsrUU!$}1T$tEI5 z2gpJf>4lQxRA&y(|o0zqmDa6*|NBTY~xOv~o0jnD+}7#EDr z&KzbQ&=iovp_$oP!_YhnNd%#pUatFCF;0 zj7fifS$0woTHQPOm2GUpfLxZ&<1>Ym!KCFA{;{%KJn3(lTgtopo>N`C3uFJCyY?Eg-?YGB-B9HDI%yUbtcFvx!@8erOZwR%5z$ zdOfnEtK&vb-EB+fn6Z7%7uWt>H-6g-qVtD#Y`tAK@%HT8)#1LpCm+WnHp4PSy6)fG z5b!J*#|b5y6HY1+u#b^S;-w8!Qch{sme;5J@?wgq>vVhm{&qVv_WhC76L?a9iw_t( zlMlWBEwk(CwoPYi4zAss-#NPV)R;r1J=0%UK3CpcyJO2V$>uZ1DB(<>EkC+}4`#hS z>(|txu9@lP3ENw5bi4%0o{4Mz8$&PB+Z#7+yaC!8OzYxjcjlZa=sc;LyfT&55y9%{ z;*gG}lkdzQ$>b4MZr=;SI?tMo# zOx?KSdP_^z_0#P$T5dkK_+UZq&4CmBYi>!ZwmAVY!kiwck^e(u4>Y$CCyccZ)^=;Tti%-ZP8ZGyRuiG`nV8E z@L*PC^Vz!qsDC7796C{lUpqQ{VDi0dM}`1m$9}l1@W8ZtK}ISxjy)8MfeeyD5Tuer zc2IPGR0xTMd0nlh7SWz3b6VSW&TRPN`Ss?~DdN*d%Xa6b9L@Z`yX_npeeWda3v~eH z&q%rC9rbx}Z{oYQOY^Ij%*(m`n!CT@^Ip_y6Z$^Nza^c_&ogh4+pc_e!2kdN literal 0 HcmV?d00001 diff --git a/ability/ability_runtime/stage/actsdebuggabletest/timeout/AppScope/app.json b/ability/ability_runtime/stage/actsdebuggabletest/timeout/AppScope/app.json new file mode 100644 index 000000000..c0611ce15 --- /dev/null +++ b/ability/ability_runtime/stage/actsdebuggabletest/timeout/AppScope/app.json @@ -0,0 +1,19 @@ +{ + "app": { + "bundleName": "com.example.timeout", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:app_icon", + "label": "$string:app_name", + "distributedNotificationEnabled": true, + "keepAlive": true, + "singleUser": true, + "minAPIVersion": 9, + "targetAPIVersion": 9, + "car": { + "apiCompatibleVersion": 9, + "singleUser": false + } + } +} diff --git a/ability/ability_runtime/stage/actsdebuggabletest/timeout/AppScope/resources/base/element/string.json b/ability/ability_runtime/stage/actsdebuggabletest/timeout/AppScope/resources/base/element/string.json new file mode 100644 index 000000000..23e04ef6e --- /dev/null +++ b/ability/ability_runtime/stage/actsdebuggabletest/timeout/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "Timeout" + } + ] +} diff --git a/ability/ability_runtime/stage/actsdebuggabletest/timeout/AppScope/resources/base/media/app_icon.png b/ability/ability_runtime/stage/actsdebuggabletest/timeout/AppScope/resources/base/media/app_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i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oA}?J{a+ah*@31WTs#&J#o1`H98#6IQf;Wv0N_!);f&9g7o-k(lW5rWnDUR zQBFIRG+X=6NnsI@mxnwm;tf5;_Uxg?jZ8m-m0}&6+DA!qam(p$mN5R})yA_7m$q@| zFEd|dpS595rxQr-n#GjI5i-AhnUE>Cr;jpCqSrD~EwK_DqI^7%3#p5)%T_od!t3SOmH9MyXeeGO2(UQL;ax|x?Ncixmeo1=$ z{-);Au{*tfzOG?KQ~K|ak8-HQ?`Pekhe2WM(8s{xv-p>Zmu_6{G!-oE$7$mY`MOJorI=+mMx?H;`pr!;fVYz?5~yXBACruWB`Ph zZM}90_<^OBxIhyZ9BW$`>6JvO;%VFpqVr8|7t3~AmxYak6?`Pp#c;**_SYmi`&z23 z`p6_~ePvH)C6x-G9$hgL=eVALq`-AiamN>!3~Lxw&{H(b{B(7xSRm6<3<{%{yXiH# zos5Rv1L+8fUKJLo%P>4I&$}y { + if (err.code) { + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.ERROR); + hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + return; + } + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? ''); + }); + } + + onWindowStageDestroy() { + // Main window is destroyed, release UI related resources + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground() { + // Ability has brought to foreground + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground() { + // Ability has back to background + hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); + } +} diff --git a/ability/ability_runtime/stage/actsdebuggabletest/timeout/entry/src/main/ets/pages/Index.ets b/ability/ability_runtime/stage/actsdebuggabletest/timeout/entry/src/main/ets/pages/Index.ets new file mode 100644 index 000000000..381a30797 --- /dev/null +++ b/ability/ability_runtime/stage/actsdebuggabletest/timeout/entry/src/main/ets/pages/Index.ets @@ -0,0 +1,32 @@ +/* + * 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. + */ + +@Entry +@Component +struct Index { + @State message: string = 'Hello World'; + + build() { + Row() { + Column() { + Text(this.message) + .fontSize(50) + .fontWeight(FontWeight.Bold) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/ability/ability_runtime/stage/actsdebuggabletest/timeout/entry/src/main/module.json b/ability/ability_runtime/stage/actsdebuggabletest/timeout/entry/src/main/module.json new file mode 100644 index 000000000..0e288c05b --- /dev/null +++ b/ability/ability_runtime/stage/actsdebuggabletest/timeout/entry/src/main/module.json @@ -0,0 +1,37 @@ +{ + "module": { + "name": "entry", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [ + "default", + "tablet" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "EntryAbility", + "srcEntrance": "./ets/entryability/EntryAbility.ts", + "description": "$string:EntryAbility_desc", + "icon": "$media:icon", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:icon", + "startWindowBackground": "$color:start_window_background", + "visible": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ] + } + ] + } +} \ No newline at end of file diff --git a/ability/ability_runtime/stage/actsdebuggabletest/timeout/entry/src/main/resources/base/element/color.json b/ability/ability_runtime/stage/actsdebuggabletest/timeout/entry/src/main/resources/base/element/color.json new file mode 100644 index 000000000..3c712962d --- /dev/null +++ b/ability/ability_runtime/stage/actsdebuggabletest/timeout/entry/src/main/resources/base/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + } + ] +} \ No newline at end of file diff --git a/ability/ability_runtime/stage/actsdebuggabletest/timeout/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/stage/actsdebuggabletest/timeout/entry/src/main/resources/base/element/string.json new file mode 100644 index 000000000..f94595515 --- /dev/null +++ b/ability/ability_runtime/stage/actsdebuggabletest/timeout/entry/src/main/resources/base/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + } + ] +} \ No newline at end of file diff --git a/ability/ability_runtime/stage/actsdebuggabletest/timeout/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/stage/actsdebuggabletest/timeout/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbS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