Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
2d0193e1
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看板
未验证
提交
2d0193e1
编写于
8月 17, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 17, 2022
浏览文件
操作
浏览文件
下载
差异文件
!4982 getProcessRunningInformation接口对应新增测试用例
Merge pull request !4982 from savior-xzh/master
上级
aeb1462f
788cba2c
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
327 addition
and
28 deletion
+327
-28
ability/ability_runtime/abilitymanager/actsamscallbackfifthscene/src/main/js/test/MangerAbilityJsunit.test.js
...ckfifthscene/src/main/js/test/MangerAbilityJsunit.test.js
+32
-3
ability/ability_runtime/abilitymanager/actsamscallbackfirstscene/src/main/js/test/MangerAbilityJsunit.test.js
...ckfirstscene/src/main/js/test/MangerAbilityJsunit.test.js
+31
-3
ability/ability_runtime/abilitymanager/actsamscallbackfourthscene/src/main/js/test/MangerAbilityJsunit.test.js
...kfourthscene/src/main/js/test/MangerAbilityJsunit.test.js
+31
-3
ability/ability_runtime/abilitymanager/actsamscallbacksecondscene/src/main/js/test/MangerAbilityJsunit.test.js
...ksecondscene/src/main/js/test/MangerAbilityJsunit.test.js
+31
-3
ability/ability_runtime/abilitymanager/actsamscallbackthirdscene/src/main/js/test/MangerAbilityJsunit.test.js
...ckthirdscene/src/main/js/test/MangerAbilityJsunit.test.js
+31
-3
ability/ability_runtime/abilitymanager/actsamstestfifthscene/src/main/js/test/MangerAbilityJsunit.test.js
...stfifthscene/src/main/js/test/MangerAbilityJsunit.test.js
+27
-3
ability/ability_runtime/abilitymanager/actsamstestfirstscene/src/main/js/test/MangerAbilityJsunit.test.js
...stfirstscene/src/main/js/test/MangerAbilityJsunit.test.js
+27
-3
ability/ability_runtime/abilitymanager/actsamstestfourthscene/src/main/js/test/MangerAbilityJsunit.test.js
...tfourthscene/src/main/js/test/MangerAbilityJsunit.test.js
+31
-1
ability/ability_runtime/abilitymanager/actsamstestsecondscene/src/main/js/test/MangerAbilityJsunit.test.js
...tsecondscene/src/main/js/test/MangerAbilityJsunit.test.js
+27
-3
ability/ability_runtime/abilitymanager/actsamstestthirdscene/src/main/js/test/MangerAbilityJsunit.test.js
...stthirdscene/src/main/js/test/MangerAbilityJsunit.test.js
+29
-3
ability/ability_runtime/amsgetabilityprocessinfo/actsgetabilityprocessinfotest/src/main/js/test/ActsProcessManageJsTest.test.js
...infotest/src/main/js/test/ActsProcessManageJsTest.test.js
+30
-0
未找到文件。
ability/ability_runtime/abilitymanager/actsamscallbackfifthscene/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
2d0193e1
...
@@ -115,9 +115,6 @@ export default function ActsAmsCallBackFifthScene() {
...
@@ -115,9 +115,6 @@ export default function ActsAmsCallBackFifthScene() {
* @tc.desc : Get All Running Processes Info(by CallBack)
* @tc.desc : Get All Running Processes Info(by CallBack)
*/
*/
it
(
'
Acts_Ams_test_6600
'
,
0
,
async
function
(
done
)
{
it
(
'
Acts_Ams_test_6600
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
sleep begin
"
);
sleep
(
5000
);
console
.
info
(
"
sleep end
"
);
appManager
.
getProcessRunningInfos
(
appManager
.
getProcessRunningInfos
(
(
error
,
info
)
=>
{
(
error
,
info
)
=>
{
console
.
info
(
'
Acts_Ams_test_6600 getProcessRunningInfos error.code
\
console
.
info
(
'
Acts_Ams_test_6600 getProcessRunningInfos error.code
\
...
@@ -141,5 +138,37 @@ export default function ActsAmsCallBackFifthScene() {
...
@@ -141,5 +138,37 @@ export default function ActsAmsCallBackFifthScene() {
}
}
);
);
})
})
/*
* @tc.number : Acts_Ams_test_6700
* @tc.name : getProcessRunningInformation : Get All Running Processes Information
* @tc.desc : Get All Running Processes Information(by CallBack)
*/
it
(
'
Acts_Ams_test_6700
'
,
0
,
async
function
(
done
)
{
appManager
.
getProcessRunningInformation
(
(
error
,
info
)
=>
{
console
.
info
(
'
Acts_Ams_test_6700 getProcessRunningInformation error.code
\
'
+
error
.
code
+
'
, data length [
'
+
info
.
length
+
'
]
'
);
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
info
.
length
).
assertLarger
(
0
);
for
(
let
i
=
0
;
i
<
info
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_6700 getProcessRunningInformation[
'
+
i
+
"
]:
\
"
+
JSON
.
stringify
(
info
[
i
]));
expect
(
typeof
(
info
[
i
].
pid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
pid
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
processName
)).
assertEqual
(
"
string
"
);
expect
(
info
[
i
].
processName
.
length
).
assertLarger
(
0
);
expect
(
Array
.
isArray
(
info
[
i
].
bundleNames
)).
assertEqual
(
true
);
expect
(
info
[
i
].
bundleNames
.
length
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
uid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
uid
).
assertLarger
(
0
);
}
done
();
}
);
})
})
})
}
}
\ No newline at end of file
ability/ability_runtime/abilitymanager/actsamscallbackfirstscene/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
2d0193e1
...
@@ -59,9 +59,6 @@ export default function ActsAmsCallBackFirstScene() {
...
@@ -59,9 +59,6 @@ export default function ActsAmsCallBackFirstScene() {
* @tc.desc : Get All Running Processes Info(by CallBack)
* @tc.desc : Get All Running Processes Info(by CallBack)
*/
*/
it
(
'
Acts_Ams_test_0200
'
,
0
,
async
function
(
done
)
{
it
(
'
Acts_Ams_test_0200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
sleep begin
"
);
sleep
(
5000
);
console
.
info
(
"
sleep end
"
);
appManager
.
getProcessRunningInfos
(
appManager
.
getProcessRunningInfos
(
(
error
,
info
)
=>
{
(
error
,
info
)
=>
{
console
.
info
(
'
Acts_Ams_test_0200 getProcessRunningInfos error.code
\
console
.
info
(
'
Acts_Ams_test_0200 getProcessRunningInfos error.code
\
...
@@ -84,5 +81,36 @@ export default function ActsAmsCallBackFirstScene() {
...
@@ -84,5 +81,36 @@ export default function ActsAmsCallBackFirstScene() {
done
();
done
();
});
});
})
})
/*
* @tc.number : Acts_Ams_test_0300
* @tc.name : getProcessRunningInformation : Get All Running Processes Information
* @tc.desc : Get All Running Processes Information(by CallBack)
*/
it
(
'
Acts_Ams_test_0300
'
,
0
,
async
function
(
done
)
{
appManager
.
getProcessRunningInformation
(
(
error
,
info
)
=>
{
console
.
info
(
'
Acts_Ams_test_0300 getProcessRunningInformation error.code
\
'
+
error
.
code
+
'
, data length [
'
+
info
.
length
+
'
]
'
);
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
info
.
length
).
assertLarger
(
0
);
for
(
var
i
=
0
;
i
<
info
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_0200 getProcessRunningInformation[
'
+
i
+
"
]:
\
"
+
JSON
.
stringify
(
info
[
i
]));
expect
(
typeof
(
info
[
i
].
pid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
pid
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
processName
)).
assertEqual
(
"
string
"
);
expect
(
info
[
i
].
processName
.
length
).
assertLarger
(
0
);
expect
(
Array
.
isArray
(
info
[
i
].
bundleNames
)).
assertEqual
(
true
);
expect
(
info
[
i
].
bundleNames
.
length
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
uid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
uid
).
assertLarger
(
0
);
}
done
();
});
})
})
})
}
}
\ No newline at end of file
ability/ability_runtime/abilitymanager/actsamscallbackfourthscene/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
2d0193e1
...
@@ -110,9 +110,6 @@ export default function ActsAmsCallBackFourthScene() {
...
@@ -110,9 +110,6 @@ export default function ActsAmsCallBackFourthScene() {
* @tc.desc : Get All Running Processes Info(by CallBack)
* @tc.desc : Get All Running Processes Info(by CallBack)
*/
*/
it
(
'
Acts_Ams_test_5000
'
,
0
,
async
function
(
done
)
{
it
(
'
Acts_Ams_test_5000
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
sleep begin
"
);
sleep
(
5000
);
console
.
info
(
"
sleep end
"
);
appManager
.
getProcessRunningInfos
(
appManager
.
getProcessRunningInfos
(
(
error
,
info
)
=>
{
(
error
,
info
)
=>
{
console
.
info
(
'
Acts_Ams_test_5000 getProcessRunningInfos error.code
\
console
.
info
(
'
Acts_Ams_test_5000 getProcessRunningInfos error.code
\
...
@@ -135,5 +132,36 @@ export default function ActsAmsCallBackFourthScene() {
...
@@ -135,5 +132,36 @@ export default function ActsAmsCallBackFourthScene() {
done
();
done
();
});
});
})
})
/*
* @tc.number : Acts_Ams_test_5100
* @tc.name : getProcessRunningInformation : Get All Running Processes Information
* @tc.desc : Get All Running Processes Information(by CallBack)
*/
it
(
'
Acts_Ams_test_5100
'
,
0
,
async
function
(
done
)
{
appManager
.
getProcessRunningInformation
(
(
error
,
info
)
=>
{
console
.
info
(
'
Acts_Ams_test_5100 getProcessRunningInformation error.code
\
'
+
error
.
code
+
'
, data length [
'
+
info
.
length
+
'
]
'
);
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
info
.
length
).
assertLarger
(
0
);
for
(
let
i
=
0
;
i
<
info
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_5100 getProcessRunningInformation[
'
+
i
+
"
]:
\
"
+
JSON
.
stringify
(
info
[
i
]));
expect
(
typeof
(
info
[
i
].
pid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
pid
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
processName
)).
assertEqual
(
"
string
"
);
expect
(
info
[
i
].
processName
.
length
).
assertLarger
(
0
);
expect
(
Array
.
isArray
(
info
[
i
].
bundleNames
)).
assertEqual
(
true
);
expect
(
info
[
i
].
bundleNames
.
length
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
uid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
uid
).
assertLarger
(
0
);
}
done
();
});
})
})
})
}
}
\ No newline at end of file
ability/ability_runtime/abilitymanager/actsamscallbacksecondscene/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
2d0193e1
...
@@ -76,9 +76,6 @@ export default function ActsAmsCallBackSecondScene() {
...
@@ -76,9 +76,6 @@ export default function ActsAmsCallBackSecondScene() {
* @tc.desc : Get All Running Processes Info(by CallBack)
* @tc.desc : Get All Running Processes Info(by CallBack)
*/
*/
it
(
'
Acts_Ams_test_1800
'
,
0
,
async
function
(
done
)
{
it
(
'
Acts_Ams_test_1800
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
sleep begin
"
);
sleep
(
5000
);
console
.
info
(
"
sleep end
"
);
appManager
.
getProcessRunningInfos
(
appManager
.
getProcessRunningInfos
(
(
error
,
info
)
=>
{
(
error
,
info
)
=>
{
console
.
info
(
'
Acts_Ams_test_1800 getProcessRunningInfos error.code
\
console
.
info
(
'
Acts_Ams_test_1800 getProcessRunningInfos error.code
\
...
@@ -101,5 +98,36 @@ export default function ActsAmsCallBackSecondScene() {
...
@@ -101,5 +98,36 @@ export default function ActsAmsCallBackSecondScene() {
done
();
done
();
});
});
})
})
/*
* @tc.number : Acts_Ams_test_1900
* @tc.name : getProcessRunningInformation : Get All Running Processes Information
* @tc.desc : Get All Running Processes Information(by CallBack)
*/
it
(
'
Acts_Ams_test_1900
'
,
0
,
async
function
(
done
)
{
appManager
.
getProcessRunningInformation
(
(
error
,
info
)
=>
{
console
.
info
(
'
Acts_Ams_test_1900 getProcessRunningInformation error.code
\
'
+
error
.
code
+
'
, data length [
'
+
info
.
length
+
'
]
'
);
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
info
.
length
).
assertLarger
(
0
);
for
(
let
i
=
0
;
i
<
info
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_1900 getProcessRunningInformation[
'
+
i
+
"
]:
\
"
+
JSON
.
stringify
(
info
[
i
]));
expect
(
typeof
(
info
[
i
].
pid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
pid
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
processName
)).
assertEqual
(
"
string
"
);
expect
(
info
[
i
].
processName
.
length
).
assertLarger
(
0
);
expect
(
Array
.
isArray
(
info
[
i
].
bundleNames
)).
assertEqual
(
true
);
expect
(
info
[
i
].
bundleNames
.
length
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
uid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
uid
).
assertLarger
(
0
);
}
done
();
});
})
})
})
}
}
\ No newline at end of file
ability/ability_runtime/abilitymanager/actsamscallbackthirdscene/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
2d0193e1
...
@@ -70,9 +70,6 @@ export default function ActsAmsCallBackThirdScene() {
...
@@ -70,9 +70,6 @@ export default function ActsAmsCallBackThirdScene() {
* @tc.desc : Get All Running Processes Info(by CallBack)
* @tc.desc : Get All Running Processes Info(by CallBack)
*/
*/
it
(
'
Acts_Ams_test_3400
'
,
0
,
async
function
(
done
)
{
it
(
'
Acts_Ams_test_3400
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
sleep begin
"
);
sleep
(
5000
);
console
.
info
(
"
sleep end
"
);
appManager
.
getProcessRunningInfos
(
appManager
.
getProcessRunningInfos
(
(
error
,
info
)
=>
{
(
error
,
info
)
=>
{
console
.
info
(
'
Acts_Ams_test_3400 getProcessRunningInfos error.code
\
console
.
info
(
'
Acts_Ams_test_3400 getProcessRunningInfos error.code
\
...
@@ -95,5 +92,36 @@ export default function ActsAmsCallBackThirdScene() {
...
@@ -95,5 +92,36 @@ export default function ActsAmsCallBackThirdScene() {
done
();
done
();
});
});
})
})
/*
* @tc.number : Acts_Ams_test_3500
* @tc.name : getProcessRunningInformation : Get All Running Processes Information
* @tc.desc : Get All Running Processes Information(by CallBack)
*/
it
(
'
Acts_Ams_test_3500
'
,
0
,
async
function
(
done
)
{
appManager
.
getProcessRunningInformation
(
(
error
,
info
)
=>
{
console
.
info
(
'
Acts_Ams_test_3500 getProcessRunningInformation error.code
\
'
+
error
.
code
+
'
, data length [
'
+
info
.
length
+
'
]
'
);
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
info
.
length
).
assertLarger
(
0
);
for
(
let
i
=
0
;
i
<
info
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_3500 getProcessRunningInformation[
'
+
i
+
"
]:
\
"
+
JSON
.
stringify
(
info
[
i
]));
expect
(
typeof
(
info
[
i
].
pid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
pid
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
processName
)).
assertEqual
(
"
string
"
);
expect
(
info
[
i
].
processName
.
length
).
assertLarger
(
0
);
expect
(
Array
.
isArray
(
info
[
i
].
bundleNames
)).
assertEqual
(
true
);
expect
(
info
[
i
].
bundleNames
.
length
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
uid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
uid
).
assertLarger
(
0
);
}
done
();
});
})
})
})
}
}
\ No newline at end of file
ability/ability_runtime/abilitymanager/actsamstestfifthscene/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
2d0193e1
...
@@ -130,9 +130,6 @@ export default function ActsAmsTestFifthScene() {
...
@@ -130,9 +130,6 @@ export default function ActsAmsTestFifthScene() {
* @tc.desc : Get All Running Processes Info(by Promise)
* @tc.desc : Get All Running Processes Info(by Promise)
*/
*/
it
(
'
Acts_Ams_test_0100
'
,
0
,
async
function
(
done
)
{
it
(
'
Acts_Ams_test_0100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
sleep begin
"
);
sleep
(
5000
);
console
.
info
(
"
sleep end
"
);
let
info
=
await
appManager
.
getProcessRunningInfos
();
let
info
=
await
appManager
.
getProcessRunningInfos
();
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
info
.
length
).
assertLarger
(
0
);
expect
(
info
.
length
).
assertLarger
(
0
);
...
@@ -151,5 +148,32 @@ export default function ActsAmsTestFifthScene() {
...
@@ -151,5 +148,32 @@ export default function ActsAmsTestFifthScene() {
}
}
done
();
done
();
})
})
/*
* @tc.number : Acts_Ams_test_0200
* @tc.name : getProcessRunningInformation : Get All Running Processes Information
* @tc.desc : Get All Running Processes Information(by Promise)
*/
it
(
'
Acts_Ams_test_0200
'
,
0
,
async
function
(
done
)
{
let
info
=
await
appManager
.
getProcessRunningInformation
();
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
info
.
length
).
assertLarger
(
0
);
for
(
let
i
=
0
;
i
<
info
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_0200 getProcessRunningInformation[
'
+
i
+
"
]:
\
"
+
JSON
.
stringify
(
info
[
i
]));
expect
(
typeof
(
info
[
i
].
pid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
pid
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
processName
)).
assertEqual
(
"
string
"
);
expect
(
info
[
i
].
processName
.
length
).
assertLarger
(
0
);
expect
(
Array
.
isArray
(
info
[
i
].
bundleNames
)).
assertEqual
(
true
);
expect
(
info
[
i
].
bundleNames
.
length
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
uid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
uid
).
assertLarger
(
0
);
}
done
();
})
})
})
}
}
\ No newline at end of file
ability/ability_runtime/abilitymanager/actsamstestfirstscene/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
2d0193e1
...
@@ -64,9 +64,6 @@ export default function ActsAmsTestFirstScene() {
...
@@ -64,9 +64,6 @@ export default function ActsAmsTestFirstScene() {
* @tc.desc : Get All Running Processes Info(by Promise)
* @tc.desc : Get All Running Processes Info(by Promise)
*/
*/
it
(
'
Acts_Ams_test_0100
'
,
0
,
async
function
(
done
)
{
it
(
'
Acts_Ams_test_0100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
sleep begin
"
);
sleep
(
5000
);
console
.
info
(
"
sleep end
"
);
var
info
=
await
appManager
.
getProcessRunningInfos
();
var
info
=
await
appManager
.
getProcessRunningInfos
();
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
info
.
length
).
assertLarger
(
0
);
expect
(
info
.
length
).
assertLarger
(
0
);
...
@@ -85,5 +82,32 @@ export default function ActsAmsTestFirstScene() {
...
@@ -85,5 +82,32 @@ export default function ActsAmsTestFirstScene() {
}
}
done
();
done
();
})
})
/*
* @tc.number : Acts_Ams_test_0200
* @tc.name : getProcessRunningInformation : Get All Running Processes Information
* @tc.desc : Get All Running Processes Information(by Promise)
*/
it
(
'
Acts_Ams_test_0200
'
,
0
,
async
function
(
done
)
{
var
info
=
await
appManager
.
getProcessRunningInformation
();
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
info
.
length
).
assertLarger
(
0
);
for
(
var
i
=
0
;
i
<
info
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_0200 getProcessRunningInformation[
'
+
i
+
"
]:
\
"
+
JSON
.
stringify
(
info
[
i
]));
expect
(
typeof
(
info
[
i
].
pid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
pid
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
processName
)).
assertEqual
(
"
string
"
);
expect
(
info
[
i
].
processName
.
length
).
assertLarger
(
0
);
expect
(
Array
.
isArray
(
info
[
i
].
bundleNames
)).
assertEqual
(
true
);
expect
(
info
[
i
].
bundleNames
.
length
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
uid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
uid
).
assertLarger
(
0
);
}
done
();
})
})
})
}
}
\ No newline at end of file
ability/ability_runtime/abilitymanager/actsamstestfourthscene/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
2d0193e1
...
@@ -131,7 +131,7 @@ export default function ActsAmsTestFourthScene() {
...
@@ -131,7 +131,7 @@ export default function ActsAmsTestFourthScene() {
*/
*/
it
(
'
Acts_Ams_test_1700
'
,
0
,
async
function
(
done
)
{
it
(
'
Acts_Ams_test_1700
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
sleep begin
"
);
console
.
info
(
"
sleep begin
"
);
sleep
(
5
000
);
sleep
(
2
000
);
console
.
info
(
"
sleep end
"
);
console
.
info
(
"
sleep end
"
);
var
info
=
await
appManager
.
getProcessRunningInfos
();
var
info
=
await
appManager
.
getProcessRunningInfos
();
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
...
@@ -151,5 +151,35 @@ export default function ActsAmsTestFourthScene() {
...
@@ -151,5 +151,35 @@ export default function ActsAmsTestFourthScene() {
}
}
done
();
done
();
})
})
/*
* @tc.number : Acts_Ams_test_1800
* @tc.name : getProcessRunningInformation : Get All Running Processes Information
* @tc.desc : Get All Running Processes Information(by Promise)
*/
it
(
'
Acts_Ams_test_1800
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
sleep begin
"
);
sleep
(
2000
);
console
.
info
(
"
sleep end
"
);
var
info
=
await
appManager
.
getProcessRunningInformation
();
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
info
.
length
).
assertLarger
(
0
);
for
(
var
i
=
0
;
i
<
info
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_1800 getProcessRunningInformation[
'
+
i
+
"
]:
\
"
+
JSON
.
stringify
(
info
[
i
]));
expect
(
typeof
(
info
[
i
].
pid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
pid
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
processName
)).
assertEqual
(
"
string
"
);
expect
(
info
[
i
].
processName
.
length
).
assertLarger
(
0
);
expect
(
Array
.
isArray
(
info
[
i
].
bundleNames
)).
assertEqual
(
true
);
expect
(
info
[
i
].
bundleNames
.
length
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
uid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
uid
).
assertLarger
(
0
);
}
done
();
})
})
})
}
}
\ No newline at end of file
ability/ability_runtime/abilitymanager/actsamstestsecondscene/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
2d0193e1
...
@@ -86,9 +86,6 @@ export default function ActsAmsTestSecondScene() {
...
@@ -86,9 +86,6 @@ export default function ActsAmsTestSecondScene() {
* @tc.desc : Get All Running Processes Info(by Promise)
* @tc.desc : Get All Running Processes Info(by Promise)
*/
*/
it
(
'
Acts_Ams_test_1700
'
,
0
,
async
function
(
done
)
{
it
(
'
Acts_Ams_test_1700
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
sleep begin
"
);
sleep
(
5000
);
console
.
info
(
"
sleep end
"
);
var
info
=
await
appManager
.
getProcessRunningInfos
();
var
info
=
await
appManager
.
getProcessRunningInfos
();
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
info
.
length
).
assertLarger
(
0
);
expect
(
info
.
length
).
assertLarger
(
0
);
...
@@ -107,5 +104,32 @@ export default function ActsAmsTestSecondScene() {
...
@@ -107,5 +104,32 @@ export default function ActsAmsTestSecondScene() {
}
}
done
();
done
();
})
})
/*
* @tc.number : Acts_Ams_test_1800
* @tc.name : getProcessRunningInformation : Get All Running Processes Information
* @tc.desc : Get All Running Processes Information(by Promise)
*/
it
(
'
Acts_Ams_test_1800
'
,
0
,
async
function
(
done
)
{
var
info
=
await
appManager
.
getProcessRunningInformation
();
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
info
.
length
).
assertLarger
(
0
);
for
(
var
i
=
0
;
i
<
info
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_1800 getProcessRunningInformation[
'
+
i
+
"
]:
\
"
+
JSON
.
stringify
(
info
[
i
]));
expect
(
typeof
(
info
[
i
].
pid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
pid
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
processName
)).
assertEqual
(
"
string
"
);
expect
(
info
[
i
].
processName
.
length
).
assertLarger
(
0
);
expect
(
Array
.
isArray
(
info
[
i
].
bundleNames
)).
assertEqual
(
true
);
expect
(
info
[
i
].
bundleNames
.
length
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
uid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
uid
).
assertLarger
(
0
);
}
done
();
})
})
})
}
}
\ No newline at end of file
ability/ability_runtime/abilitymanager/actsamstestthirdscene/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
2d0193e1
...
@@ -87,9 +87,6 @@ export default function ActsAmsTestThirdScene() {
...
@@ -87,9 +87,6 @@ export default function ActsAmsTestThirdScene() {
* @tc.desc : Get All Running Processes Info(by Promise)
* @tc.desc : Get All Running Processes Info(by Promise)
*/
*/
it
(
'
Acts_Ams_test_3300
'
,
0
,
async
function
(
done
)
{
it
(
'
Acts_Ams_test_3300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
sleep begin
"
);
sleep
(
5000
);
console
.
info
(
"
sleep end
"
);
var
info
=
await
appManager
.
getProcessRunningInfos
();
var
info
=
await
appManager
.
getProcessRunningInfos
();
console
.
info
(
'
Acts_Ams_test_3300 getProcessRunningInfos JSON String:
'
+
JSON
.
stringify
(
info
));
console
.
info
(
'
Acts_Ams_test_3300 getProcessRunningInfos JSON String:
'
+
JSON
.
stringify
(
info
));
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
...
@@ -109,5 +106,34 @@ export default function ActsAmsTestThirdScene() {
...
@@ -109,5 +106,34 @@ export default function ActsAmsTestThirdScene() {
}
}
done
();
done
();
})
})
/*
* @tc.number : Acts_Ams_test_3400
* @tc.name : getProcessRunningInformation : Get All Running Processes Information
* @tc.desc : Get All Running Processes Information(by Promise)
*/
it
(
'
Acts_Ams_test_3400
'
,
0
,
async
function
(
done
)
{
var
info
=
await
appManager
.
getProcessRunningInformation
();
console
.
info
(
'
Acts_Ams_test_3400 getProcessRunningInformation JSON String:
\
'
+
JSON
.
stringify
(
info
));
expect
(
Array
.
isArray
(
info
)).
assertEqual
(
true
);
expect
(
info
.
length
).
assertLarger
(
0
);
for
(
var
i
=
0
;
i
<
info
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_3400 getProcessRunningInformation[
'
+
i
+
"
]:
\
"
+
JSON
.
stringify
(
info
[
i
]));
expect
(
typeof
(
info
[
i
].
pid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
pid
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
processName
)).
assertEqual
(
"
string
"
);
expect
(
info
[
i
].
processName
.
length
).
assertLarger
(
0
);
expect
(
Array
.
isArray
(
info
[
i
].
bundleNames
)).
assertEqual
(
true
);
expect
(
info
[
i
].
bundleNames
.
length
).
assertLarger
(
0
);
expect
(
typeof
(
info
[
i
].
uid
)).
assertEqual
(
"
number
"
);
expect
(
info
[
i
].
uid
).
assertLarger
(
0
);
}
done
();
})
})
})
}
}
\ No newline at end of file
ability/ability_runtime/amsgetabilityprocessinfo/actsgetabilityprocessinfotest/src/main/js/test/ActsProcessManageJsTest.test.js
浏览文件 @
2d0193e1
...
@@ -58,5 +58,35 @@ describe('ActsAbilityRunningInfosTest', function () {
...
@@ -58,5 +58,35 @@ describe('ActsAbilityRunningInfosTest', function () {
done
();
done
();
})
})
})
})
/*
* @tc.number: ACTS_getProcessRunningInformation_0300
* @tc.name: Application running ability information query
* @tc.desc: Verify applications are started to query getProcessRunningInformation ability information
* (by promise)
*/
it
(
'
ACTS_getProcessRunningInformation_0300
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
ACTS_getProcessRunningInformation_0300====<begin
'
);
var
data
=
await
appManager
.
getProcessRunningInformation
()
console
.
info
(
'
====> ACTS_getProcessRunningInformation_0300 ====>
'
+
JSON
.
stringify
(
data
))
expect
(
checkRunningProcess
(
'
com.example.abilityrunninginfostest
'
,
data
)).
assertTrue
();
done
();
})
/*
* @tc.number: ACTS_getProcessRunningInformation_0400
* @tc.name: Application running ability information query
* @tc.desc: Verify applications are started to query getProcessRunningInformation ability information
* (by callback)
*/
it
(
'
ACTS_getProcessRunningInformation_0400
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
ACTS_getProcessRunningInformation_0400====<begin
'
);
appManager
.
getProcessRunningInformation
((
err
,
data
)
=>
{
console
.
info
(
'
====> ACTS_getProcessRunningInformation_0400 ====>
'
+
JSON
.
stringify
(
data
))
expect
(
checkRunningProcess
(
'
com.example.abilityrunninginfostest
'
,
data
)).
assertTrue
();
done
();
})
})
})
})
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录