Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
2229bc5e
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看板
提交
2229bc5e
编写于
7月 13, 2023
作者:
H
hu0475
浏览文件
操作
浏览文件
下载
差异文件
修改测试套名称,注释
Signed-off-by:
N
hu0475
<
huyanqiang5@huawei.com
>
上级
2e8a82a8
bb5e1f3e
变更
11
展开全部
隐藏空白更改
内联
并排
Showing
11 changed file
with
155 addition
and
340 deletion
+155
-340
ability/BUILD.gn
ability/BUILD.gn
+1
-1
ability/crossplatform/BUILD.gn
ability/crossplatform/BUILD.gn
+1
-3
ability/crossplatform/ability_runtime/ActsLifeCycleEtsFeatureTest/AppScope/app.json
...ity_runtime/ActsLifeCycleEtsFeatureTest/AppScope/app.json
+3
-3
ability/crossplatform/ability_runtime/ActsLifeCycleEtsFeatureTest/BUILD.gn
...form/ability_runtime/ActsLifeCycleEtsFeatureTest/BUILD.gn
+5
-1
ability/crossplatform/ability_runtime/ActsLifeCycleEtsTest/AppScope/app.json
...rm/ability_runtime/ActsLifeCycleEtsTest/AppScope/app.json
+3
-3
ability/crossplatform/ability_runtime/ActsLifeCycleEtsTest/BUILD.gn
...ossplatform/ability_runtime/ActsLifeCycleEtsTest/BUILD.gn
+5
-1
ability/crossplatform/ability_runtime/ActsLifeCycleEtsTest/src/main/ets/test/LifeCycleTest.test.ets
...LifeCycleEtsTest/src/main/ets/test/LifeCycleTest.test.ets
+104
-258
ability/crossplatform/ability_runtime/ActsUiAbilityEtsTest/BUILD.gn
...ossplatform/ability_runtime/ActsUiAbilityEtsTest/BUILD.gn
+5
-1
ability/crossplatform/ability_runtime/ActsUiAbilityEtsTest/src/main/ets/test/abilityLifeCycle.test.ets
...bilityEtsTest/src/main/ets/test/abilityLifeCycle.test.ets
+22
-67
ability/crossplatform/ability_runtime/BUILD.gn
ability/crossplatform/ability_runtime/BUILD.gn
+1
-1
ability/crossplatform/ability_runtime/commonTestAbilityApp/BUILD.gn
...ossplatform/ability_runtime/commonTestAbilityApp/BUILD.gn
+5
-1
未找到文件。
ability/BUILD.gn
浏览文件 @
2229bc5e
...
...
@@ -18,8 +18,8 @@ group("ability") {
if (is_standard_system) {
deps = [
"ability_runtime:ability_runtime",
"crossplatform:ability_crossplatform",
"dmsfwk:dmsfwk",
"crossplatform:ability_crossplatform"
]
}
}
ability/crossplatform/BUILD.gn
浏览文件 @
2229bc5e
...
...
@@ -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" ]
}
}
ability/crossplatform/ability_runtime/ActsLifeCycleEtsFeatureTest/AppScope/app.json
浏览文件 @
2229bc5e
...
...
@@ -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
}
}
...
...
ability/crossplatform/ability_runtime/ActsLifeCycleEtsFeatureTest/BUILD.gn
浏览文件 @
2229bc5e
...
...
@@ -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
}
ability/crossplatform/ability_runtime/ActsLifeCycleEtsTest/AppScope/app.json
浏览文件 @
2229bc5e
...
...
@@ -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
}
}
...
...
ability/crossplatform/ability_runtime/ActsLifeCycleEtsTest/BUILD.gn
浏览文件 @
2229bc5e
...
...
@@ -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
}
ability/crossplatform/ability_runtime/ActsLifeCycleEtsTest/src/main/ets/test/LifeCycleTest.test.ets
浏览文件 @
2229bc5e
此差异已折叠。
点击以展开。
ability/crossplatform/ability_runtime/ActsUiAbilityEtsTest/BUILD.gn
浏览文件 @
2229bc5e
...
...
@@ -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
}
ability/crossplatform/ability_runtime/ActsUiAbilityEtsTest/src/main/ets/test/abilityLifeCycle.test.ets
浏览文件 @
2229bc5e
...
...
@@ -48,13 +48,13 @@ export default function abilityTest() {
/**
*@tc.number : UI_ABILITY_CONTEXT_TEST_0001
*@tc.name : UI
AbilityContext
Test_0001
*@tc.name : UI
_Ability_Context_
Test_0001
*@tc.desc : Test context.
*@tc.size : MediumTest
*@tc.type : Function
*@tc.level : Level 1
*/
it("UI
AbilityContext
Test_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 : UI
AbilityContext
Test_0002
*@tc.name : UI
_Ability_Context_
Test_0002
*@tc.desc : Test context.
*@tc.size : MediumTest
*@tc.type : Function
*@tc.level : Level 1
*/
it("UI
AbilityContext
Test_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 : UI
AbilityLifeCycleTest
0001
*@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("UI
AbilityLifeCycleTest
0001", 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 : UI
AbilityLifeCycleTest
0002
*@tc.name : UI
_Ability_Life_Cycle_Test_
0002
*@tc.desc : Only start 'MainAbility1'
*@tc.size : MediumTest
*@tc.type : Function
*@tc.level : Level 1
*/
it("UI
AbilityLifeCycleTest
0002", 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 : UI
AbilityLifeCycleTest
0003
*@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("UI
AbilityLifeCycleTest
0003", 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 : UI
AbilityLifeCycleTest
0004
*@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("UI
AbilityLifeCycleTest
0004", 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 : UI
AbilityLifeCycleTest
0005
*@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("UI
AbilityLifeCycleTest
0005", 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 : UI
AbilityLifeCycleTest
0006
*@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("UI
AbilityLifeCycleTest
0006", 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 : UI
AbilityConstantTest
0100
*@tc.name : UI
AbilityConstantTest
0100
*@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("UI
AbilityConstantTest
0100", 0, async (done) => {
console.log("------------UI
AbilityConstantTest
0100 START-------------");
TAG = "UI
AbilityConstantTest
0100";
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('UI
AbilityConstantTest
0100:' + 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();
...
...
ability/crossplatform/ability_runtime/BUILD.gn
浏览文件 @
2229bc5e
...
...
@@ -20,7 +20,7 @@ group("ability_crossplatform_runtime") {
"ActsLifeCycleEtsFeatureTest:ActsLifeCycleEtsFeatureTest",
"ActsLifeCycleEtsTest:ActsLifeCycleEtsTest",
"ActsUiAbilityEtsTest:ActsUiAbilityEtsTest",
"commonTestAbilityApp:commonTestAbilityApp"
"commonTestAbilityApp:commonTestAbilityApp"
,
]
}
}
ability/crossplatform/ability_runtime/commonTestAbilityApp/BUILD.gn
浏览文件 @
2229bc5e
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录