提交 25267804 编写于 作者: J jiyong

jiyong@huawei.com

Signed-off-by: Njiyong <jiyong@huawei.com>
上级 a296c416
......@@ -110,8 +110,14 @@ describe('ActsAmsCallBackFifthScene', function () {
},
},
);
done();
setTimeout(done(), 5000);
});
function timeout() {
expect().assertFail();
console.debug('Acts_Ams_test=========timeout========');
done();
}
/*
* @tc.number : Acts_Ams_test_6600
......@@ -119,40 +125,39 @@ describe('ActsAmsCallBackFifthScene', function () {
* @tc.desc : Get All Running Processes Info(by CallBack)
*/
it('Acts_Ams_test_6600', 0, async function (done) {
setTimeout(function () {
abilitymanager.getAllRunningProcesses(
(error, info) => {
console.info('getAllRunningProcesses error.code \
' + error.code + ', data length [' + info.length + ']');
console.info('Acts_Ams_test_6600 getAllRunningProcesses JSON String: ' + JSON.stringify(info));
expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertEqual(5);
for (var i = 0; i < info.length; i++) {
expect(typeof (info[i].pid)).assertEqual("number");
expect(info[i].pid).assertLarger(0);
abilitymanager.getAllRunningProcesses(
(error, info) => {
console.info('getAllRunningProcesses error.code \
' + error.code + ', data length [' + info.length + ']');
console.info('Acts_Ams_test_6600 getAllRunningProcesses JSON String: ' + JSON.stringify(info));
expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertEqual(5);
for (var i = 0; i < info.length; 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(bundleNameList.indexOf(info[i].processName)).assertLarger(-1);
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(bundleNameList.indexOf(info[i].processName)).assertLarger(-1);
expect(Array.isArray(info[i].pkgList)).assertEqual(true);
expect(info[i].pkgList.length).assertEqual(0);
expect(Array.isArray(info[i].pkgList)).assertEqual(true);
expect(info[i].pkgList.length).assertEqual(0);
expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0);
expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0);
expect(typeof (info[i].lastMemoryLevel)).assertEqual("number");
expect(info[i].lastMemoryLevel).assertEqual(-1);
expect(typeof (info[i].lastMemoryLevel)).assertEqual("number");
expect(info[i].lastMemoryLevel).assertEqual(-1);
expect(typeof (info[i].weight)).assertEqual("number");
expect(info[i].weight).assertEqual(-1);
expect(typeof (info[i].weight)).assertEqual("number");
expect(info[i].weight).assertEqual(-1);
expect(typeof (info[i].weightReasonCode)).assertEqual("number");
expect(info[i].weightReasonCode).assertEqual(WeightReasonCode.REASON_UNKNOWN);
}
});
done();
}, 5000);
expect(typeof (info[i].weightReasonCode)).assertEqual("number");
expect(info[i].weightReasonCode).assertEqual(WeightReasonCode.REASON_UNKNOWN);
}
done();
});
setTimeout(timeout, 5000);
})
/*
......@@ -197,8 +202,9 @@ describe('ActsAmsCallBackFifthScene', function () {
expect(typeof (data[i].missionDescription.label)).assertEqual("string");
expect(typeof (data[i].missionDescription.iconPath)).assertEqual("string");
}
done();
});
done();
setTimeout(timeout, 5000);
})
/*
......@@ -243,8 +249,9 @@ describe('ActsAmsCallBackFifthScene', function () {
expect(typeof (data[i].missionDescription.label)).assertEqual("string");
expect(typeof (data[i].missionDescription.iconPath)).assertEqual("string");
}
done();
});
done();
setTimeout(timeout, 5000);
})
/*
......@@ -261,8 +268,9 @@ describe('ActsAmsCallBackFifthScene', function () {
' + error.code + ',data [' + info + ']');
expect(typeof (info)).assertEqual("number");
expect(info).assertEqual(0);
done();
});
done();
setTimeout(timeout, 5000);
})
/*
......@@ -279,8 +287,9 @@ describe('ActsAmsCallBackFifthScene', function () {
' + error.code + ',data [' + info + ']');
expect(typeof (info)).assertEqual("number");
expect(info).assertEqual(0);
done();
});
done();
setTimeout(timeout, 5000);
})
/*
......@@ -297,8 +306,9 @@ describe('ActsAmsCallBackFifthScene', function () {
' + error.code + ',data [' + info + ']');
expect(typeof (info)).assertEqual("number");
expect(info).assertLarger(0);
done();
});
done();
setTimeout(timeout, 5000);
})
/*
......@@ -313,8 +323,9 @@ describe('ActsAmsCallBackFifthScene', function () {
' + error.code + ',data [' + info + ']');
expect(typeof (info)).assertEqual("number");
expect(info).assertLarger(0);
done();
});
done();
setTimeout(timeout, 5000);
})
/*
......@@ -329,7 +340,8 @@ describe('ActsAmsCallBackFifthScene', function () {
' + error.code + ',data [' + info + ']');
expect(typeof (info)).assertEqual("number");
expect(info).assertEqual(0);
done();
});
done();
setTimeout(timeout, 5000);
})
})
......@@ -83,47 +83,52 @@ describe('ActsAmsCallBackFirstScene', function () {
);
done();
});
function timeout() {
expect().assertFail();
console.debug('Acts_Ams_test=========timeout========');
done();
}
/*
* @tc.number : Acts_Ams_test_0200
* @tc.name : getAllRunningProcesses : Get All Running Processes Info
* @tc.desc : Get All Running Processes Info(by CallBack)
*/
it('Acts_Ams_test_0200', 0, async function (done) {
setTimeout(function () {
abilitymanager.getAllRunningProcesses(
(error, info) => {
console.info('getAllRunningProcesses error.code \
' + error.code + ', data length [' + info.length + ']');
console.info('Acts_Ams_test_0200 getAllRunningProcesses data ' + JSON.stringify(info));
expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertEqual(4);
for (var i = 0; i < info.length; i++) {
expect(typeof (info[i].pid)).assertEqual("number");
expect(info[i].pid).assertLarger(0);
abilitymanager.getAllRunningProcesses(
(error, info) => {
console.info('getAllRunningProcesses error.code \
' + error.code + ', data length [' + info.length + ']');
console.info('Acts_Ams_test_0200 getAllRunningProcesses data ' + JSON.stringify(info));
expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertEqual(4);
for (var i = 0; i < info.length; 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(bundleNameList.indexOf(info[i].processName)).assertLarger(-1);
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(bundleNameList.indexOf(info[i].processName)).assertLarger(-1);
expect(Array.isArray(info[i].pkgList)).assertEqual(true);
expect(info[i].pkgList.length).assertEqual(0);
expect(Array.isArray(info[i].pkgList)).assertEqual(true);
expect(info[i].pkgList.length).assertEqual(0);
expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0);
expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0);
expect(typeof (info[i].lastMemoryLevel)).assertEqual("number");
expect(info[i].lastMemoryLevel).assertEqual(-1);
expect(typeof (info[i].lastMemoryLevel)).assertEqual("number");
expect(info[i].lastMemoryLevel).assertEqual(-1);
expect(typeof (info[i].weight)).assertEqual("number");
expect(info[i].weight).assertEqual(-1);
expect(typeof (info[i].weight)).assertEqual("number");
expect(info[i].weight).assertEqual(-1);
expect(typeof (info[i].weightReasonCode)).assertEqual("number");
expect(info[i].weightReasonCode).assertEqual(WeightReasonCode.REASON_UNKNOWN);
}
});
done();
}, 5000);
expect(typeof (info[i].weightReasonCode)).assertEqual("number");
expect(info[i].weightReasonCode).assertEqual(WeightReasonCode.REASON_UNKNOWN);
}
done();
});
setTimeout(timeout, 5000);
})
/*
......@@ -168,8 +173,9 @@ describe('ActsAmsCallBackFirstScene', function () {
expect(typeof (info[i].missionDescription.label)).assertEqual("string");
expect(typeof (info[i].missionDescription.iconPath)).assertEqual("string");
}
done();
});
done();
setTimeout(timeout, 5000);
})
/*
......@@ -214,8 +220,9 @@ describe('ActsAmsCallBackFirstScene', function () {
expect(typeof (info[i].missionDescription.label)).assertEqual("string");
expect(typeof (info[i].missionDescription.iconPath)).assertEqual("string");
}
done();
});
done();
setTimeout(timeout, 5000);
})
/*
......@@ -231,8 +238,9 @@ describe('ActsAmsCallBackFirstScene', function () {
console.info('Acts_Ams_test_0800 removeMission error.code \
' + error.code + ',data [' + info + ']');
expect(info).assertLarger(0);
done();
});
done();
setTimeout(timeout, 5000);
})
/*
......@@ -248,8 +256,9 @@ describe('ActsAmsCallBackFirstScene', function () {
console.info('Acts_Ams_test_1200 moveMissionToTop error.code \
' + error.code + ',data [' + info + ']');
expect(info).assertEqual(0);
done();
});
done();
setTimeout(timeout, 5000);
})
/*
......@@ -265,8 +274,9 @@ describe('ActsAmsCallBackFirstScene', function () {
console.info('Acts_Ams_test_1400 removeMissions error.code \
' + error.code + ',data [' + info + ']');
expect(info).assertLarger(0);
done();
});
done();
setTimeout(timeout, 5000);
})
/*
......@@ -280,8 +290,9 @@ describe('ActsAmsCallBackFirstScene', function () {
console.info('Acts_Ams_test_1000 clearMissions error.code \
' + error.code + ',data [' + info + ']');
expect(info).assertLarger(0);
done();
});
done();
setTimeout(timeout, 5000);
})
/*
......@@ -295,8 +306,9 @@ describe('ActsAmsCallBackFirstScene', function () {
console.info('Acts_Ams_test_1600 killProcessesByBundleName error.code: \
' + error.code + ',data [' + info + ']');
expect(info).assertEqual(0);
done();
});
done();
setTimeout(timeout, 5000);
})
})
......
......@@ -17,7 +17,7 @@ ohos_hap("simulateEAbility") {
hap_name = "simulateEAbility"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
......
......@@ -17,7 +17,7 @@ ohos_hap("simulateFAbilityFir") {
hap_name = "simulateFAbilityFir"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
......
......@@ -17,7 +17,7 @@ ohos_hap("simulateFAbilitySed") {
hap_name = "simulateFAbilitySed"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
......
......@@ -17,7 +17,7 @@ ohos_hap("verifyAAbility") {
hap_name = "verifyAAbility"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
......
......@@ -17,7 +17,7 @@ ohos_hap("verifyIAbility") {
hap_name = "verifyIAbility"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
......
......@@ -16,7 +16,8 @@ ohos_hap("Defpermission") {
hap_profile = "./src/main/config.json"
hap_name = "Defpermission"
subsystem_name = XTS_SUITENAME
final_hap_path = "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
......
......@@ -17,7 +17,7 @@ ohos_hap("FinishWithResultEmptyTest") {
hap_name = "FinishWithResultEmptyTest"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
......
......@@ -17,7 +17,7 @@ ohos_hap("FinishWithResultPromiseParametersTest") {
hap_name = "FinishWithResultPromiseParametersTest"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
......
......@@ -17,7 +17,7 @@ ohos_hap("FinishWithResultTest") {
hap_name = "FinishWithResultTest"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
......
......@@ -17,7 +17,7 @@ ohos_hap("GetCallingBundlePromiseTest") {
hap_name = "GetCallingBundlePromiseTest"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
......
......@@ -17,7 +17,7 @@ ohos_hap("StartAbility") {
hap_name = "StartAbility"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
......
......@@ -17,7 +17,7 @@ ohos_hap("StartAbilityForResult") {
hap_name = "StartAbilityForResult"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
......
......@@ -17,7 +17,7 @@ ohos_hap("TerminateAbilityTest") {
hap_name = "TerminateAbilityTest"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
......
......@@ -17,7 +17,7 @@ ohos_hap("ActsGetWantAllTestHap") {
hap_name = "ActsGetWantAllTestHap"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
......
......@@ -17,7 +17,7 @@ ohos_hap("bmsJstest8") {
hap_name = "bmsJstest8"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
......
......@@ -17,7 +17,7 @@ ohos_hap("bmsJstest5") {
hap_name = "bmsJstest5"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
......
......@@ -17,7 +17,7 @@ ohos_hap("bmsJstest4") {
hap_name = "bmsJstest4"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
......
......@@ -17,7 +17,7 @@ ohos_hap("bmsJstest9") {
hap_name = "bmsJstest9"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
......
......@@ -17,7 +17,7 @@ ohos_hap("bmsJstest1") {
hap_name = "bmsJstest1"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
......
......@@ -17,7 +17,7 @@ ohos_hap("bmsJstest7") {
hap_name = "bmsJstest7"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
......
......@@ -17,7 +17,7 @@ ohos_hap("bmsJstest6") {
hap_name = "bmsJstest6"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
......
......@@ -17,7 +17,7 @@ ohos_hap("bmsJstest3") {
hap_name = "bmsJstest3"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
......
......@@ -17,7 +17,7 @@ ohos_hap("bmsJstest2") {
hap_name = "bmsJstest2"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册