未验证 提交 0e1bf525 编写于 作者: O openharmony_ci 提交者: Gitee

!5619 XTS-ActsAmsProcessMultiinstanceTest测试套用例优化

Merge pull request !5619 from chengxingzhen/master
...@@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from ...@@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from
import commonEvent from '@ohos.commonEvent' import commonEvent from '@ohos.commonEvent'
import abilityManager from '@ohos.application.abilityManager'; import abilityManager from '@ohos.application.abilityManager';
import appManager from '@ohos.application.appManager' import appManager from '@ohos.application.appManager'
import missionManager from '@ohos.application.missionManager'
const TIMEOUT = 1000; const TIMEOUT = 1000;
var subscriberInfo = { var subscriberInfo = {
...@@ -35,6 +34,9 @@ var processNameA = "com.example.multiinstancehapa"; ...@@ -35,6 +34,9 @@ var processNameA = "com.example.multiinstancehapa";
var processNameB = "com.example.multiinstancehapb"; var processNameB = "com.example.multiinstancehapb";
var processNameC = "com.example.multiinstancehapc"; var processNameC = "com.example.multiinstancehapc";
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
export default function abilityTest() { export default function abilityTest() {
describe('ActsProcessMultiInstanceTest', function () { describe('ActsProcessMultiInstanceTest', function () {
...@@ -151,6 +153,7 @@ export default function abilityTest() { ...@@ -151,6 +153,7 @@ export default function abilityTest() {
done(); done();
} }
} }
await sleep(500)
globalThis.abilityContext.startAbility({ globalThis.abilityContext.startAbility({
bundleName: "com.example.multiinstancehapb", bundleName: "com.example.multiinstancehapb",
abilityName: "com.example.multiinstancehapba.MainAbility", abilityName: "com.example.multiinstancehapba.MainAbility",
...@@ -158,6 +161,7 @@ export default function abilityTest() { ...@@ -158,6 +161,7 @@ export default function abilityTest() {
console.log('ACTS_Process_MultiInstance_0100 - startAbilityhapba: ' console.log('ACTS_Process_MultiInstance_0100 - startAbilityhapba: '
+ JSON.stringify(err) + ", " + JSON.stringify(data)) + JSON.stringify(err) + ", " + JSON.stringify(data))
}) })
await sleep(500)
globalThis.abilityContext.startAbility({ globalThis.abilityContext.startAbility({
bundleName: "com.example.multiinstancehapb", bundleName: "com.example.multiinstancehapb",
abilityName: "com.example.multiinstancehapbb.MainAbility", abilityName: "com.example.multiinstancehapbb.MainAbility",
...@@ -260,6 +264,7 @@ export default function abilityTest() { ...@@ -260,6 +264,7 @@ export default function abilityTest() {
done(); done();
} }
} }
await sleep(500)
globalThis.abilityContext.startAbility({ globalThis.abilityContext.startAbility({
bundleName: "com.example.multiinstancehapb", bundleName: "com.example.multiinstancehapb",
abilityName: "com.example.multiinstancehapbc.MainAbility", abilityName: "com.example.multiinstancehapbc.MainAbility",
...@@ -267,6 +272,7 @@ export default function abilityTest() { ...@@ -267,6 +272,7 @@ export default function abilityTest() {
console.log('ACTS_Process_MultiInstance_0200 - startAbilityhapbc: ' console.log('ACTS_Process_MultiInstance_0200 - startAbilityhapbc: '
+ JSON.stringify(err) + ", " + JSON.stringify(data)) + JSON.stringify(err) + ", " + JSON.stringify(data))
}) })
await sleep(500)
globalThis.abilityContext.startAbility({ globalThis.abilityContext.startAbility({
bundleName: "com.example.multiinstancehapb", bundleName: "com.example.multiinstancehapb",
abilityName: "com.example.multiinstancehapbd.MainAbility", abilityName: "com.example.multiinstancehapbd.MainAbility",
...@@ -374,6 +380,7 @@ export default function abilityTest() { ...@@ -374,6 +380,7 @@ export default function abilityTest() {
done(); done();
} }
} }
await sleep(500)
globalThis.abilityContext.startAbility({ globalThis.abilityContext.startAbility({
bundleName: "com.example.multiinstancehapb", bundleName: "com.example.multiinstancehapb",
abilityName: "com.example.multiinstancehapbd.MainAbility", abilityName: "com.example.multiinstancehapbd.MainAbility",
...@@ -381,6 +388,7 @@ export default function abilityTest() { ...@@ -381,6 +388,7 @@ export default function abilityTest() {
console.log('ACTS_Process_MultiInstance_0300 - startAbilityhapbd: ' console.log('ACTS_Process_MultiInstance_0300 - startAbilityhapbd: '
+ JSON.stringify(err) + ", " + JSON.stringify(data)) + JSON.stringify(err) + ", " + JSON.stringify(data))
}) })
await sleep(500)
globalThis.abilityContext.startAbility({ globalThis.abilityContext.startAbility({
bundleName: "com.example.multiinstancehapb", bundleName: "com.example.multiinstancehapb",
abilityName: "com.example.multiinstancehapbe.MainAbility", abilityName: "com.example.multiinstancehapbe.MainAbility",
...@@ -485,6 +493,7 @@ export default function abilityTest() { ...@@ -485,6 +493,7 @@ export default function abilityTest() {
done(); done();
} }
} }
await sleep(500)
globalThis.abilityContext.startAbility({ globalThis.abilityContext.startAbility({
bundleName: "com.example.multiinstancehapb", bundleName: "com.example.multiinstancehapb",
abilityName: "com.example.multiinstancehapba.MainAbility", abilityName: "com.example.multiinstancehapba.MainAbility",
...@@ -492,6 +501,7 @@ export default function abilityTest() { ...@@ -492,6 +501,7 @@ export default function abilityTest() {
console.log('ACTS_Process_MultiInstance_0400 - startAbilityhapba: ' console.log('ACTS_Process_MultiInstance_0400 - startAbilityhapba: '
+ JSON.stringify(err) + ", " + JSON.stringify(data)) + JSON.stringify(err) + ", " + JSON.stringify(data))
}) })
await sleep(500)
globalThis.abilityContext.startAbility({ globalThis.abilityContext.startAbility({
bundleName: "com.example.multiinstancehapb", bundleName: "com.example.multiinstancehapb",
abilityName: "com.example.multiinstancehapbf.MainAbility", abilityName: "com.example.multiinstancehapbf.MainAbility",
...@@ -596,6 +606,7 @@ export default function abilityTest() { ...@@ -596,6 +606,7 @@ export default function abilityTest() {
done(); done();
} }
} }
await sleep(500)
globalThis.abilityContext.startAbility({ globalThis.abilityContext.startAbility({
bundleName: "com.example.multiinstancehapa", bundleName: "com.example.multiinstancehapa",
abilityName: "com.example.multiinstancehapaa.MainAbility", abilityName: "com.example.multiinstancehapaa.MainAbility",
...@@ -603,6 +614,7 @@ export default function abilityTest() { ...@@ -603,6 +614,7 @@ export default function abilityTest() {
console.log('ACTS_Process_MultiInstance_0500 - startAbilityhapaa: ' console.log('ACTS_Process_MultiInstance_0500 - startAbilityhapaa: '
+ JSON.stringify(err) + ", " + JSON.stringify(data)) + JSON.stringify(err) + ", " + JSON.stringify(data))
}) })
await sleep(500)
globalThis.abilityContext.startAbility({ globalThis.abilityContext.startAbility({
bundleName: "com.example.multiinstancehapb", bundleName: "com.example.multiinstancehapb",
abilityName: "com.example.multiinstancehapbe.MainAbility", abilityName: "com.example.multiinstancehapbe.MainAbility",
...@@ -710,6 +722,7 @@ export default function abilityTest() { ...@@ -710,6 +722,7 @@ export default function abilityTest() {
done(); done();
} }
} }
await sleep(500)
globalThis.abilityContext.startAbility({ globalThis.abilityContext.startAbility({
bundleName: "com.example.multiinstancehapa", bundleName: "com.example.multiinstancehapa",
abilityName: "com.example.multiinstancehapaa.MainAbility", abilityName: "com.example.multiinstancehapaa.MainAbility",
...@@ -717,6 +730,7 @@ export default function abilityTest() { ...@@ -717,6 +730,7 @@ export default function abilityTest() {
console.log('ACTS_Process_MultiInstance_0600 - startAbilityhapaa: ' console.log('ACTS_Process_MultiInstance_0600 - startAbilityhapaa: '
+ JSON.stringify(err) + ", " + JSON.stringify(data)) + JSON.stringify(err) + ", " + JSON.stringify(data))
}) })
await sleep(500)
globalThis.abilityContext.startAbility({ globalThis.abilityContext.startAbility({
bundleName: "com.example.multiinstancehapb", bundleName: "com.example.multiinstancehapb",
abilityName: "com.example.multiinstancehapbf.MainAbility", abilityName: "com.example.multiinstancehapbf.MainAbility",
...@@ -823,6 +837,7 @@ export default function abilityTest() { ...@@ -823,6 +837,7 @@ export default function abilityTest() {
done(); done();
} }
} }
await sleep(500)
globalThis.abilityContext.startAbility({ globalThis.abilityContext.startAbility({
bundleName: "com.example.multiinstancehapa", bundleName: "com.example.multiinstancehapa",
abilityName: "com.example.multiinstancehapab.MainAbility", abilityName: "com.example.multiinstancehapab.MainAbility",
...@@ -830,6 +845,7 @@ export default function abilityTest() { ...@@ -830,6 +845,7 @@ export default function abilityTest() {
console.log('ACTS_Process_MultiInstance_0700 - startAbilityhapab: ' console.log('ACTS_Process_MultiInstance_0700 - startAbilityhapab: '
+ JSON.stringify(err) + ", " + JSON.stringify(data)) + JSON.stringify(err) + ", " + JSON.stringify(data))
}) })
await sleep(500)
globalThis.abilityContext.startAbility({ globalThis.abilityContext.startAbility({
bundleName: "com.example.multiinstancehapb", bundleName: "com.example.multiinstancehapb",
abilityName: "com.example.multiinstancehapbc.MainAbility", abilityName: "com.example.multiinstancehapbc.MainAbility",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册