提交 c36a0dfc 编写于 作者: C chengxingzhen

XTS免安装测试套部件化整改

Signed-off-by: Nchengxingzhen <chengxingzhen@huawei.com>
上级 6a00ccf6
......@@ -100,13 +100,21 @@ export default function ActsAmsCallBackFifthScene() {
done();
}
function sleep(delay) {
let start = new Date().getTime();
while (true) {
if (new Date().getTime() - start > delay) {
break;
}
}
}
/*
* @tc.number : Acts_Ams_test_6600
* @tc.name : getProcessRunningInfos : Get All Running Processes Info
* @tc.desc : Get All Running Processes Info(by CallBack)
*/
it('Acts_Ams_test_6600', 0, async function (done) {
console.info("Acts_Ams_test_6600 begin");
appManager.getProcessRunningInfos(
(error, info) => {
console.info('Acts_Ams_test_6600 getProcessRunningInfos error.code \
......@@ -130,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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册