Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
06e43988
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
06e43988
编写于
9月 09, 2022
作者:
O
openharmony_ci
提交者:
Gitee
9月 09, 2022
浏览文件
操作
浏览文件
下载
差异文件
!5407 XTS元能力失败用例适配
Merge pull request !5407 from chengxingzhen/master
上级
2f24a6ce
61c70315
变更
23
隐藏空白更改
内联
并排
Showing
23 changed file
with
734 addition
and
298 deletion
+734
-298
ability/ability_runtime/aacommand/AACommandPrintOneTest/AppScope/app.json
...runtime/aacommand/AACommandPrintOneTest/AppScope/app.json
+21
-0
ability/ability_runtime/aacommand/AACommandPrintOneTest/AppScope/resources/base/element/string.json
...dPrintOneTest/AppScope/resources/base/element/string.json
+8
-0
ability/ability_runtime/aacommand/AACommandPrintOneTest/AppScope/resources/base/media/app_icon.png
...ndPrintOneTest/AppScope/resources/base/media/app_icon.png
+0
-0
ability/ability_runtime/aacommand/AACommandPrintOneTest/BUILD.gn
.../ability_runtime/aacommand/AACommandPrintOneTest/BUILD.gn
+43
-0
ability/ability_runtime/aacommand/AACommandPrintOneTest/Test.json
...ability_runtime/aacommand/AACommandPrintOneTest/Test.json
+28
-0
ability/ability_runtime/aacommand/AACommandPrintOneTest/entry/src/main/ets/Application/AbilityStage.ts
...intOneTest/entry/src/main/ets/Application/AbilityStage.ts
+22
-0
ability/ability_runtime/aacommand/AACommandPrintOneTest/entry/src/main/ets/MainAbility/MainAbility.ts
...rintOneTest/entry/src/main/ets/MainAbility/MainAbility.ts
+156
-0
ability/ability_runtime/aacommand/AACommandPrintOneTest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts
...st/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts
+75
-0
ability/ability_runtime/aacommand/AACommandPrintOneTest/entry/src/main/ets/pages/index.ets
.../AACommandPrintOneTest/entry/src/main/ets/pages/index.ets
+44
-0
ability/ability_runtime/aacommand/AACommandPrintOneTest/entry/src/main/ets/test/Ability.test.ets
...mandPrintOneTest/entry/src/main/ets/test/Ability.test.ets
+179
-0
ability/ability_runtime/aacommand/AACommandPrintOneTest/entry/src/main/ets/test/List.test.ets
...CommandPrintOneTest/entry/src/main/ets/test/List.test.ets
+20
-0
ability/ability_runtime/aacommand/AACommandPrintOneTest/entry/src/main/module.json
...acommand/AACommandPrintOneTest/entry/src/main/module.json
+37
-0
ability/ability_runtime/aacommand/AACommandPrintOneTest/entry/src/main/resources/base/element/string.json
...OneTest/entry/src/main/resources/base/element/string.json
+24
-0
ability/ability_runtime/aacommand/AACommandPrintOneTest/entry/src/main/resources/base/media/icon.png
...PrintOneTest/entry/src/main/resources/base/media/icon.png
+0
-0
ability/ability_runtime/aacommand/AACommandPrintOneTest/entry/src/main/resources/base/profile/main_pages.json
...est/entry/src/main/resources/base/profile/main_pages.json
+5
-0
ability/ability_runtime/aacommand/AACommandPrintOneTest/signature/openharmony_sx.p7b
...ommand/AACommandPrintOneTest/signature/openharmony_sx.p7b
+0
-0
ability/ability_runtime/aacommand/AACommandPrintSync/entry/src/main/ets/test/Ability.test.ets
...CommandPrintSync/entry/src/main/ets/test/Ability.test.ets
+7
-0
ability/ability_runtime/aacommand/AACommandRelyHap/entry/src/main/ets/test/Ability.test.ets
...AACommandRelyHap/entry/src/main/ets/test/Ability.test.ets
+21
-0
ability/ability_runtime/aacommand/AACommandtest/entry/src/main/ets/MainAbility/MainAbility.ts
...Commandtest/entry/src/main/ets/MainAbility/MainAbility.ts
+11
-109
ability/ability_runtime/aacommand/AACommandtest/entry/src/main/ets/test/Ability.test.ets
...nd/AACommandtest/entry/src/main/ets/test/Ability.test.ets
+0
-164
ability/ability_runtime/aacommand/BUILD.gn
ability/ability_runtime/aacommand/BUILD.gn
+1
-0
ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityclienttest/src/main/js/test/StServiceAbilityClient.test.js
...lienttest/src/main/js/test/StServiceAbilityClient.test.js
+31
-24
ability/ability_runtime/freeinstalltest/connectabilityfatest/actsfreeinstallconnectabilityfatest/entry/src/main/ets/MainAbility/test/ConnectAbilityTest1.ets
...try/src/main/ets/MainAbility/test/ConnectAbilityTest1.ets
+1
-1
未找到文件。
ability/ability_runtime/aacommand/AACommandPrintOneTest/AppScope/app.json
0 → 100644
浏览文件 @
06e43988
{
"app"
:
{
"bundleName"
:
"com.example.aacommandprintonetest"
,
"vendor"
:
"huawei"
,
"versionCode"
:
1000000
,
"versionName"
:
"1.0.0"
,
"debug"
:
false
,
"icon"
:
"$media:icon"
,
"label"
:
"$string:app_name"
,
"description"
:
"$string:description_application"
,
"distributedNotificationEnabled"
:
true
,
"keepAlive"
:
true
,
"singleUser"
:
true
,
"minAPIVersion"
:
9
,
"targetAPIVersion"
:
9
,
"car"
:
{
"apiCompatibleVersion"
:
9
,
"singleUser"
:
false
}
}
}
ability/ability_runtime/aacommand/AACommandPrintOneTest/AppScope/resources/base/element/string.json
0 → 100644
浏览文件 @
06e43988
{
"string"
:
[
{
"name"
:
"app_name"
,
"value"
:
"AACommandPrintSyncTest"
}
]
}
ability/ability_runtime/aacommand/AACommandPrintOneTest/AppScope/resources/base/media/app_icon.png
0 → 100644
浏览文件 @
06e43988
6.6 KB
ability/ability_runtime/aacommand/AACommandPrintOneTest/BUILD.gn
0 → 100644
浏览文件 @
06e43988
# 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("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ActsAACommandPrintOneTest") {
hap_profile = "entry/src/main/module.json"
js_build_mode = "debug"
deps = [
":aacommandprintonetest_js_assets",
":aacommandprintonetest_resources",
]
ets2abc = true
certificate_profile = "signature/openharmony_sx.p7b"
hap_name = "ActsAACommandPrintOneTest"
subsystem_name = "ability"
part_name = "ability_runtime"
}
ohos_app_scope("aacommandprintonetest_app_profile") {
app_profile = "AppScope/app.json"
sources = [ "AppScope/resources" ]
}
ohos_js_assets("aacommandprintonetest_js_assets") {
source_dir = "entry/src/main/ets"
}
ohos_resources("aacommandprintonetest_resources") {
sources = [ "entry/src/main/resources" ]
deps = [ ":aacommandprintonetest_app_profile" ]
hap_profile = "entry/src/main/module.json"
}
ability/ability_runtime/aacommand/AACommandPrintOneTest/Test.json
0 → 100644
浏览文件 @
06e43988
{
"description"
:
"Configuration for aceceshi Tests"
,
"driver"
:
{
"type"
:
"OHJSUnitTest"
,
"test-timeout"
:
"600000"
,
"bundle-name"
:
"com.example.aacommandprintonetest"
,
"module-name"
:
"entry_test"
,
"shell-timeout"
:
"600000"
},
"kits"
:
[
{
"type"
:
"ShellKit"
,
"run-command"
:
[
" hilog -Q pidoff"
,
"hilog -Q domainoff"
,
"hilog -b D"
]
},
{
"test-file-name"
:
[
"ActsAACommandPrintOneTest.hap"
,
"AACommandRelyHap.hap"
],
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
}
]
}
ability/ability_runtime/aacommand/AACommandPrintOneTest/entry/src/main/ets/Application/AbilityStage.ts
0 → 100644
浏览文件 @
06e43988
/*
* 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
AbilityStage
from
"
@ohos.application.AbilityStage
"
export
default
class
MyAbilityStage
extends
AbilityStage
{
onCreate
()
{
console
.
log
(
"
[Demo] MyAbilityStage onCreate
"
)
}
}
\ No newline at end of file
ability/ability_runtime/aacommand/AACommandPrintOneTest/entry/src/main/ets/MainAbility/MainAbility.ts
0 → 100644
浏览文件 @
06e43988
/*
* 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
Ability
from
'
@ohos.application.Ability
'
import
AbilityDelegatorRegistry
from
'
@ohos.application.abilityDelegatorRegistry
'
import
{
Hypium
}
from
'
@ohos/hypium
'
import
testsuite
from
'
../test/List.test
'
export
default
class
MainAbility
extends
Ability
{
async
onCreate
(
want
,
launchParam
)
{
globalThis
.
abilityContext
=
this
.
context
;
console
.
log
(
'
MainAbility onCreate
'
)
let
cmd
:
any
let
abilityDelegatorArguments
:
any
let
abilityDelegator
:
any
function
sleep
(
ms
)
{
return
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
ms
));
}
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
()
abilityDelegatorArguments
=
AbilityDelegatorRegistry
.
getArguments
()
cmd
=
'
aa test -b com.example.aacommandrelyhap -m entry_test -s class ACTS_AACommand_01_3#ACTS_AACo
'
+
'
mmand_print_01_0100 -s unittest OpenHarmonyTestRunner
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
console
.
log
(
'
ACTS_AACommand_print_01_0100 - executeShellCommand: start
'
)
console
.
log
(
'
ACTS_AACommand_print_01_0100 start err:
'
+
JSON
.
stringify
(
err
))
console
.
log
(
'
ACTS_AACommand_print_01_0100 stdResult =
'
+
data
.
stdResult
)
globalThis
.
stdResult3
=
data
.
stdResult
;
console
.
log
(
'
ACTS_AACommand_print_01_0100 - executeShellCommand: end
'
)
})
await
sleep
(
4000
)
cmd
=
'
aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_AAComm
'
+
'
and_print_01_0200 -s unittest OpenHarmonyTestRunner
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
console
.
log
(
'
ACTS_AACommand_print_01_0200 - executeShellCommand: start
'
)
console
.
log
(
'
ACTS_AACommand_print_01_0200 start err:
'
+
JSON
.
stringify
(
err
))
console
.
log
(
'
ACTS_AACommand_print_01_0200 stdResult =
'
+
data
.
stdResult
)
globalThis
.
stdResult4
=
data
.
stdResult
;
console
.
log
(
'
ACTS_AACommand_print_01_0200 - executeShellCommand: end
'
)
})
await
sleep
(
4000
)
cmd
=
'
aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_
'
+
'
AACommand_print_01_0300 -s unittest OpenHarmonyTestRunner
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
console
.
log
(
'
ACTS_AACommand_print_01_0300 - executeShellCommand: start
'
)
console
.
log
(
'
ACTS_AACommand_print_01_0300 start err:
'
+
JSON
.
stringify
(
err
))
console
.
log
(
'
ACTS_AACommand_print_01_0300 stdResult =
'
+
data
.
stdResult
)
globalThis
.
stdResult5
=
data
.
stdResult
;
console
.
log
(
'
ACTS_AACommand_print_01_0300 - executeShellCommand: end
'
)
})
await
sleep
(
4000
)
cmd
=
'
aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_AAComma
'
+
'
nd_print_01_0400 -s unittest OpenHarmonyTestRunner
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
console
.
log
(
'
ACTS_AACommand_print_01_0400 - executeShellCommand: start
'
)
console
.
log
(
'
ACTS_AACommand_print_01_0400 start err:
'
+
JSON
.
stringify
(
err
))
console
.
log
(
'
ACTS_AACommand_print_01_0400 stdResult =
'
+
data
.
stdResult
)
globalThis
.
stdResult6
=
data
.
stdResult
;
console
.
log
(
'
ACTS_AACommand_print_01_0400 - executeShellCommand: end
'
)
})
await
sleep
(
4000
)
cmd
=
'
aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_AAComm
'
+
'
and_print_01_0500 -s unittest OpenHarmonyTestRunner
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
console
.
log
(
'
ACTS_AACommand_print_01_0500 - executeShellCommand: start
'
)
console
.
log
(
'
ACTS_AACommand_print_01_0500 start err:
'
+
JSON
.
stringify
(
err
))
console
.
log
(
'
ACTS_AACommand_print_01_0500 stdResult =
'
+
data
.
stdResult
)
globalThis
.
stdResult7
=
data
.
stdResult
;
console
.
log
(
'
ACTS_AACommand_print_01_0500 - executeShellCommand: end
'
)
})
await
sleep
(
4000
)
cmd
=
'
aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_AA
'
+
'
Command_print_01_0600 -s unittest OpenHarmonyTestRunner
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
console
.
log
(
'
ACTS_AACommand_print_01_0600 - executeShellCommand: start
'
)
console
.
log
(
'
ACTS_AACommand_print_01_0600 start err:
'
+
JSON
.
stringify
(
err
))
console
.
log
(
'
ACTS_AACommand_print_01_0600 stdResult =
'
+
data
.
stdResult
)
globalThis
.
stdResult8
=
data
.
stdResult
;
console
.
log
(
'
ACTS_AACommand_print_01_0600 - executeShellCommand: end
'
)
})
await
sleep
(
4000
)
cmd
=
'
aa test -m entry_test -b com.example.aacommandrelyhap -s class
'
+
'
ACTS_AACommand_01_3#ACTS_AACommand_print_01_0700 -s unittest OpenHarmonyTestRunner
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
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
sleep
(
4000
)
cmd
=
'
aa test -m entry_test -b com.example.aacommandrelyhap -s
'
+
'
class ACTS_AACommand_01_3#ACTS_AACommand_print_01_0800 -s unittest OpenHarmonyTestRunner
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
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
'
)
})
setTimeout
(()
=>
{
Hypium
.
hypiumTest
(
abilityDelegator
,
abilityDelegatorArguments
,
testsuite
)
},
5000
)
}
onDestroy
()
{
console
.
log
(
'
MainAbility onDestroy
'
)
}
onWindowStageCreate
(
windowStage
)
{
console
.
log
(
'
MainAbility onWindowStageCreate
'
)
windowStage
.
setUIContent
(
this
.
context
,
'
pages/index
'
,
null
)
}
onWindowStageDestroy
()
{
console
.
log
(
'
MainAbility onWindowStageDestroy
'
)
}
onForeground
()
{
console
.
log
(
'
MainAbility onForeground
'
)
}
onBackground
()
{
console
.
log
(
'
MainAbility onBackground
'
)
}
};
\ No newline at end of file
ability/ability_runtime/aacommand/AACommandPrintOneTest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts
0 → 100644
浏览文件 @
06e43988
/*
* 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
TestRunner
from
'
@ohos.application.testRunner
'
import
AbilityDelegatorRegistry
from
'
@ohos.application.abilityDelegatorRegistry
'
var
abilityDelegator
=
undefined
var
abilityDelegatorArguments
=
undefined
function
translateParamsToString
(
parameters
)
{
const
keySet
=
new
Set
([
'
-s class
'
,
'
-s notClass
'
,
'
-s suite
'
,
'
-s it
'
,
'
-s level
'
,
'
-s testType
'
,
'
-s size
'
,
'
-s timeout
'
,
'
-s dryRun
'
])
let
targetParams
=
''
;
for
(
const
key
in
parameters
)
{
if
(
keySet
.
has
(
key
))
{
targetParams
=
`
${
targetParams
}
${
key
}
${
parameters
[
key
]}
`
}
}
return
targetParams
.
trim
()
}
async
function
onAbilityCreateCallback
()
{
console
.
log
(
"
onAbilityCreateCallback
"
);
}
async
function
addAbilityMonitorCallback
(
err
:
any
)
{
console
.
info
(
"
addAbilityMonitorCallback :
"
+
JSON
.
stringify
(
err
))
}
export
default
class
OpenHarmonyTestRunner
implements
TestRunner
{
constructor
()
{
}
onPrepare
()
{
console
.
info
(
"
OpenHarmonyTestRunner OnPrepare
"
)
}
async
onRun
()
{
console
.
log
(
'
OpenHarmonyTestRunner onRun run
'
)
abilityDelegatorArguments
=
AbilityDelegatorRegistry
.
getArguments
()
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
()
globalThis
.
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
()
var
MainAbilityName
=
abilityDelegatorArguments
.
bundleName
+
'
.MainAbility
'
let
lMonitor
=
{
abilityName
:
MainAbilityName
,
onAbilityCreate
:
onAbilityCreateCallback
,
};
abilityDelegator
.
addAbilityMonitor
(
lMonitor
,
addAbilityMonitorCallback
)
var
cmd
=
'
aa start -d 0 -a MainAbility
'
+
'
-b
'
+
abilityDelegatorArguments
.
bundleName
cmd
+=
'
'
+
translateParamsToString
(
abilityDelegatorArguments
.
parameters
)
console
.
info
(
'
cmd :
'
+
cmd
)
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
:
any
,
d
:
any
)
=>
{
console
.
info
(
'
executeShellCommand : err :
'
+
JSON
.
stringify
(
err
));
console
.
info
(
'
executeShellCommand : data :
'
+
d
.
stdResult
);
console
.
info
(
'
executeShellCommand : data :
'
+
d
.
exitCode
);
})
console
.
info
(
'
OpenHarmonyTestRunner onRun end
'
)
}
};
\ No newline at end of file
ability/ability_runtime/aacommand/AACommandPrintOneTest/entry/src/main/ets/pages/index.ets
0 → 100644
浏览文件 @
06e43988
/*
* 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)
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
ability/ability_runtime/aacommand/AACommandPrintOneTest/entry/src/main/ets/test/Ability.test.ets
0 → 100644
浏览文件 @
06e43988
/*
* 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, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
let msg: any
let msgcopy: any
export default function abilityTest() {
describe('ActsAACommandPrinOneTest', function () {
/**
* @tc.number: ACTS_AACommand_print_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_0100', 0, async function (done) {
console.log("ACTS_AACommand_print_0100 --- start")
msg = '测试日志!@#$%^&*()_+QWE{}|?><Fafq3146'
expect(globalThis.stdResult3).assertContain(msg);
done()
})
/**
* @tc.number: ACTS_AACommand_print_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_0200', 0, async function (done) {
console.log("ACTS_AACommand_print_0200 --- start")
msg = '0callbackaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'aaaaaaaaa' +
'1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'2aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'3aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'4aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'5aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'6aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'7aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'8aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'9aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaae'
expect(globalThis.stdResult4).assertContain(msg);
done()
})
/**
* @tc.number: ACTS_AACommand_print_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_0300', 0, async function (done) {
console.log("ACTS_AACommand_print_0300 --- start")
msg = '0callbackaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'aaaaaaaaaa' +
'1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'2aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'3aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'4aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'5aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'6aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'7aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'8aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'9aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaae'
let msgcopy = 'fffffffffff'
expect(globalThis.stdResult5).assertContain(msg);
expect(globalThis.stdResult5.indexOf(msgcopy) == -1).assertEqual(true);
done()
})
/**
* @tc.number: ACTS_AACommand_print_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_0400', 0, async function (done) {
console.log("ACTS_AACommand_print_0400 --- start")
msg = 'start ability successfully'
expect(globalThis.stdResult6).assertContain(msg);
done()
})
/**
* @tc.number: ACTS_AACommand_print_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_0500', 0, async function (done) {
console.log("ACTS_AACommand_print_0500 --- start")
msg = '测试日志!@#$%^&*()_+QWE{}|?><Fafq3146'
expect(globalThis.stdResult7).assertContain(msg);
done()
})
/**
* @tc.number: ACTS_AACommand_print_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_0600', 0, async function (done) {
console.log("ACTS_AACommand_print_0600 --- start")
msg = '0callbackaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'aaaaaaaaaa' +
'1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'2aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'3aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'4aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'5aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'6aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'7aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'8aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'9aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaae'
expect(globalThis.stdResult8).assertContain(msg);
done()
})
/**
* @tc.number: ACTS_AACommand_print_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_0700', 0, async function (done) {
console.log("ACTS_AACommand_print_0700 --- start")
msg = '0callbackaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'aaaaaaaaaa' +
'1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'2aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'3aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'4aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'5aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'6aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'7aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'8aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'9aaaaaaaaa'
msgcopy = 'fffffffffff'
expect(globalThis.stdResult9).assertContain(msg);
expect(globalThis.stdResult9.indexOf(msgcopy) == -1).assertEqual(true);
done()
})
/**
* @tc.number: ACTS_AACommand_print_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_0800', 0, async function (done) {
console.log("ACTS_AACommand_print_0800 --- start")
msg = 'start ability successfully'
expect(globalThis.stdResult10).assertContain(msg);
done()
})
})
}
\ No newline at end of file
ability/ability_runtime/aacommand/AACommandPrintOneTest/entry/src/main/ets/test/List.test.ets
0 → 100644
浏览文件 @
06e43988
/*
* 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 abilityTest from './Ability.test'
export default function testsuite() {
abilityTest()
}
\ No newline at end of file
ability/ability_runtime/aacommand/AACommandPrintOneTest/entry/src/main/module.json
0 → 100644
浏览文件 @
06e43988
{
"module"
:
{
"name"
:
"entry_test"
,
"type"
:
"entry"
,
"srcEntrance"
:
"./ets/Application/AbilityStage.ts"
,
"description"
:
"$string:entry_test_desc"
,
"mainElement"
:
"MainAbility"
,
"deviceTypes"
:
[
"phone"
,
"tablet"
],
"deliveryWithInstall"
:
true
,
"installationFree"
:
false
,
"pages"
:
"$profile:main_pages"
,
"uiSyntax"
:
"ets"
,
"abilities"
:
[
{
"name"
:
"MainAbility"
,
"srcEntrance"
:
"./ets/MainAbility/MainAbility.ts"
,
"description"
:
"$string:MainAbility_desc"
,
"icon"
:
"$media:icon"
,
"label"
:
"$string:MainAbility_label"
,
"visible"
:
true
,
"skills"
:
[
{
"entities"
:
[
"entity.system.home"
],
"actions"
:
[
"action.system.home"
]
}
]
}
]
}
}
\ No newline at end of file
ability/ability_runtime/aacommand/AACommandPrintOneTest/entry/src/main/resources/base/element/string.json
0 → 100644
浏览文件 @
06e43988
{
"string"
:
[
{
"name"
:
"entry_test_desc"
,
"value"
:
"description"
},
{
"name"
:
"MainAbility_desc"
,
"value"
:
"description"
},
{
"name"
:
"MainAbility_label"
,
"value"
:
"label"
},
{
"name"
:
"app_name"
,
"value"
:
"AACommandPrintSyncTest"
},
{
"name"
:
"description_application"
,
"value"
:
"demo for test"
}
]
}
\ No newline at end of file
ability/ability_runtime/aacommand/AACommandPrintOneTest/entry/src/main/resources/base/media/icon.png
0 → 100644
浏览文件 @
06e43988
6.6 KB
ability/ability_runtime/aacommand/AACommandPrintOneTest/entry/src/main/resources/base/profile/main_pages.json
0 → 100644
浏览文件 @
06e43988
{
"src"
:
[
"pages/index"
]
}
\ No newline at end of file
ability/ability_runtime/aacommand/AACommandPrintOneTest/signature/openharmony_sx.p7b
0 → 100644
浏览文件 @
06e43988
文件已添加
ability/ability_runtime/aacommand/AACommandPrintSync/entry/src/main/ets/test/Ability.test.ets
浏览文件 @
06e43988
...
...
@@ -15,6 +15,9 @@
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
export default function abilityTest() {
describe('ACTS_AACommand_01_3', function () {
/**
...
...
@@ -29,6 +32,7 @@ export default function abilityTest() {
var msg = '测试日志!@#$%^&*()_+QWE{}|?><Fafq3146'
globalThis.abilityDelegator.printSync(msg);
console.log("ACTS_AACommand_printSync_01_0100 printSync end ====> " )
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 " )
...
...
@@ -59,6 +63,7 @@ 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 " )
...
...
@@ -88,6 +93,7 @@ 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 " )
...
...
@@ -105,6 +111,7 @@ 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 " )
...
...
ability/ability_runtime/aacommand/AACommandRelyHap/entry/src/main/ets/test/Ability.test.ets
浏览文件 @
06e43988
...
...
@@ -15,6 +15,10 @@
*/
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
export default function abilityTest() {
describe('ACTS_AACommand_01_3', function () {
/**
...
...
@@ -32,6 +36,7 @@ export default function abilityTest() {
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))
})
await sleep(1000);
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 " )
...
...
@@ -62,6 +67,7 @@ export default function abilityTest() {
globalThis.abilityDelegator.print(msg,()=>{
console.log("print test end ========> callback " )
})
await sleep(1000);
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 " )
...
...
@@ -91,6 +97,7 @@ export default function abilityTest() {
globalThis.abilityDelegator.print(msg,()=>{
console.log("print test end ========> callback " )
})
await sleep(1000);
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 " )
...
...
@@ -109,6 +116,7 @@ export default function abilityTest() {
globalThis.abilityDelegator.print(null,()=>{
console.log("print test end ========> callback " )
})
await sleep(1000);
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 " )
...
...
@@ -128,6 +136,7 @@ export default function abilityTest() {
globalThis.abilityDelegator.print(msg).then(()=>{
console.log("ACTS_AACommand_print_01_0500 print test end ========> callback " )
})
await sleep(1000);
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 " )
...
...
@@ -156,6 +165,7 @@ export default function abilityTest() {
globalThis.abilityDelegator.print(msg).then(()=>{
console.log("ACTS_AACommand_print_01_0600 print test end ========> callback " )
})
await sleep(1000);
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 " )
...
...
@@ -185,6 +195,7 @@ export default function abilityTest() {
globalThis.abilityDelegator.print(msg).then(()=>{
console.log("ACTS_AACommand_print_01_0700 print test end ========> callback " )
})
await sleep(1000);
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 " )
...
...
@@ -220,6 +231,7 @@ export default function abilityTest() {
*/
it('ACTS_AACommand_finish_01_0100', 0, async function (done) {
var msg = '测试日志!@#$%^&*()_+QWE{}|?><Fafq3146ACTS_AACommand_finish_01_0100'
await sleep(1000);
globalThis.abilityDelegator.finishTest(msg, 1,()=>{
console.log("ACTS_AACommand_finish_01_0100 finishTest test end ========> callback " )
done()
...
...
@@ -275,6 +287,7 @@ export default function abilityTest() {
*/
it('ACTS_AACommand_finish_01_0400', 0, async function (done) {
var msg = '测试日志!@#$%^&*()_+QWE{}|?><Fafq3146'
await sleep(1000);
globalThis.abilityDelegator.finishTest(msg, Number.MAX_VALUE,()=>{
console.log("ACTS_AACommand_finish_01_0400 finishTest test end ========> callback " )
done()
...
...
@@ -290,6 +303,7 @@ export default function abilityTest() {
*/
it('ACTS_AACommand_finish_01_0500', 0, async function (done) {
var msg = '测试日志!@#$%^&*()_+QWE{}|?><Fafq3146'
await sleep(1000);
globalThis.abilityDelegator.finishTest(msg, Number.MIN_VALUE,()=>{
console.log("ACTS_AACommand_finish_01_0500 finishTest test end ========> callback " )
done()
...
...
@@ -306,6 +320,7 @@ export default function abilityTest() {
it('ACTS_AACommand_finish_01_0600', 0, async function (done) {
var msg = '测试日志!@#$%^&*()_+QWE{}|?><Fafq3146'
await sleep(1000);
globalThis.abilityDelegator.finishTest(msg, (Number.MIN_VALUE+1),()=>{
console.log("ACTS_AACommand_finish_01_0600 finishTest test end ========> callback " )
done()
...
...
@@ -321,6 +336,7 @@ export default function abilityTest() {
*/
it('ACTS_AACommand_finish_01_0700', 0, async function (done) {
var msg = '测试日志!@#$%^&*()_+QWE{}|?><Fafq3146'
await sleep(1000);
globalThis.abilityDelegator.finishTest(msg, (Number.MIN_VALUE-1),()=>{
console.log("ACTS_AACommand_finish_01_0700 finishTest test end ========> callback " )
done()
...
...
@@ -358,6 +374,7 @@ export default function abilityTest() {
*/
it('ACTS_AACommand_finish_01_0900', 0, async function (done) {
var msg = '测试日志!@#$%^&*()_+QWE{}|?><Fafq3146'
await sleep(1000);
globalThis.abilityDelegator.finishTest(msg, 1).then(() => {
console.log("ACTS_AACommand_finish_01_0900 finishTest test end ========> callback " )
done()
...
...
@@ -409,6 +426,7 @@ export default function abilityTest() {
*/
it('ACTS_AACommand_finish_01_1200', 0, async function (done) {
var msg = '测试日志!@#$%^&*()_+QWE{}|?><Fafq3146'
await sleep(1000);
globalThis.abilityDelegator.finishTest(msg, Number.MAX_VALUE).then(()=>{
console.log("ACTS_AACommand_finish_01_1200 finishTest test end ========> callback " )
done()
...
...
@@ -424,6 +442,7 @@ export default function abilityTest() {
*/
it('ACTS_AACommand_finish_01_1300', 0, async function (done) {
var msg = '测试日志!@#$%^&*()_+QWE{}|?><Fafq3146'
await sleep(1000);
globalThis.abilityDelegator.finishTest(msg, Number.MIN_VALUE).then(()=>{
console.log("ACTS_AACommand_finish_01_1300 finishTest test end ========> callback " )
done()
...
...
@@ -439,6 +458,7 @@ export default function abilityTest() {
*/
it('ACTS_AACommand_finish_01_1400', 0, async function (done) {
var msg = '测试日志!@#$%^&*()_+QWE{}|?><Fafq3146'
await sleep(1000);
globalThis.abilityDelegator.finishTest(msg, Number.MIN_VALUE+1).then(()=>{
console.log("ACTS_AACommand_finish_01_1400 finishTest test end ========> callback " )
done()
...
...
@@ -454,6 +474,7 @@ export default function abilityTest() {
*/
it('ACTS_AACommand_finish_01_1500', 0, async function (done) {
var msg = '测试日志!@#$%^&*()_+QWE{}|?><Fafq3146'
await sleep(1000);
globalThis.abilityDelegator.finishTest(msg, Number.MIN_VALUE-1).then(()=>{
console.log("ACTS_AACommand_finish_01_1500 finishTest test end ========> callback " )
done()
...
...
ability/ability_runtime/aacommand/AACommandtest/entry/src/main/ets/MainAbility/MainAbility.ts
浏览文件 @
06e43988
...
...
@@ -32,8 +32,6 @@ export default class MainAbility extends Ability {
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
()
abilityDelegatorArguments
=
AbilityDelegatorRegistry
.
getArguments
()
await
sleep
(
500
)
cmd
=
'
aa test -m entry_test -b com.example.aacommandrelyhap -s
'
+
'
class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_0700 -s unittest OpenHarmonyTestRunner
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
...
...
@@ -43,7 +41,7 @@ export default class MainAbility extends Ability {
console
.
log
(
'
ACTS_AACommand_finish_01_0700 - executeShellCommand: end
'
)
})
await
sleep
(
3
000
)
await
sleep
(
4
000
)
cmd
=
'
aa dump -a
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
...
...
@@ -55,102 +53,6 @@ export default class MainAbility extends Ability {
await
sleep
(
2000
)
cmd
=
'
aa test -b com.example.aacommandrelyhap -m entry_test -s class ACTS_AACommand_01_3#ACTS_AACo
'
+
'
mmand_print_01_0100 -s unittest OpenHarmonyTestRunner
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
console
.
log
(
'
ACTS_AACommand_print_01_0100 - executeShellCommand: start
'
)
console
.
log
(
'
ACTS_AACommand_print_01_0100 start err:
'
+
JSON
.
stringify
(
err
))
console
.
log
(
'
ACTS_AACommand_print_01_0100 stdResult =
'
+
data
.
stdResult
)
globalThis
.
stdResult3
=
data
.
stdResult
;
console
.
log
(
'
ACTS_AACommand_print_01_0100 - executeShellCommand: end
'
)
})
await
sleep
(
3000
)
cmd
=
'
aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_AAComm
'
+
'
and_print_01_0200 -s unittest OpenHarmonyTestRunner
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
console
.
log
(
'
ACTS_AACommand_print_01_0200 - executeShellCommand: start
'
)
console
.
log
(
'
ACTS_AACommand_print_01_0200 start err:
'
+
JSON
.
stringify
(
err
))
console
.
log
(
'
ACTS_AACommand_print_01_0200 stdResult =
'
+
data
.
stdResult
)
globalThis
.
stdResult4
=
data
.
stdResult
;
console
.
log
(
'
ACTS_AACommand_print_01_0200 - executeShellCommand: end
'
)
})
await
sleep
(
3000
)
cmd
=
'
aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_
'
+
'
AACommand_print_01_0300 -s unittest OpenHarmonyTestRunner
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
console
.
log
(
'
ACTS_AACommand_print_01_0300 - executeShellCommand: start
'
)
console
.
log
(
'
ACTS_AACommand_print_01_0300 start err:
'
+
JSON
.
stringify
(
err
))
console
.
log
(
'
ACTS_AACommand_print_01_0300 stdResult =
'
+
data
.
stdResult
)
globalThis
.
stdResult5
=
data
.
stdResult
;
console
.
log
(
'
ACTS_AACommand_print_01_0300 - executeShellCommand: end
'
)
})
await
sleep
(
3000
)
cmd
=
'
aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_AAComma
'
+
'
nd_print_01_0400 -s unittest OpenHarmonyTestRunner
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
console
.
log
(
'
ACTS_AACommand_print_01_0400 - executeShellCommand: start
'
)
console
.
log
(
'
ACTS_AACommand_print_01_0400 start err:
'
+
JSON
.
stringify
(
err
))
console
.
log
(
'
ACTS_AACommand_print_01_0400 stdResult =
'
+
data
.
stdResult
)
globalThis
.
stdResult6
=
data
.
stdResult
;
console
.
log
(
'
ACTS_AACommand_print_01_0400 - executeShellCommand: end
'
)
})
await
sleep
(
3000
)
cmd
=
'
aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_AAComm
'
+
'
and_print_01_0500 -s unittest OpenHarmonyTestRunner
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
console
.
log
(
'
ACTS_AACommand_print_01_0500 - executeShellCommand: start
'
)
console
.
log
(
'
ACTS_AACommand_print_01_0500 start err:
'
+
JSON
.
stringify
(
err
))
console
.
log
(
'
ACTS_AACommand_print_01_0500 stdResult =
'
+
data
.
stdResult
)
globalThis
.
stdResult7
=
data
.
stdResult
;
console
.
log
(
'
ACTS_AACommand_print_01_0500 - executeShellCommand: end
'
)
})
await
sleep
(
3000
)
cmd
=
'
aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_AA
'
+
'
Command_print_01_0600 -s unittest OpenHarmonyTestRunner
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
console
.
log
(
'
ACTS_AACommand_print_01_0600 - executeShellCommand: start
'
)
console
.
log
(
'
ACTS_AACommand_print_01_0600 start err:
'
+
JSON
.
stringify
(
err
))
console
.
log
(
'
ACTS_AACommand_print_01_0600 stdResult =
'
+
data
.
stdResult
)
globalThis
.
stdResult8
=
data
.
stdResult
;
console
.
log
(
'
ACTS_AACommand_print_01_0600 - executeShellCommand: end
'
)
})
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
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
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
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
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
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
sleep
(
3000
)
cmd
=
'
aa test -m entry_test -b com.example.aacommandrelyhap -s class
'
+
'
ACTS_AACommand_01_3#ACTS_AACommand_finish_01_0400 -s unittest OpenHarmonyTestRunner
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
...
...
@@ -161,7 +63,7 @@ export default class MainAbility extends Ability {
console
.
log
(
'
ACTS_AACommand_finish_01_0400 - executeShellCommand: end
'
)
})
await
sleep
(
3
000
)
await
sleep
(
4
000
)
cmd
=
'
aa dump -a
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
...
...
@@ -183,7 +85,7 @@ export default class MainAbility extends Ability {
console
.
log
(
'
ACTS_AACommand_finish_01_0100 - executeShellCommand: end
'
)
})
await
sleep
(
3
000
)
await
sleep
(
4
000
)
cmd
=
'
aa dump -a
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
...
...
@@ -205,7 +107,7 @@ export default class MainAbility extends Ability {
console
.
log
(
'
ACTS_AACommand_finish_01_0500 - executeShellCommand: end
'
)
})
await
sleep
(
3
000
)
await
sleep
(
4
000
)
cmd
=
'
aa dump -a
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
...
...
@@ -227,7 +129,7 @@ export default class MainAbility extends Ability {
console
.
log
(
'
ACTS_AACommand_finish_01_0600 - executeShellCommand: end
'
)
})
await
sleep
(
3
000
)
await
sleep
(
4
000
)
cmd
=
'
aa dump -a
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
...
...
@@ -249,7 +151,7 @@ export default class MainAbility extends Ability {
console
.
log
(
'
ACTS_AACommand_finish_01_0900 - executeShellCommand: end
'
)
})
await
sleep
(
3
000
)
await
sleep
(
4
000
)
cmd
=
'
aa dump -a
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
...
...
@@ -271,7 +173,7 @@ export default class MainAbility extends Ability {
console
.
log
(
'
ACTS_AACommand_finish_01_1200 - executeShellCommand: end
'
)
})
await
sleep
(
3
000
)
await
sleep
(
4
000
)
cmd
=
'
aa dump -a
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
...
...
@@ -293,7 +195,7 @@ export default class MainAbility extends Ability {
console
.
log
(
'
ACTS_AACommand_finish_01_1300 - executeShellCommand: end
'
)
})
await
sleep
(
3
000
)
await
sleep
(
4
000
)
cmd
=
'
aa dump -a
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
...
...
@@ -315,7 +217,7 @@ export default class MainAbility extends Ability {
console
.
log
(
'
ACTS_AACommand_finish_01_1400 - executeShellCommand: end
'
)
})
await
sleep
(
3
000
)
await
sleep
(
4
000
)
cmd
=
'
aa dump -a
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
...
...
@@ -337,7 +239,7 @@ export default class MainAbility extends Ability {
console
.
log
(
'
ACTS_AACommand_finish_01_1500 - executeShellCommand: end
'
)
})
await
sleep
(
3
000
)
await
sleep
(
4
000
)
cmd
=
'
aa dump -a
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
...
...
@@ -358,7 +260,7 @@ export default class MainAbility extends Ability {
console
.
log
(
'
ACTS_AACommand_finish_01_0200 - executeShellCommand: end
'
)
})
await
sleep
(
3
000
)
await
sleep
(
4
000
)
cmd
=
'
aa dump -a
'
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
...
...
ability/ability_runtime/aacommand/AACommandtest/entry/src/main/ets/test/Ability.test.ets
浏览文件 @
06e43988
...
...
@@ -202,165 +202,6 @@ export default function abilityTest() {
})
})
/**
* @tc.number: ACTS_AACommand_print_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_0100', 0, async function (done) {
console.log("ACTS_AACommand_print_0100 --- start")
msg = '测试日志!@#$%^&*()_+QWE{}|?><Fafq3146'
expect(globalThis.stdResult3).assertContain(msg);
done()
})
/**
* @tc.number: ACTS_AACommand_print_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_0200', 0, async function (done) {
console.log("ACTS_AACommand_print_0200 --- start")
msg = '0callbackaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'aaaaaaaaa' +
'1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'2aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'3aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'4aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'5aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'6aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'7aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'8aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'9aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaae'
expect(globalThis.stdResult4).assertContain(msg);
done()
})
/**
* @tc.number: ACTS_AACommand_print_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_0300', 0, async function (done) {
console.log("ACTS_AACommand_print_0300 --- start")
msg = '0callbackaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'aaaaaaaaaa' +
'1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'2aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'3aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'4aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'5aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'6aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'7aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'8aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'9aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaae'
let msgcopy = 'fffffffffff'
expect(globalThis.stdResult5).assertContain(msg);
expect(globalThis.stdResult5.indexOf(msgcopy) == -1).assertEqual(true);
done()
})
/**
* @tc.number: ACTS_AACommand_print_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_0400', 0, async function (done) {
console.log("ACTS_AACommand_print_0400 --- start")
msg = 'start ability successfully'
expect(globalThis.stdResult6).assertContain(msg);
done()
})
/**
* @tc.number: ACTS_AACommand_print_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_0500', 0, async function (done) {
console.log("ACTS_AACommand_print_0500 --- start")
msg = '测试日志!@#$%^&*()_+QWE{}|?><Fafq3146'
expect(globalThis.stdResult7).assertContain(msg);
done()
})
/**
* @tc.number: ACTS_AACommand_print_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_0600', 0, async function (done) {
console.log("ACTS_AACommand_print_0600 --- start")
msg = '0callbackaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'aaaaaaaaaa' +
'1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'2aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'3aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'4aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'5aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'6aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'7aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'8aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'9aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaae'
expect(globalThis.stdResult8).assertContain(msg);
done()
})
/**
* @tc.number: ACTS_AACommand_print_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_0700', 0, async function (done) {
console.log("ACTS_AACommand_print_0700 --- start")
msg = '0callbackaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'aaaaaaaaaa' +
'1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'2aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'3aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'4aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'5aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'6aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'7aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'8aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'9aaaaaaaaa'
msgcopy = 'fffffffffff'
expect(globalThis.stdResult9).assertContain(msg);
expect(globalThis.stdResult9.indexOf(msgcopy) == -1).assertEqual(true);
done()
})
/**
* @tc.number: ACTS_AACommand_print_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_0800', 0, async function (done) {
console.log("ACTS_AACommand_print_0800 --- start")
msg = 'start ability successfully'
expect(globalThis.stdResult10).assertContain(msg);
done()
})
/**
* @tc.number: ACTS_AACommand_finishTest_0400
* @tc.name: The parameters of the test command are valid, and the finishTest interface is called in
...
...
@@ -379,7 +220,6 @@ export default function abilityTest() {
})
/**
* @tc.number: ACTS_AACommand_finishTest_0100
* @tc.name: Each parameter of the test command is valid, and the finishTest interface is called
...
...
@@ -398,7 +238,6 @@ export default function abilityTest() {
done()
})
/**
* @tc.number: ACTS_AACommand_finishTest_0500
* @tc.name: The parameters of the test command are valid, and the finishTest
...
...
@@ -437,8 +276,6 @@ export default function abilityTest() {
done()
})
/**
* @tc.number: ACTS_AACommand_finishTest_0900
* @tc.name: The parameters of the test command are valid, and the finishTest interface is called in Promise
...
...
@@ -456,7 +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
...
...
ability/ability_runtime/aacommand/BUILD.gn
浏览文件 @
06e43988
...
...
@@ -19,6 +19,7 @@ group("aacommand") {
deps = [
"AACommand07:AACommand07",
"AACommand08:AACommand08",
"AACommandPrintOneTest:ActsAACommandPrintOneTest",
"AACommandPrintSync:AACommandPrintSync",
"AACommandPrintSyncTest:ActsAACommandPrintSyncTest",
"AACommandRelyHap:AACommandRelyHap",
...
...
ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityclienttest/src/main/js/test/StServiceAbilityClient.test.js
浏览文件 @
06e43988
...
...
@@ -93,6 +93,9 @@ describe('ActsStServiceAbilityTest', function () {
+
"
,err=
"
+
err
+
"
,data=
"
+
data
);
});
}
function
sleep
(
ms
)
{
return
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
ms
));
}
let
gSetTimeout
=
1000
beforeAll
(
async
(
done
)
=>
{
console
.
debug
(
'
= ACTS_beforeAll ====<begin
'
);
...
...
@@ -126,12 +129,12 @@ describe('ActsStServiceAbilityTest', function () {
it
(
'
ACTS_JsServiceAbility_0100
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
'
ACTS_JsServiceAbility_0100====<begin
'
);
try
{
commonEvent
.
createSubscriber
(
CommonEventSubscribeInfo0100
).
then
(
async
(
data
)
=>
{
await
commonEvent
.
createSubscriber
(
CommonEventSubscribeInfo0100
).
then
(
async
(
data
)
=>
{
console
.
debug
(
"
=ACTS_JsServiceAbility_0100 createSubscriber .then(data)=======>
"
+
(
"
json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
+
"
,data=
"
+
data
);
subscriber0100
=
data
;
await
commonEvent
.
subscribe
(
subscriber0100
,
async
(
err
,
data
)
=>
{
commonEvent
.
subscribe
(
subscriber0100
,
async
(
err
,
data
)
=>
{
console
.
debug
(
"
=ACTS_JsServiceAbility_0100 subscribe (err,data)=======>
"
+
(
"
json err【
"
)
+
JSON
.
stringify
(
err
)
+
(
"
】
"
)
+
(
"
json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
...
...
@@ -176,12 +179,12 @@ describe('ActsStServiceAbilityTest', function () {
it
(
'
ACTS_JsServiceAbility_0200
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
'
ACTS_JsServiceAbility_0200====<begin
'
);
try
{
commonEvent
.
createSubscriber
(
CommonEventSubscribeInfo0200
).
then
(
async
(
data
)
=>
{
await
commonEvent
.
createSubscriber
(
CommonEventSubscribeInfo0200
).
then
(
async
(
data
)
=>
{
console
.
debug
(
"
=ACTS_JsServiceAbility_0200 createSubscriber .then(data)=======>
"
+
(
"
json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
+
"
,data=
"
+
data
);
subscriber0200
=
data
;
await
commonEvent
.
subscribe
(
subscriber0200
,
async
(
err
,
data
)
=>
{
commonEvent
.
subscribe
(
subscriber0200
,
async
(
err
,
data
)
=>
{
console
.
debug
(
"
=ACTS_JsServiceAbility_0200 subscribe (err,data)=======>
"
+
(
"
json err【
"
)
+
JSON
.
stringify
(
err
)
+
(
"
】
"
)
+
(
"
json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
...
...
@@ -193,7 +196,7 @@ describe('ActsStServiceAbilityTest', function () {
done
()
});
})
await
featureAbility
.
startAbility
(
featureAbility
.
startAbility
(
{
want
:
{
...
...
@@ -223,12 +226,12 @@ describe('ActsStServiceAbilityTest', function () {
it
(
'
ACTS_JsServiceAbility_0300
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
'
ACTS_JsServiceAbility_0300====<begin
'
);
try
{
commonEvent
.
createSubscriber
(
CommonEventSubscribeInfo0300
).
then
(
async
(
data
)
=>
{
await
commonEvent
.
createSubscriber
(
CommonEventSubscribeInfo0300
).
then
(
async
(
data
)
=>
{
console
.
debug
(
"
=ACTS_JsServiceAbility_0300 createSubscriber .then(data)=======>
"
+
(
"
json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
+
"
,data=
"
+
data
);
subscriber0300
=
data
;
await
commonEvent
.
subscribe
(
subscriber0300
,
async
(
err
,
data
)
=>
{
commonEvent
.
subscribe
(
subscriber0300
,
async
(
err
,
data
)
=>
{
console
.
debug
(
"
=ACTS_JsServiceAbility_0300 subscribe (err,data)=======>
"
+
(
"
json err【
"
)
+
JSON
.
stringify
(
err
)
+
(
"
】
"
)
+
(
"
json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
...
...
@@ -296,12 +299,12 @@ describe('ActsStServiceAbilityTest', function () {
it
(
'
ACTS_JsServiceAbility_0400
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
'
ACTS_JsServiceAbility_0400====<begin
'
);
try
{
commonEvent
.
createSubscriber
(
CommonEventSubscribeInfo0400
).
then
(
async
(
data
)
=>
{
await
commonEvent
.
createSubscriber
(
CommonEventSubscribeInfo0400
).
then
(
async
(
data
)
=>
{
console
.
debug
(
"
=ACTS_JsServiceAbility_0400 createSubscriber .then(data)=======>
"
+
(
"
json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
+
"
,data=
"
+
data
);
subscriber0400
=
data
;
await
commonEvent
.
subscribe
(
subscriber0400
,
async
(
err
,
data
)
=>
{
commonEvent
.
subscribe
(
subscriber0400
,
async
(
err
,
data
)
=>
{
console
.
debug
(
"
=ACTS_JsServiceAbility_0400 subscribe (err,data)=======>
"
+
(
"
json err【
"
)
+
JSON
.
stringify
(
err
)
+
(
"
】
"
)
+
(
"
json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
...
...
@@ -364,12 +367,12 @@ describe('ActsStServiceAbilityTest', function () {
console
.
log
(
'
ACTS_JsServiceAbility_0500====<begin
'
);
try
{
var
mConnIdJsPromise
;
commonEvent
.
createSubscriber
(
CommonEventSubscribeInfo0500
).
then
(
async
(
data
)
=>
{
await
commonEvent
.
createSubscriber
(
CommonEventSubscribeInfo0500
).
then
(
async
(
data
)
=>
{
console
.
debug
(
"
=ACTS_JsServiceAbility_0500 createSubscriber .then(data)=======>
"
+
(
"
json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
+
"
,data=
"
+
data
);
subscriber0500
=
data
;
await
commonEvent
.
subscribe
(
subscriber0500
,
async
(
err
,
data
)
=>
{
commonEvent
.
subscribe
(
subscriber0500
,
async
(
err
,
data
)
=>
{
console
.
debug
(
"
=ACTS_JsServiceAbility_0500 subscribe (err,data)=======>
"
+
(
"
json err【
"
)
+
JSON
.
stringify
(
err
)
+
(
"
】
"
)
+
(
"
json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
...
...
@@ -441,12 +444,12 @@ describe('ActsStServiceAbilityTest', function () {
try
{
var
currentAlertTimeout
;
var
mConnIdJsAsyncCallback
;
commonEvent
.
createSubscriber
(
CommonEventSubscribeInfo0600
).
then
(
async
(
data
)
=>
{
await
commonEvent
.
createSubscriber
(
CommonEventSubscribeInfo0600
).
then
(
async
(
data
)
=>
{
console
.
debug
(
"
=ACTS_JsServiceAbility_0600 createSubscriber .then(data)=======>
"
+
(
"
json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
+
"
,data=
"
+
data
);
subscriber0600
=
data
;
await
commonEvent
.
subscribe
(
subscriber0600
,
async
(
err
,
data
)
=>
{
commonEvent
.
subscribe
(
subscriber0600
,
async
(
err
,
data
)
=>
{
console
.
debug
(
"
=ACTS_JsServiceAbility_0600 subscribe (err,data)=======>
"
+
(
"
json err【
"
)
+
JSON
.
stringify
(
err
)
+
(
"
】
"
)
+
(
"
json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
...
...
@@ -526,23 +529,25 @@ describe('ActsStServiceAbilityTest', function () {
it
(
'
ACTS_JsServiceAbility_0900
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
'
ACTS_JsServiceAbility_0900====<begin
'
);
try
{
commonEvent
.
createSubscriber
(
CommonEventSubscribeInfo0900
).
then
(
async
(
data
)
=>
{
await
commonEvent
.
createSubscriber
(
CommonEventSubscribeInfo0900
).
then
(
async
(
data
)
=>
{
console
.
debug
(
"
=ACTS_JsServiceAbility_0900 createSubscriber .then(data)=======>
"
+
(
"
json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
+
"
,data=
"
+
data
);
subscriber0900
=
data
;
await
commonEvent
.
subscribe
(
subscriber0900
,
async
(
err
,
data
)
=>
{
commonEvent
.
subscribe
(
subscriber0900
,
async
(
err
,
data
)
=>
{
console
.
debug
(
"
=ACTS_JsServiceAbility_0900 subscribe (err,data)=======>
"
+
(
"
json err【
"
)
+
JSON
.
stringify
(
err
)
+
(
"
】
"
)
+
(
"
json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
+
"
,err=
"
+
err
+
"
,data=
"
+
data
);
expect
(
"
ACTS_SerivceAbilityServerSecond_onCommand_ServiceStartService_0900
"
).
assertEqual
(
data
.
event
);
await
sleep
(
1000
)
unsubscribe
(
"
ACTS_JsServiceAbility_0900_unsubscribe
"
,
subscriber0900
);
console
.
debug
(
'
ACTS_JsServiceAbility_0900====<end
'
);
done
();
});
})
await
sleep
(
500
)
featureAbility
.
startAbility
(
{
want
:
...
...
@@ -576,24 +581,26 @@ describe('ActsStServiceAbilityTest', function () {
it
(
'
ACTS_JsServiceAbility_1000
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
'
ACTS_JsServiceAbility_1000====<begin
'
);
try
{
commonEvent
.
createSubscriber
(
CommonEventSubscribeInfo1000
).
then
(
async
(
data
)
=>
{
await
commonEvent
.
createSubscriber
(
CommonEventSubscribeInfo1000
).
then
(
async
(
data
)
=>
{
console
.
debug
(
"
=ACTS_JsServiceAbility_1000 createSubscriber .then(data)=======>
"
+
(
"
json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
+
"
,data=
"
+
data
);
subscriber1000
=
data
;
await
commonEvent
.
subscribe
(
subscriber1000
,
async
(
err
,
data
)
=>
{
commonEvent
.
subscribe
(
subscriber1000
,
async
(
err
,
data
)
=>
{
console
.
debug
(
"
=ACTS_JsServiceAbility_1000 subscribe (err,data)=======>
"
+
(
"
json err【
"
)
+
JSON
.
stringify
(
err
)
+
(
"
】
"
)
+
(
"
json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
+
"
,err=
"
+
err
+
"
,data=
"
+
data
);
expect
(
"
ACTS_SerivceAbilityServerSecond_onCommand_ServiceStartService_1000
"
).
assertEqual
(
data
.
event
);
await
sleep
(
1000
)
unsubscribe
(
"
ACTS_JsServiceAbility_1000_unsubscribe
"
,
subscriber1000
);
console
.
debug
(
'
ACTS_JsServiceAbility_1000====<end
'
);
done
()
});
})
await
featureAbility
.
startAbility
(
await
sleep
(
500
)
featureAbility
.
startAbility
(
{
want
:
{
...
...
@@ -624,12 +631,12 @@ describe('ActsStServiceAbilityTest', function () {
console
.
log
(
'
ACTS_JsServiceAbility_1300====<begin
'
);
try
{
var
mConnIdJsPromise
;
commonEvent
.
createSubscriber
(
CommonEventSubscribeInfo1300
).
then
(
async
(
data
)
=>
{
await
commonEvent
.
createSubscriber
(
CommonEventSubscribeInfo1300
).
then
(
async
(
data
)
=>
{
console
.
debug
(
"
=ACTS_JsServiceAbility_1300 createSubscriber .then(data)=======>
"
+
(
"
json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
+
"
,data=
"
+
data
);
subscriber1300
=
data
;
await
commonEvent
.
subscribe
(
subscriber1300
,
async
(
err
,
data
)
=>
{
commonEvent
.
subscribe
(
subscriber1300
,
async
(
err
,
data
)
=>
{
console
.
debug
(
"
=ACTS_JsServiceAbility_1300 subscribe (err,data)=======>
"
+
(
"
json err【
"
)
+
JSON
.
stringify
(
err
)
+
(
"
】
"
)
+
(
"
json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
...
...
@@ -703,12 +710,12 @@ describe('ActsStServiceAbilityTest', function () {
try
{
var
currentAlertTimeout
;
var
mConnIdJsAsyncCallback
;
commonEvent
.
createSubscriber
(
CommonEventSubscribeInfo1400
).
then
(
async
(
data
)
=>
{
await
commonEvent
.
createSubscriber
(
CommonEventSubscribeInfo1400
).
then
(
async
(
data
)
=>
{
console
.
debug
(
"
=ACTS_JsServiceAbility_1400 createSubscriber .then(data)=======>
"
+
(
"
json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
+
"
,data=
"
+
data
);
subscriber1400
=
data
;
await
commonEvent
.
subscribe
(
subscriber1400
,
async
(
err
,
data
)
=>
{
commonEvent
.
subscribe
(
subscriber1400
,
async
(
err
,
data
)
=>
{
console
.
debug
(
"
=ACTS_JsServiceAbility_1400 subscribe (err,data)=======>
"
+
(
"
json err【
"
)
+
JSON
.
stringify
(
err
)
+
(
"
】
"
)
+
(
"
json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
...
...
@@ -784,12 +791,12 @@ describe('ActsStServiceAbilityTest', function () {
console
.
log
(
'
ACTS_JsServiceAbility_1500====<begin
'
);
try
{
var
mConnIdJsPromise
;
commonEvent
.
createSubscriber
(
CommonEventSubscribeInfo1500
).
then
(
async
(
data
)
=>
{
await
commonEvent
.
createSubscriber
(
CommonEventSubscribeInfo1500
).
then
(
async
(
data
)
=>
{
console
.
debug
(
"
=ACTS_JsServiceAbility_1500 createSubscriber .then(data)=======>
"
+
(
"
json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
+
"
,data=
"
+
data
);
subscriber1500
=
data
;
await
commonEvent
.
subscribe
(
subscriber1500
,
async
(
err
,
data
)
=>
{
commonEvent
.
subscribe
(
subscriber1500
,
async
(
err
,
data
)
=>
{
console
.
debug
(
"
=ACTS_JsServiceAbility_1500 subscribe (err,data)=======>
"
+
(
"
json err【
"
)
+
JSON
.
stringify
(
err
)
+
(
"
】
"
)
+
(
"
json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
...
...
ability/ability_runtime/freeinstalltest/connectabilityfatest/actsfreeinstallconnectabilityfatest/entry/src/main/ets/MainAbility/test/ConnectAbilityTest1.ets
浏览文件 @
06e43988
...
...
@@ -32,7 +32,7 @@ export default function ConnectAbilityTest1() {
return
new
Promise
((
resolve
)
=>
setTimeout
(
resolve
,
time
))
}
describe
(
'FreeInstall_FA_ConnectAbility'
,
function
()
{
describe
(
'FreeInstall_FA_ConnectAbility
One
'
,
function
()
{
beforeAll
(
async
function
(
done
)
{
console
.
info
(
"FreeInstall_FA_ConnectAbility before all called"
);
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录