提交 2229bc5e 编写于 作者: H hu0475

修改测试套名称,注释

Signed-off-by: Nhu0475 <huyanqiang5@huawei.com>
......@@ -18,8 +18,8 @@ group("ability") {
if (is_standard_system) {
deps = [
"ability_runtime:ability_runtime",
"crossplatform:ability_crossplatform",
"dmsfwk:dmsfwk",
"crossplatform:ability_crossplatform"
]
}
}
......@@ -16,8 +16,6 @@ import("//build/ohos_var.gni")
group("ability_crossplatform") {
testonly = true
if (is_standard_system) {
deps = [
"ability_runtime:ability_crossplatform_runtime",
]
deps = [ "ability_runtime:ability_crossplatform_runtime" ]
}
}
......@@ -6,10 +6,10 @@
"versionName": "1.0.0",
"icon": "$media:app_icon",
"label": "$string:app_name",
"minAPIVersion": 9,
"targetAPIVersion": 9,
"minAPIVersion": 10,
"targetAPIVersion": 10,
"car": {
"apiCompatibleVersion": 9,
"apiCompatibleVersion": 10,
"singleUser": false
}
}
......
......@@ -21,6 +21,7 @@ ohos_hap_assist_suite("ActsLifeCycleEtsFeatureTest") {
]
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
# hap_name: HAP的名字,可选,默认为目标名
hap_name = "ActsLifeCycleEtsFeatureTest"
subsystem_name = "ability"
......@@ -29,6 +30,7 @@ ohos_hap_assist_suite("ActsLifeCycleEtsFeatureTest") {
ohos_app_scope("windowStage_app_profile") {
# app_profile: HAP的AppScope中的app.json,只在Stage模型下使用
app_profile = "AppScope/app.json"
# sources: 资源文件路径
sources = [ "AppScope/resources" ]
}
......@@ -39,8 +41,10 @@ ohos_js_assets("windowStage_js_assets") {
ohos_resources("windowStage_resources") {
# sources: 资源文件路径
sources = [ "src/main/resources" ]
# deps: 当前目标的依赖
deps = [ ":windowStage_app_profile" ]
# hap_profile: HAP的config.json,Stage模型对应module.json
hap_profile = "src/main/module.json"
}
\ No newline at end of file
}
......@@ -6,10 +6,10 @@
"versionName": "1.0.0",
"icon": "$media:app_icon",
"label": "$string:app_name",
"minAPIVersion": 9,
"targetAPIVersion": 9,
"minAPIVersion": 10,
"targetAPIVersion": 10,
"car": {
"apiCompatibleVersion": 9,
"apiCompatibleVersion": 10,
"singleUser": false
}
}
......
......@@ -21,6 +21,7 @@ ohos_js_hap_suite("ActsLifeCycleEtsTest") {
]
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
# hap_name: HAP的名字,可选,默认为目标名
hap_name = "ActsLifeCycleEtsTest"
subsystem_name = "ability"
......@@ -29,6 +30,7 @@ ohos_js_hap_suite("ActsLifeCycleEtsTest") {
ohos_app_scope("windowStage_app_profile") {
# app_profile: HAP的AppScope中的app.json,只在Stage模型下使用
app_profile = "AppScope/app.json"
# sources: 资源文件路径
sources = [ "AppScope/resources" ]
}
......@@ -39,8 +41,10 @@ ohos_js_assets("windowStage_js_assets") {
ohos_resources("windowStage_resources") {
# sources: 资源文件路径
sources = [ "src/main/resources" ]
# deps: 当前目标的依赖
deps = [ ":windowStage_app_profile" ]
# hap_profile: HAP的config.json,Stage模型对应module.json
hap_profile = "src/main/module.json"
}
\ No newline at end of file
}
......@@ -21,6 +21,7 @@ ohos_js_hap_suite("ActsUiAbilityEtsTest") {
]
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
# hap_name: HAP的名字,可选,默认为目标名
hap_name = "ActsUiAbilityEtsTest"
subsystem_name = "ability"
......@@ -29,6 +30,7 @@ ohos_js_hap_suite("ActsUiAbilityEtsTest") {
ohos_app_scope("windowStage_app_profile") {
# app_profile: HAP的AppScope中的app.json,只在Stage模型下使用
app_profile = "AppScope/app.json"
# sources: 资源文件路径
sources = [ "AppScope/resources" ]
}
......@@ -39,8 +41,10 @@ ohos_js_assets("windowStage_js_assets") {
ohos_resources("windowStage_resources") {
# sources: 资源文件路径
sources = [ "src/main/resources" ]
# deps: 当前目标的依赖
deps = [ ":windowStage_app_profile" ]
# hap_profile: HAP的config.json,Stage模型对应module.json
hap_profile = "src/main/module.json"
}
\ No newline at end of file
}
......@@ -48,13 +48,13 @@ export default function abilityTest() {
/**
*@tc.number : UI_ABILITY_CONTEXT_TEST_0001
*@tc.name : UIAbilityContextTest_0001
*@tc.name : UI_Ability_Context_Test_0001
*@tc.desc : Test context.
*@tc.size : MediumTest
*@tc.type : Function
*@tc.level : Level 1
*/
it("UIAbilityContextTest_0001", 0, async (done) => {
it("UI_Ability_Context_Test_0001", 0, async (done) => {
console.log("------------UI_ABILITY_CONTEXT_TEST_0001 START-------------");
TAG = "UI_ABILITY_CONTEXT_TEST_0001";
expect(globalThis.abilityContext != null).assertTrue();
......@@ -63,13 +63,13 @@ export default function abilityTest() {
/**
*@tc.number : UI_ABILITY_CONTEXT_TEST_0002
*@tc.name : UIAbilityContextTest_0002
*@tc.name : UI_Ability_Context_Test_0002
*@tc.desc : Test context.
*@tc.size : MediumTest
*@tc.type : Function
*@tc.level : Level 1
*/
it("UIAbilityContextTest_0002", 0, async (done) => {
it("UI_Ability_Context_Test_0002", 0, async (done) => {
console.log("------------UI_ABILITY_CONTEXT_TEST_0002 START-------------");
TAG = "UI_ABILITY_CONTEXT_TEST_0002";
expect(globalThis.abilityContext != null).assertTrue();
......@@ -95,13 +95,13 @@ export default function abilityTest() {
/**
*@tc.number : UI_ABILITY_LIFE_CYCLE_TEST_0001
*@tc.name : UIAbilityLifeCycleTest0001
*@tc.name : UI_Ability_Life_Cycle_Test_0001
*@tc.desc : Only start 'MainAbility2', MainAbility2 will terminate self after 1.5 seconds.
*@tc.size : MediumTest
*@tc.type : Function
*@tc.level : Level 1
*/
it("UIAbilityLifeCycleTest0001", 0, async (done) => {
it("UI_Ability_Life_Cycle_Test_0001", 0, async (done) => {
console.log("------------UI_ABILITY_LIFE_CYCLE_TEST_0001 START-------------");
TAG = "UI_ABILITY_LIFE_CYCLE_TEST_0001";
......@@ -136,13 +136,13 @@ export default function abilityTest() {
/**
*@tc.number : UI_ABILITY_LIFE_CYCLE_TEST_0002
*@tc.name : UIAbilityLifeCycleTest0002
*@tc.name : UI_Ability_Life_Cycle_Test_0002
*@tc.desc : Only start 'MainAbility1'
*@tc.size : MediumTest
*@tc.type : Function
*@tc.level : Level 1
*/
it("UIAbilityLifeCycleTest0002", 0, async (done) => {
it("UI_Ability_Life_Cycle_Test_0002", 0, async (done) => {
console.log("------------UI_ABILITY_LIFE_CYCLE_TEST_0002 START-------------");
TAG = "UI_ABILITY_LIFE_CYCLE_TEST_0002";
......@@ -179,13 +179,13 @@ export default function abilityTest() {
/**
*@tc.number : UI_ABILITY_LIFE_CYCLE_TEST_0003
*@tc.name : UIAbilityLifeCycleTest0003
*@tc.name : UI_Ability_Life_Cycle_Test_0003
*@tc.desc : start 'MainAbility2', after MainAbility2 terminated, start MainAbility1, after 2 seconds, terminate MainAbility1.
*@tc.size : MediumTest
*@tc.type : Function
*@tc.level : Level 1
*/
it("UIAbilityLifeCycleTest0003", 0, async (done) => {
it("UI_Ability_Life_Cycle_Test_0003", 0, async (done) => {
console.log("------------UI_ABILITY_LIFE_CYCLE_TEST_0003 START-------------");
TAG = "UI_ABILITY_LIFE_CYCLE_TEST_0003";
......@@ -246,14 +246,14 @@ export default function abilityTest() {
/**
*@tc.number : UI_ABILITY_LIFE_CYCLE_TEST_0004
*@tc.name : UIAbilityLifeCycleTest0004
*@tc.name : UI_Ability_Life_Cycle_Test_0004
*@tc.desc : start mainability1, after 1.5 seconds, start mainability2, after 1.5 seconds, mainability2 terminated.
after 1 seconds, terminate mainability1.
*@tc.size : MediumTest
*@tc.type : Function
*@tc.level : Level 1
*/
it("UIAbilityLifeCycleTest0004", 0, async (done) => {
it("UI_Ability_Life_Cycle_Test_0004", 0, async (done) => {
console.log("------------UI_ABILITY_LIFE_CYCLE_TEST_0004 START-------------");
TAG = "UI_ABILITY_LIFE_CYCLE_TEST_0004";
......@@ -328,13 +328,13 @@ export default function abilityTest() {
/**
*@tc.number : UI_ABILITY_LIFE_CYCLE_TEST_0005
*@tc.name : UIAbilityLifeCycleTest0005
*@tc.name : UI_Ability_Life_Cycle_Test_0005
*@tc.desc : start mainability1, after 1seconds, start other app mainability.
*@tc.size : MediumTest
*@tc.type : Function
*@tc.level : Level 1
*/
it("UIAbilityLifeCycleTest0005", 0, async (done) => {
it("UI_Ability_Life_Cycle_Test_0005", 0, async (done) => {
console.log("------------UI_ABILITY_LIFE_CYCLE_TEST_0005 START-------------");
TAG = "UI_ABILITY_LIFE_CYCLE_TEST_0005";
......@@ -384,13 +384,13 @@ export default function abilityTest() {
/**
*@tc.number : UI_ABILITY_LIFE_CYCLE_TEST_0006
*@tc.name : UIAbilityLifeCycleTest0006
*@tc.name : UI_Ability_Life_Cycle_Test_0006
*@tc.desc : start mainability3, after start mainability3 twice, mainability3 is a standard ability.
*@tc.size : MediumTest
*@tc.type : Function
*@tc.level : Level 1
*/
it("UIAbilityLifeCycleTest0006", 0, async (done) => {
it("UI_Ability_Life_Cycle_Test_0006", 0, async (done) => {
console.log("------------UI_ABILITY_LIFE_CYCLE_TEST_0006 START-------------");
TAG = "UI_ABILITY_LIFE_CYCLE_TEST_0006";
......@@ -412,7 +412,6 @@ export default function abilityTest() {
const result1 = globalThis.list3;
console.info(TAG + "result1: " + JSON.stringify(result1));
// ["MainAbility3 onCreate","MainAbility3 onWindowStageCreate","MainAbility3 onForeground"]
expect(result1[0]).assertEqual("MainAbility3 onCreate");
expect(result1[1]).assertEqual("MainAbility3 onWindowStageCreate");
......@@ -429,7 +428,6 @@ export default function abilityTest() {
await sleep(1000);
const result2 = globalThis.list3;
// ["MainAbility3 onCreate","MainAbility3 onWindowStageCreate","MainAbility3 onForeground","MainAbility3 onBackground"]
console.info(TAG + "result2: " + JSON.stringify(result2));
expect(result2[0]).assertEqual("MainAbility3 onCreate");
expect(result2[1]).assertEqual("MainAbility3 onWindowStageCreate");
......@@ -440,60 +438,17 @@ export default function abilityTest() {
done();
});
// /**
// *@tc.number : UI_ABILITY_LIFE_CYCLE_TEST_0007
// *@tc.name : UIAbilityLifeCycleTest0007
// *@tc.desc : start mainability1, after start mainability1 twice, mainability1 is a single ability.
// *@tc.size : MediumTest
// *@tc.type : Function
// *@tc.level : Level 1
// */
// it('UI_ABILITY_LIFE_CYCLE_TEST_0007',0, async (done) => {
// console.log("------------UI_ABILITY_LIFE_CYCLE_TEST_0007 START-------------");
// TAG = "UI_ABILITY_LIFE_CYCLE_TEST_0007";
// var want = {
// "bundleName": "com.example.uiabilitylifecycle",
// "abilityName": "MainAbility1",
// "moduleName": moduleName
// }
// await globalThis.abilityContext.startAbility(want)
// .then((data) => {
// console.info(TAG + ' start successful. Data: ' + data);
// }).catch((error) => {
// console.error(TAG + ' start failed. Cause: ' + JSON.stringify(error));
// })
// await sleep(2000);
// globalThis.abilityContext.startAbility(want)
// .then((data) => {
// console.info(TAG + ' start successful. Data: ' + data);
// }).catch((error) => {
// console.error(TAG + ' start failed. Cause: ' + JSON.stringify(error));
// })
// await sleep(2000);
// const result = globalThis.onNewWantStr;
// console.info(TAG + 'result: ' + JSON.stringify(result));
// expect(result).assertEqual('MainAbility1 onNewWant');
// globalThis.ability1context.terminateSelf();
// await sleep(500);
// done();
// })
/**
*@tc.number : UIAbilityConstantTest0100
*@tc.name : UIAbilityConstantTest0100
*@tc.number : UI_Ability_Constant_Test_0100
*@tc.name : UI_Ability_Constant_Test_0100
*@tc.desc : start mainability1, check ability constant.
*@tc.size : MediumTest
*@tc.type : Function
*@tc.level : Level 1
*/
it("UIAbilityConstantTest0100", 0, async (done) => {
console.log("------------UIAbilityConstantTest0100 START-------------");
TAG = "UIAbilityConstantTest0100";
it("UI_Ability_Constant_Test_0100", 0, async (done) => {
console.log("------------UI_Ability_Constant_Test_0100 START-------------");
TAG = "UI_Ability_Constant_Test_0100";
var want = {
bundleName: "com.example.uiabilitylifecycle",
......@@ -511,7 +466,7 @@ export default function abilityTest() {
await sleep(1000);
console.log('UIAbilityConstantTest0100:' + globalThis.launchParam1.lastExitReason)
console.log('UI_Ability_Constant_Test_0100:' + globalThis.launchParam1.lastExitReason)
expect(globalThis.launchParam1.launchReason == 1).assertTrue();
expect(globalThis.launchParam1.lastExitReason == 2).assertTrue();
expect(aConstant.LaunchReason.UNKNOWN == 0).assertTrue();
......
......@@ -20,7 +20,7 @@ group("ability_crossplatform_runtime") {
"ActsLifeCycleEtsFeatureTest:ActsLifeCycleEtsFeatureTest",
"ActsLifeCycleEtsTest:ActsLifeCycleEtsTest",
"ActsUiAbilityEtsTest:ActsUiAbilityEtsTest",
"commonTestAbilityApp:commonTestAbilityApp"
"commonTestAbilityApp:commonTestAbilityApp",
]
}
}
......@@ -21,6 +21,7 @@ ohos_hap_assist_suite("commonTestAbilityApp") {
]
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
# hap_name: HAP的名字,可选,默认为目标名
hap_name = "commonTestAbilityApp"
subsystem_name = "ability"
......@@ -29,6 +30,7 @@ ohos_hap_assist_suite("commonTestAbilityApp") {
ohos_app_scope("windowStage_app_profile") {
# app_profile: HAP的AppScope中的app.json,只在Stage模型下使用
app_profile = "AppScope/app.json"
# sources: 资源文件路径
sources = [ "AppScope/resources" ]
}
......@@ -39,8 +41,10 @@ ohos_js_assets("windowStage_js_assets") {
ohos_resources("windowStage_resources") {
# sources: 资源文件路径
sources = [ "src/main/resources" ]
# deps: 当前目标的依赖
deps = [ ":windowStage_app_profile" ]
# hap_profile: HAP的config.json,Stage模型对应module.json
hap_profile = "src/main/module.json"
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册