提交 8665f74c 编写于 作者: C caochuan

Merge remote-tracking branch 'hw/master' into increamentalsource

......@@ -343,9 +343,22 @@ OpenHarmony支持如下几种系统类型:
}
```
5. 测试套件编译命令。
5. 测试套件编译命令_两种编译方式
随版本编译,debug版本编译时会同步编译acts测试套件
方式一:
```
./test/xts/tools/lite/build.sh product=wifiiot xts=acts
```
方式二:
```
hb set
选择 设备类型
hb build --gn-args build_xts=true
(注):若不追加--gn-args build_xts=true,不会编译acts测试套件。
```
>![](figures/icon-note.gif) **说明:**
>acts测试套件编译中间件为静态库,最终链接到版本镜像中 。
......@@ -447,7 +460,7 @@ OpenHarmony支持如下几种系统类型:
sources = [
"src/TestDemo.cpp"
]
include_dirs = [
"src",
...
......@@ -457,7 +470,7 @@ OpenHarmony支持如下几种系统类型:
]
cflags = [ "-Wno-error" ]
}
```
4. acts目录下增加编译选项(BUILD.gn)样例:
......@@ -476,9 +489,31 @@ OpenHarmony支持如下几种系统类型:
}
```
5. 测试套件编译命令。
5. 测试套件编译命令_两种编译方式。
L1_LiteOS:
```
方式一:
python3 build.py -p ipcamera_hispark_taurus@hisilicon --gn-args build_xts=true
方式二:
hb set
选择 设备类型
hb build --gn-args build_xts=true
(注):若不追加--gn-args build_xts=true,不会编译acts测试套件。
```
L1_Linux:
随版本编译,debug版本编译时会同步编译acts测试套件
```
方式一:
python3 build.py -p ipcamera_hispark_taurus_linux@hisilicon --gn-args build_xts=true
方式二:
hb set
选择 设备类型
hb build --gn-args build_xts=true
(注):若不追加--gn-args build_xts=true,不会编译acts测试套件。
```
>![](figures/icon-note.gif) **说明:**
>小型系统acts独立编译成可执行文件(bin格式), 在编译产物的suites\\acts目录下归档。
......@@ -581,55 +616,91 @@ OpenHarmony支持如下几种系统类型:
用例编写语法采用 jasmine 的标准语法,格式支持ES6格式。
1. 规范用例目录:测试用例存储到entry/src/main/js/test目录。
**以FA 模式为例:**
1. 规范用例目录:测试用例存储到 src/main/js/test目录。
```
├── BUILD.gn
│ └──entry
│ │ └──src
│ │ │ └──main
│ │ │ │ └──js
│ │ │ │ │ └──default
│ │ │ │ │ │ └──pages
│ │ │ │ │ │ │ └──index
│ │ │ │ │ │ │ │ └──index.js # 入口文件
│ │ │ │ │ └──test # 测试代码存放目录
│ │ │ └── resources # hap资源存放目录
│ │ │ └── config.json # hap配置文件
├── BUILD.gn
├── Test.json # 资源依赖hap不需要Test.json文件
├── signature
│ └──openharmony_sx.p7b # 签名工具
└──src
│ └──main
│ │ └──js
│ │ │ └──MainAbility
│ │ │ │ └──app.js
│ │ │ │ └──pages
│ │ │ │ │ └──index
│ │ │ │ │ │ └──index.js
│ │ │ └──test # 测试代码存放目录
│ │ │ │ │ └──List.test.js
│ │ │ │ │ └──Ability.test.js
│ │ │ └──TestAbility # 测试框架入口模板文件,添加后无需修改
│ │ │ │ └──app.js
│ │ │ │ └──pages
│ │ │ │ │ └──index
│ │ │ │ │ │ └──index.js
│ │ │ └──TestRunner # 测试框架入口模板文件,添加后无需修改
│ │ │ │ └──OpenHarmonyTestRunner.js
│ └── resources # hap资源存放目录
│ └── config.json # hap配置文件
```
2. index.js示例
2. OpenHarmonyTestRunner.js 示例
```
//加载js 测试框架
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
...
export default {
...
onRun() {
console.log('OpenHarmonyTestRunner onRun run')
var abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
var abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
var testAbilityName = abilityDelegatorArguments.parameters['-p'] + '.MainAbility'
var cmd = 'aa start -d 0 -a ' + testAbilityName + ' -b ' + abilityDelegatorArguments.bundleName
...
}
};
```
3. index.js示例
```
// 拉起js测试框架,加载测试用例
import {Core, ExpectExtend} from 'deccjsunit/index'
export default {
data: {
title: ""
},
onInit() {
this.title = this.$t('strings.world');
},
...
onShow() {
console.info('onShow finish')
const core = Core.getInstance()
const expectExtend = new ExpectExtend({
'id': 'extend'
})
core.addService('expect', expectExtend)
core.init()
const configService = core.getDefaultService('config')
configService.setConfig(this)
require('../../../test/List.test')
core.execute()
},
onReady() {
console.info('onShow finish!')
},
...
}
```
3. 单元测试用例示例
4. app.js示例
```
//加载测试用例
import { Hypium } from '@ohos/hypium'
import testsuite from '../test/List.test'
export default {
onCreate() {
console.info('TestApplication onCreate');
var abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
var abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
console.info('start run testcase!!!')
Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
},
...
};
```
5. 单元测试用例示例
```
// Example1: 使用HJSUnit进行单元测试
......@@ -643,6 +714,228 @@ OpenHarmony支持如下几种系统类型:
```
FA_JS 模式测试模块下用例配置文件(BUILD.gn)样例:
```
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ActsDemoTest") {
hap_profile = "./src/main/config.json"
deps = [
":hjs_demo_js_assets",
":hjs_demo_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b" //签名文件
hap_name = "ActsDemoTest" //测试套件,以Acts开头,以Test结尾,采用驼峰式命名
part_name = "..." //部件
subsystem_name = "..." //子系统
}
ohos_js_assets("hjs_demo_js_assets") {
js2abc = true
hap_profile = "./src/main/config.json"
source_dir = "./src/main/js"
}
ohos_resources("hjs_demo_resources") {
sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json"
}
```
FA_TS 模式测试模块下用例配置文件(BUILD.gn)样例:
```
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ActsDemoTest") {
hap_profile = "./src/main/config.json"
deps = [
":ace_demo_ets_assets",
":ace_demo_ets_resources",
":ace_demo_ets_test_assets",
]
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" //签名文件
hap_name = "ActsDemoTest" //测试套件,以Acts开头,以Test结尾,采用驼峰式命名
part_name = "..." //部件
subsystem_name = "..." //子系统
}
ohos_js_assets("ace_demo_ets_assets") {
source_dir = "./src/main/ets/MainAbility"
}
ohos_js_assets("ace_demo_ets_test_assets") {
source_dir = "./src/main/ets/TestAbility"
}
ohos_resources("ace_demo_ets_resources") {
sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json"
}
```
FA_JS 模式适配指导请参考
[一. 标准系统FA-JS-旧框架编译Hap包指导 - Wiki - Gitee.com](https://gitee.com/openharmony/xts_acts/wikis/%E6%A0%87%E5%87%86%E7%B3%BB%E7%BB%9FFA&Stage%E6%A8%A1%E5%BC%8F%E9%80%82%E9%85%8D%E6%96%B0%E6%A1%86%E6%9E%B6%E6%8C%87%E5%AF%BC%E6%96%87%E6%A1%A3/%E4%B8%80.%20%E6%A0%87%E5%87%86%E7%B3%BB%E7%BB%9FFA-JS-%E6%97%A7%E6%A1%86%E6%9E%B6%E7%BC%96%E8%AF%91Hap%E5%8C%85%E6%8C%87%E5%AF%BC)
[三. 标准系统FA-JS模式XTS-旧框架-新框架适配 - Wiki - Gitee.com](https://gitee.com/openharmony/xts_acts/wikis/%E6%A0%87%E5%87%86%E7%B3%BB%E7%BB%9FFA&Stage%E6%A8%A1%E5%BC%8F%E9%80%82%E9%85%8D%E6%96%B0%E6%A1%86%E6%9E%B6%E6%8C%87%E5%AF%BC%E6%96%87%E6%A1%A3/%E4%B8%89.%20%E6%A0%87%E5%87%86%E7%B3%BB%E7%BB%9FFA-JS%E6%A8%A1%E5%BC%8FXTS-%E6%97%A7%E6%A1%86%E6%9E%B6-%E6%96%B0%E6%A1%86%E6%9E%B6%E9%80%82%E9%85%8D)
FA_TS 模式适配指导请参考
[二. 标准系统FA-ETS-新框架编译Hap包指导 - Wiki - Gitee.com](https://gitee.com/openharmony/xts_acts/wikis/%E6%A0%87%E5%87%86%E7%B3%BB%E7%BB%9FFA&Stage%E6%A8%A1%E5%BC%8F%E9%80%82%E9%85%8D%E6%96%B0%E6%A1%86%E6%9E%B6%E6%8C%87%E5%AF%BC%E6%96%87%E6%A1%A3/%E4%BA%8C.%20%E6%A0%87%E5%87%86%E7%B3%BB%E7%BB%9FFA-ETS-%E6%96%B0%E6%A1%86%E6%9E%B6%E7%BC%96%E8%AF%91Hap%E5%8C%85%E6%8C%87%E5%AF%BC)
[四. 标准系统FA-TS模式XTS-旧框架-新框架适配 - Wiki - Gitee.com](https://gitee.com/openharmony/xts_acts/wikis/%E6%A0%87%E5%87%86%E7%B3%BB%E7%BB%9FFA&Stage%E6%A8%A1%E5%BC%8F%E9%80%82%E9%85%8D%E6%96%B0%E6%A1%86%E6%9E%B6%E6%8C%87%E5%AF%BC%E6%96%87%E6%A1%A3/%E5%9B%9B.%20%E6%A0%87%E5%87%86%E7%B3%BB%E7%BB%9FFA-TS%E6%A8%A1%E5%BC%8FXTS-%E6%97%A7%E6%A1%86%E6%9E%B6-%E6%96%B0%E6%A1%86%E6%9E%B6%E9%80%82%E9%85%8D)
**以Stage 模式为例:**
1. 规范用例目录:测试用例存储到 src/main/js/test目录。
```
├── BUILD.gn # 配置文件
├── Test.json # 资源依赖hap不需要Test.json文件
├── signature
│ └──openharmony_sx.p7b # 签名工具
├── AppScope
│ └──resource
│ └──app.json
├── entry
│ └──src
│ │ └──main
│ │ │ └──ets
│ │ │ │ └──test # 测试代码存放目录
│ │ │ │ │ └──List.test.ets
│ │ │ │ │ └──Ability.test.ets
│ │ │ │ └──MainAbility
│ │ │ │ │ └──MainAbility.ts
│ │ │ │ │ └──pages
│ │ │ │ │ │ └──index
│ │ │ │ │ │ │ └──index.ets
│ │ │ │ └──TestAbility
│ │ │ │ │ └──TestAbility.ts # 测试用例启动入口 ability
│ │ │ │ │ └──pages
│ │ │ │ │ │ └──index.ets
│ │ │ │ └──Application
│ │ │ │ │ └──AbilityStage.ts
│ │ │ │ └──TestRunner # 测试框架入口模板文件,添加后无需修改
│ │ │ │ │ └──OpenHarmonyTestRunner.js
│ │ └── resources # hap资源存放目录
│ │ └── module.json # hap配置文件
```
2. OpenHarmonyTestRunner.ts 示例
【注】在TestRunner目录下的 OpenHarmonyTestRunner.ts 文件中的 async onRun() 方法下存在拉起测试套入口xxxAbility的cmd 命令:
例如:
var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName
需与module.json中 "abilities" 下的 "name" 字段保持一致,保证拉起的是我们需要的测试入口。
```
import TestRunner from '@ohos.application.testRunner'
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
...
export default class OpenHarmonyTestRunner implements TestRunner {
...
async onRun() {
console.log('OpenHarmonyTestRunner onRun run')
abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility'
let lMonitor = {
abilityName: testAbilityName,
onAbilityCreate: onAbilityCreateCallback,
};
abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback)
var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName
...
}
};
```
3. index.ets示例
```
import router from '@ohos.router';
@Entry
@Component
struct Index {
aboutToAppear(){
console.info("start run testcase!!!!")
}
build() {
...
}
}
```
4. app.js示例
```
//加载测试用例
import Ability from '@ohos.application.Ability'
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
import { Hypium } from '@ohos/hypium'
import testsuite from '../test/List.test'
export default class TestAbility extends Ability {
onCreate(want, launchParam) {
console.log('TestAbility onCreate')
var abilityDelegator: any
abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
var abilityDelegatorArguments: any
abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
console.info('start run testcase!!!')
Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
}
...
};
```
Stage 模式测试模块下用例配置文件(BUILD.gn)样例:
```
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ActsDemoTest") {
hap_profile = "/src/main/module.json"
js_build_mode = "debug"
deps = [
":edm_js_assets",
":edm_resources",
]
ets2abc = true
certificate_profile = "signature/openharmony_sx.p7b" //签名文件
hap_name = "ActsDemoTest" //测试套件,以Acts开头,以Test结尾,采用驼峰式命名
subsystem_name = "customization" //子系统
part_name = "enterprise_device_management" //部件
}
ohos_app_scope("edm_app_profile") {
app_profile = "AppScope/app.json"
sources = [ "AppScope/resources" ]
}
ohos_js_assets("edm_js_assets") {
source_dir = "/src/main/ets"
}
ohos_resources("edm_resources") {
sources = [ "/src/main/resources" ]
deps = [ ":edm_app_profile" ]
hap_profile = "/src/main/module.json"
}
```
Stage 模式适配指导请参考
[五. 标准系统Stage模式-ETS-旧框架编译Hap包指导 - Wiki - Gitee.com](https://gitee.com/openharmony/xts_acts/wikis/%E6%A0%87%E5%87%86%E7%B3%BB%E7%BB%9FFA&Stage%E6%A8%A1%E5%BC%8F%E9%80%82%E9%85%8D%E6%96%B0%E6%A1%86%E6%9E%B6%E6%8C%87%E5%AF%BC%E6%96%87%E6%A1%A3/%E4%BA%94.%20%E6%A0%87%E5%87%86%E7%B3%BB%E7%BB%9FStage%E6%A8%A1%E5%BC%8F-ETS-%E6%97%A7%E6%A1%86%E6%9E%B6%E7%BC%96%E8%AF%91Hap%E5%8C%85%E6%8C%87%E5%AF%BC)
[六. 标准系统Stage模式XTS-旧框架-新框架适配 - Wiki - Gitee.com](https://gitee.com/openharmony/xts_acts/wikis/%E6%A0%87%E5%87%86%E7%B3%BB%E7%BB%9FFA&Stage%E6%A8%A1%E5%BC%8F%E9%80%82%E9%85%8D%E6%96%B0%E6%A1%86%E6%9E%B6%E6%8C%87%E5%AF%BC%E6%96%87%E6%A1%A3/%E5%85%AD.%20%E6%A0%87%E5%87%86%E7%B3%BB%E7%BB%9FStage%E6%A8%A1%E5%BC%8FXTS-%E6%97%A7%E6%A1%86%E6%9E%B6-%E6%96%B0%E6%A1%86%E6%9E%B6%E9%80%82%E9%85%8D)
### JS语言用例编译打包指导(适用于标准系统)<a name="section445519106559"></a>
hap包编译请参考 [标准系统 JS用例源码编译Hap包指导](https://gitee.com/openharmony/xts_acts/wikis/%E6%A0%87%E5%87%86%E7%B3%BB%E7%BB%9F%20JS%E7%94%A8%E4%BE%8B%E6%BA%90%E7%A0%81%E7%BC%96%E8%AF%91Hap%E5%8C%85%E6%8C%87%E5%AF%BC%20?sort_id=4427112)
......@@ -650,12 +943,32 @@ hap包编译请参考 [标准系统 JS用例源码编译Hap包指导](https://gi
### 全量编译指导(适用于标准系统)<a name="section159801435165220"></a>
1. 全量编译
test/xts/acts目录下执行编译命令:
```./build.sh suite=acts system_size=standard ```
test/xts/acts目录下执行编译命令:
测试用例输出目录:out/release/suites/acts/testcases
```
./build.sh product_name=rk3568 system_size=standard
```
2. 单个子系统编译
test/xts/acts目录下执行编译命令:
```
./build.sh product_name=rk3568 system_size=standard target_subsystem=××××
```
3. 单模块编译
测试框架&用例整体输出目录:out/release/suites/acts(编译用例时会同步编译测试套执行框架)
test/xts/acts目录下执行编译命令:
```./build.sh suite=acts system_size=standard target_subsystem=××××
./build.sh product_name=rk3568 system_size=standard suite=xxx
suite 后面添加的是BUILD.gn 中ohos_js_hap_suite模板的命名
```
测试用例输出目录:out/rk3568/suites/acts/testcases
测试框架&用例整体输出目录:out/rk3568/suites/acts(编译用例时会同步编译测试套执行框架)
### 全量用例执行指导(适用于小型系统、标准系统)<a name="section159801435165220"></a>
......@@ -673,14 +986,27 @@ Windows工作台下安装python3.7及以上版本,确保工作台和测试设
用例执行
1. 在Windows工作台上,找到从Linux服务器上拷贝下来的测试套件用例目录,在Windows命令窗口进入对应目录,直接执行acts\run.bat。
2. 界面启动后,输入用例执行指令。
全量执行:```run acts ```
模块执行(具体模块可以查看\acts\testcases\):```run –l ActsSamgrTest ```
单包执行(具体模块可以查看\acts\testcases\):(适用于OH驱动)
```
run -l uitestActs -ta class:UiTestCase#testChecked
uitestActs: 测试hap
UiTestCase: testsuite
testChecked: testcase
```
3. 查看测试报告。
进入acts\reports\,获取当前的执行记录,打开“summary_report.html”可以获取到测试报告。
进入acts\reports\,获取当前的执行记录,打开“summary_report.html”可以获取到测试报告。
## 相关仓<a name="section1371113476307"></a>
......
......@@ -18,6 +18,18 @@ import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry
import { Hypium } from '@ohos/hypium'
import testsuite from '../test/List.test'
async function startAbilityTest(TAG, context) {
let wantInfo = {
bundleName: "com.example.aacommandprintonetest",
abilityName: "MainAbility"
}
await context.startAbility(wantInfo).then((data) => {
console.log(TAG + "startAbility data : " + JSON.stringify(data));
}).catch((err) => {
console.log(TAG + "startAbility err : " + JSON.stringify(err));
})
}
export default class MainAbility extends Ability {
async onCreate(want, launchParam) {
globalThis.abilityContext = this.context;
......@@ -34,96 +46,112 @@ export default class MainAbility extends Ability {
cmd = 'aa test -b com.example.aacommandrelyhap -m entry_test -s class ACTS_AACommand_01_3#ACTS_AACo' +
'mmand_print_01_0100 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_print_01_0100 - executeShellCommand: start ')
console.log('ACTS_AACommand_print_01_0100 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_print_01_0100 stdResult = ' + data.stdResult)
globalThis.stdResult3 = data.stdResult;
console.log('ACTS_AACommand_print_01_0100 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_print_01_0100', this.context);
})
await sleep(4000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_AAComm' +
'and_print_01_0200 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_print_01_0200 - executeShellCommand: start ')
console.log('ACTS_AACommand_print_01_0200 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_print_01_0200 stdResult = ' + data.stdResult)
globalThis.stdResult4 = data.stdResult;
console.log('ACTS_AACommand_print_01_0200 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_print_01_0200', this.context);
})
await sleep(4000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_' +
'AACommand_print_01_0300 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_print_01_0300 - executeShellCommand: start ')
console.log('ACTS_AACommand_print_01_0300 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_print_01_0300 stdResult = ' + data.stdResult)
globalThis.stdResult5 = data.stdResult;
console.log('ACTS_AACommand_print_01_0300 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_print_01_0300', this.context);
})
await sleep(4000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_AAComma' +
'nd_print_01_0400 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_print_01_0400 - executeShellCommand: start ')
console.log('ACTS_AACommand_print_01_0400 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_print_01_0400 stdResult = ' + data.stdResult)
globalThis.stdResult6 = data.stdResult;
console.log('ACTS_AACommand_print_01_0400 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_print_01_0400', this.context);
})
await sleep(4000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_AAComm' +
'and_print_01_0500 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_print_01_0500 - executeShellCommand: start ')
console.log('ACTS_AACommand_print_01_0500 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_print_01_0500 stdResult = ' + data.stdResult)
globalThis.stdResult7 = data.stdResult;
console.log('ACTS_AACommand_print_01_0500 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_print_01_0500', this.context);
})
await sleep(4000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_AA' +
'Command_print_01_0600 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_print_01_0600 - executeShellCommand: start ')
console.log('ACTS_AACommand_print_01_0600 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_print_01_0600 stdResult = ' + data.stdResult)
globalThis.stdResult8 = data.stdResult;
console.log('ACTS_AACommand_print_01_0600 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_print_01_0600', this.context);
})
await sleep(4000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class ' +
'ACTS_AACommand_01_3#ACTS_AACommand_print_01_0700 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_print_01_0700 - executeShellCommand: start ')
console.log('ACTS_AACommand_print_01_0700 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_print_01_0700 stdResult = ' + data.stdResult)
globalThis.stdResult9 = data.stdResult;
console.log('ACTS_AACommand_print_01_0700 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_print_01_0700', this.context);
})
await sleep(4000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s ' +
'class ACTS_AACommand_01_3#ACTS_AACommand_print_01_0800 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_print_01_0800 - executeShellCommand: start ')
console.log('ACTS_AACommand_print_01_0800 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_print_01_0800 stdResult = ' + data.stdResult)
globalThis.stdResult10 = data.stdResult;
console.log('ACTS_AACommand_print_01_0800 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_print_01_0800', this.context);
})
setTimeout(() => {
......
......@@ -20,6 +20,25 @@ let msgcopy: any
export default function abilityTest() {
describe('ActsAACommandPrinOneTest', function () {
afterEach(async (done) => {
console.log("ActsAACommandPrinOneTest afterEach called");
let wantInfo = {
bundleName: "com.example.aacommandprintonetest",
abilityName: "MainAbility"
}
await globalThis.abilityContext.startAbility(wantInfo).then((data) => {
console.log("ActsAACommandPrinOneTest startAbility data : " + JSON.stringify(data));
}).catch((err) => {
console.log("ActsAACommandPrinOneTest startAbility err : " + JSON.stringify(err));
})
setTimeout(function () {
console.log("ActsAACommandPrinOneTest afterEach end");
done();
}, 1000);
})
/**
* @tc.number: ACTS_AACommand_print_0100
* @tc.name: The -b, -p, -s, -w and other parameters of the test command are valid, and the print interface is
......
......@@ -21,6 +21,7 @@
"icon": "$media:icon",
"label": "$string:MainAbility_label",
"visible": true,
"launchType": "singleton",
"skills": [
{
"entities": [
......
......@@ -18,6 +18,18 @@ import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry
import { Hypium } from '@ohos/hypium'
import testsuite from '../test/List.test'
async function startAbilityTest(TAG, context) {
let wantInfo = {
bundleName: "com.example.aacommandprintsynctest",
abilityName: "MainAbility"
}
await context.startAbility(wantInfo).then((data) => {
console.log(TAG + "startAbility data : " + JSON.stringify(data));
}).catch((err) => {
console.log(TAG + "startAbility err : " + JSON.stringify(err));
})
}
export default class MainAbility extends Ability {
async onCreate(want, launchParam) {
globalThis.abilityContext = this.context;
......@@ -34,44 +46,52 @@ export default class MainAbility extends Ability {
cmd = 'aa test -b com.example.aacommandprintsync -m entry_test -s class ' +
'ACTS_AACommand_01_3#ACTS_AACommand_printSync_01_0100 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_printSync_01_0100 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_printSync_01_0100 stdResult = ' + data.stdResult)
globalThis.stdResult1 = data.stdResult;
console.log('ACTS_AACommand_printSync_01_0100 - executeShellCommand: end ')
await startAbilityTest('ACTS_AACommand_printSync_01_0100', this.context);
})
await sleep(3000)
cmd = 'aa test -m entry_test -b com.example.aacommandprintsync -s class ' +
'ACTS_AACommand_01_3#ACTS_AACommand_printSync_01_0200 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_printSync_01_0200 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_printSync_01_0200 stdResult = ' + data.stdResult)
globalThis.stdResult2 = data.stdResult;
console.log('ACTS_AACommand_printSync_01_0200 - executeShellCommand: end ')
await startAbilityTest('ACTS_AACommand_printSync_01_0200', this.context);
})
await sleep(3000)
cmd = 'aa test -m entry_test -b com.example.aacommandprintsync -s class ' +
'ACTS_AACommand_01_3#ACTS_AACommand_printSync_01_0300 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_printSync_01_0300 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_printSync_01_0300 stdResult = ' + data.stdResult)
globalThis.stdResult3 = data.stdResult;
console.log('ACTS_AACommand_printSync_01_0300 - executeShellCommand: end ')
await startAbilityTest('ACTS_AACommand_printSync_01_0300', this.context);
})
await sleep(3000)
cmd = 'aa test -m entry_test -b com.example.aacommandprintsync -s class ' +
'ACTS_AACommand_01_3#ACTS_AACommand_printSync_01_0400 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_printSync_01_0400 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_printSync_01_0400 stdResult = ' + data.stdResult)
globalThis.stdResult4 = data.stdResult;
console.log('ACTS_AACommand_printSync_01_0400 - executeShellCommand: end ')
await startAbilityTest('ACTS_AACommand_printSync_01_0400', this.context);
})
setTimeout(() => {
......
......@@ -18,6 +18,25 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from
let msg: any
export default function abilityTest() {
describe('ActsAbilityTest', function () {
afterEach(async (done) => {
console.log("ActsAACommandPrintSyncTest afterEach called");
let wantInfo = {
bundleName: "com.example.aacommandprintsynctest",
abilityName: "MainAbility"
}
await globalThis.abilityContext.startAbility(wantInfo).then((data) => {
console.log("ActsAACommandPrintSyncTest startAbility data : " + JSON.stringify(data));
}).catch((err) => {
console.log("ActsAACommandPrintSyncTest startAbility err : " + JSON.stringify(err));
})
setTimeout(function () {
console.log("ActsAACommandPrintSyncTest afterEach end");
done();
}, 1000);
})
/**
* @tc.number: ACTS_AACommand_printSync_0100
* @tc.name: The -b, -p, -s, -w and other parameters of the test command are valid
......
......@@ -21,6 +21,7 @@
"icon": "$media:icon",
"label": "$string:MainAbility_label",
"visible": true,
"launchType": "singleton",
"skills": [
{
"entities": [
......
......@@ -18,8 +18,21 @@ import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry
import { Hypium } from '@ohos/hypium'
import testsuite from '../test/List.test'
async function startAbilityTest(TAG, context) {
let wantInfo = {
bundleName: "com.example.aacommandtest",
abilityName: "MainAbility"
}
await context.startAbility(wantInfo).then((data) => {
console.log(TAG + "startAbility data : " + JSON.stringify(data));
}).catch((err) => {
console.log(TAG + "startAbility err : " + JSON.stringify(err));
})
}
export default class MainAbility extends Ability {
async onCreate(want, launchParam) {
globalThis.abilityContext = this.context;
console.log('MainAbility onCreate')
let cmd: any
let abilityDelegatorArguments: any
......@@ -34,11 +47,13 @@ export default class MainAbility extends Ability {
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s ' +
'class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_0700 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_0700 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_0700 stdResult = ' + data.stdResult)
globalThis.stdResult1 = data.stdResult;
console.log('ACTS_AACommand_finish_01_0700 - executeShellCommand: end ')
await startAbilityTest('ACTS_AACommand_finish_01_0700', this.context);
})
await sleep(4000)
......@@ -55,12 +70,14 @@ export default class MainAbility extends Ability {
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class ' +
'ACTS_AACommand_01_3#ACTS_AACommand_finish_01_0400 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_0400 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_0400 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_0400 stdResult = ' + data.stdResult)
globalThis.stdResult11 = data.stdResult;
console.log('ACTS_AACommand_finish_01_0400 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_0400', this.context);
})
await sleep(4000)
......@@ -77,12 +94,14 @@ export default class MainAbility extends Ability {
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s ' +
'class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_0100 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_0100 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_0100 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_0100 stdResult = ' + data.stdResult)
globalThis.stdResult13 = data.stdResult;
console.log('ACTS_AACommand_finish_01_0100 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_0100', this.context);
})
await sleep(4000)
......@@ -99,12 +118,14 @@ export default class MainAbility extends Ability {
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class ' +
'ACTS_AACommand_01_3#ACTS_AACommand_finish_01_0500 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_0500 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_0500 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_0500 stdResult = ' + data.stdResult)
globalThis.stdResult15 = data.stdResult;
console.log('ACTS_AACommand_finish_01_0500 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_0500', this.context);
})
await sleep(4000)
......@@ -121,12 +142,14 @@ export default class MainAbility extends Ability {
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s ' +
'class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_0600 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_0600 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_0600 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_0600 stdResult = ' + data.stdResult)
globalThis.stdResult17 = data.stdResult;
console.log('ACTS_AACommand_finish_01_0600 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_0600', this.context);
})
await sleep(4000)
......@@ -143,12 +166,14 @@ export default class MainAbility extends Ability {
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s ' +
'class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_0900 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_0900 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_0900 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_0900 stdResult = ' + data.stdResult)
globalThis.stdResult19 = data.stdResult;
console.log('ACTS_AACommand_finish_01_0900 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_0900', this.context);
})
await sleep(4000)
......@@ -165,12 +190,14 @@ export default class MainAbility extends Ability {
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap ' +
'-s class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_1300 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_1300 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_1300 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_1300 stdResult = ' + data.stdResult)
globalThis.stdResult23 = data.stdResult;
console.log('ACTS_AACommand_finish_01_1300 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_1300', this.context);
})
await sleep(4000)
......@@ -187,12 +214,14 @@ export default class MainAbility extends Ability {
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap ' +
'-s class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_1400 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_1400 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_1400 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_1400 stdResult = ' + data.stdResult)
globalThis.stdResult25 = data.stdResult;
console.log('ACTS_AACommand_finish_01_1400 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_1400', this.context);
})
await sleep(4000)
......@@ -209,12 +238,14 @@ export default class MainAbility extends Ability {
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap ' +
'-s class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_1500 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_1500 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_1500 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_1500 stdResult = ' + data.stdResult)
globalThis.stdResult27 = data.stdResult;
console.log('ACTS_AACommand_finish_01_1500 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_1500', this.context);
})
await sleep(4000)
......@@ -231,11 +262,13 @@ export default class MainAbility extends Ability {
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap ' +
'-s class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_0300 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_0300 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_0300 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_0300 stdResult = ' + data.stdResult)
console.log('ACTS_AACommand_finish_01_0300 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_0300', this.context);
})
await sleep(3000)
......@@ -252,11 +285,13 @@ export default class MainAbility extends Ability {
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap' +
' -s class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_1600 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_1600 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_1600 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_1600 stdResult = ' + data.stdResult)
console.log('ACTS_AACommand_finish_01_1600 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_1600', this.context);
})
await sleep(3000)
......@@ -281,8 +316,6 @@ export default class MainAbility extends Ability {
onWindowStageCreate(windowStage) {
console.log('MainAbility onWindowStageCreate')
windowStage.setUIContent(this.context, 'pages/index', null)
globalThis.abilityContext = this.context;
}
onWindowStageDestroy() {
......
......@@ -22,6 +22,24 @@ let finishmsg1: any
export default function abilityTest() {
describe('ACTS_AACommand_Test', function () {
afterEach(async (done) => {
console.log("ActsAACommandTest afterEach called");
let wantInfo = {
bundleName: "com.example.aacommandtest",
abilityName: "MainAbility"
}
await globalThis.abilityContext.startAbility(wantInfo).then((data) => {
console.log("ActsAACommandTest startAbility data : " + JSON.stringify(data));
}).catch((err) => {
console.log("ActsAACommandTest startAbility err : " + JSON.stringify(err));
})
setTimeout(function () {
console.log("ActsAACommandTest afterEach end");
done();
}, 1000);
})
/**
* @tc.number: ACTS_AACommand_0100
* @tc.name: -b, -s unittest, -p, -s class, -s level, -s size, -s testType, -s timeout,
......
......@@ -21,6 +21,7 @@
"icon": "$media:icon",
"label": "$string:MainAbility_label",
"visible": true,
"launchType": "singleton",
"skills": [
{
"entities": [
......
......@@ -58,6 +58,12 @@
"visible": true,
"launchType": "singleton"
}
],
"reqPermissions": [
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
]
}
}
\ No newline at end of file
......@@ -74,6 +74,10 @@
{
"name":"ohos.permission.CLEAN_APPLICATION_DATA",
"reason":"need use ohos.permission.CLEAN_APPLICATION_DATA"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
]
}
......
......@@ -74,6 +74,10 @@
{
"name":"ohos.permission.CLEAN_APPLICATION_DATA",
"reason":"need use ohos.permission.CLEAN_APPLICATION_DATA"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
]
}
......
......@@ -74,6 +74,10 @@
{
"name":"ohos.permission.CLEAN_APPLICATION_DATA",
"reason":"need use ohos.permission.CLEAN_APPLICATION_DATA"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
]
}
......
......@@ -114,6 +114,10 @@
{
"name":"ohos.permission.CLEAN_APPLICATION_DATA",
"reason":"need use ohos.permission.CLEAN_APPLICATION_DATA"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
]
}
......
......@@ -77,6 +77,10 @@
{
"name": "ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason": "need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
],
"js": [
......
......@@ -74,6 +74,10 @@
{
"name":"ohos.permission.CLEAN_APPLICATION_DATA",
"reason":"need use ohos.permission.CLEAN_APPLICATION_DATA"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
]
}
......
......@@ -19,6 +19,7 @@ import testsuite from '../test/List.test'
export default class TestAbility extends Ability {
onCreate(want, launchParam) {
globalThis.abilityContext = this.context;
console.info('TestAbility onCreate')
let abilityDelegatorArguments: any
let abilityDelegator: any
......@@ -34,7 +35,6 @@ export default class TestAbility extends Ability {
onWindowStageCreate(windowStage) {
console.log('TestAbility onWindowStageCreate')
windowStage.setUIContent(this.context, 'TestAbility/pages/index', null)
globalThis.abilityContext = this.context;
}
onWindowStageDestroy() {
......
......@@ -13,7 +13,7 @@
* limitations under the License.
*/
import { describe, it, expect } from '@ohos/hypium'
import { describe, it, expect, afterEach } from '@ohos/hypium'
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
let abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
......@@ -37,6 +37,24 @@ function test(time) {
export default function abilityStageMonitorTest() {
describe('ActsAbilityTest', function () {
afterEach(async (done) => {
console.log("SUB_AA_AbilityStageMonitor afterEach called");
let wantInfo = {
bundleName: "com.example.abilitystagemonitortest",
abilityName: "TestAbility"
}
await globalThis.abilityContext.startAbility(wantInfo).then((data) => {
console.log("SUB_AA_AbilityStageMonitor startAbility data : " + JSON.stringify(data));
}).catch((err) => {
console.log("SUB_AA_AbilityStageMonitor startAbility err : " + JSON.stringify(err));
})
setTimeout(function () {
console.log("SUB_AA_AbilityStageMonitor afterEach called");
done();
}, 1000);
})
/**
* @tc.number: SUB_AA_AbilityStageMonitor_0100
* @tc.name: Call waitAbilityStageMonitor in the form of callback, and enter the monitor
......
......@@ -46,6 +46,16 @@
"icon": "$media:icon",
"label": "$string:MainAbility3_label"
}
],
"requestPermissions": [
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
},
{
"name":"ohos.permission.START_INVISIBLE_ABILITY",
"reason":"need use ohos.permission.START_INVISIBLE_ABILITY"
}
]
}
}
\ No newline at end of file
......@@ -80,6 +80,18 @@
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
},
{
"name":"ohos.permission.START_INVISIBLE_ABILITY",
"reason":"need use ohos.permission.START_INVISIBLE_ABILITY"
},
{
"name":"ohos.permission.ABILITY_BACKGROUND_COMMUNICATION",
"reason":"need use ohos.permission.ABILITY_BACKGROUND_COMMUNICATION"
}
]
}
......
......@@ -93,201 +93,20 @@ export default function abilityTest() {
*/
it('ACTS_CommonComponent_Call_1100', 0, async function (done) {
console.log('ACTS_CommonComponent_Call_1100 begin');
var subscriber;
function unSubscribeCallBack() {
console.log('ACTS_CommonComponent_Call_1100 unSubscribeCallBack')
setTimeout(()=>{done();}, 100)
}
function releaseCallback(data) {
expect(data).assertEqual('release');
console.log('ACTS_CommonComponent_Call_1100 releaseCallBack' + data);
commonEvent.unsubscribe(subscriber, unSubscribeCallBack);
}
function subscribeCallBack(err, data) {
console.log('ACTS_CommonComponent_Call_1100 subscribeCallBack data:' + JSON.stringify(data))
expect(data.data).assertEqual('calleeCheckCallParam');
expect(data.parameters.num).assertEqual(1100);
expect(data.parameters.str).assertEqual('ACTS_CommonComponent_Call_1100');
expect(data.parameters.result).assertEqual('ACTS_CommonComponent_Call_1100processed');
console.log('AMS_CallTest_0100 do release');
caller.release();
}
subscriber = await commonEvent.createSubscriber(subscriberInfo);
commonEvent.subscribe(subscriber, subscribeCallBack);
let caller = await globalThis.abilityContext.startAbilityByCall({
let want = {
bundleName: thirdCallTestBundleName,
abilityName: thirdCallTestForthAbilityName,
});
caller.onRelease(releaseCallback);
let param = new MySequenceable(1100, "ACTS_CommonComponent_Call_1100", 'default');
caller.call('testCall', param).then(() => {
console.log('ACTS_CommonComponent_Call_1100 call success');
}).catch(err => {
console.log('ACTS_CommonComponent_Call_1100 call exception' + err);
expect().assertFail();
})
})
/**
* @tc.number: ACTS_CommonComponent_Call_1200
* @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string.
* @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string.
*/
it('ACTS_CommonComponent_Call_1200', 0, async function (done) {
console.log('ACTS_CommonComponent_Call_1200 begin');
function releaseCallback(data) {
expect(data).assertEqual('release');
console.log('ACTS_CommonComponent_Call_1200 releaseCallBack' + data);
setTimeout(()=>{done();}, 100)
}
let caller = await globalThis.abilityContext.startAbilityByCall({
bundleName: thirdCallTestBundleName,
abilityName: thirdCallTestFifthAbilityName,
});
caller.onRelease(releaseCallback);
let param = new MySequenceable(1200, "ACTS_CommonComponent_Call_1200", 'default');
caller.callWithResult('testCallWithResult', param).then((data) => {
console.log('ACTS_CommonComponent_Call_1200 call success');
var result = new MySequenceable(0, '', '');
data.readSequenceable(result);
expect(result.num).assertEqual(1200);
expect(result.str).assertEqual('ACTS_CommonComponent_Call_1200');
expect(result.result).assertEqual('ACTS_CommonComponent_Call_1200processed');
caller.release();
}).catch(err => {
console.log('ACTS_CommonComponent_Call_1200 call exception' + err);
expect().assertFail();
caller.release();
})
})
/**
* @tc.number: ACTS_CommonComponent_Call_1300
* @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string.
* @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string.
*/
it('ACTS_CommonComponent_Call_1300', 0, async function (done) {
console.log('ACTS_CommonComponent_Call_1300 begin');
var subscriber;
var caller
function unSubscribeCallBack() {
console.log('ACTS_CommonComponent_Call_1300 unSubscribeCallBack')
setTimeout(()=>{done();}, 100)
}
function releaseCallback(data) {
expect(data).assertEqual('release');
console.log('ACTS_CommonComponent_Call_1300 releaseCallBack' + data);
commonEvent.unsubscribe(subscriber, unSubscribeCallBack);
}
function releaseCallback1(data) {
expect(data).assertEqual('release');
console.log('ACTS_CommonComponent_Call_1300 releaseCallBack1' + data);
setTimeout(() => {
globalThis.abilityContext.startAbilityByCall({
bundleName: thirdCallTestBundleName,
abilityName: thirdCallTestSecondAbilityName,
}).then(data => {
caller = data;
console.log('ACTS_CommonComponent_Call_1300 caller get')
caller.onRelease(releaseCallback);
let param = new MySequenceable(1300, "ACTS_CommonComponent_Call_1300", 'default');
caller.call('testCall', param).then(() => {
console.log('ACTS_CommonComponent_Call_1300 call success');
}).catch(err => {
console.log('ACTS_CommonComponent_Call_1300 call exception' + err);
expect().assertFail();
})
})
},100);
}
function subscribeCallBack(err, data) {
console.log('ACTS_CommonComponent_Call_1300 subscribeCallBack data:' + JSON.stringify(data))
expect(data.data).assertEqual('calleeCheckCallParam');
expect(data.parameters.num).assertEqual(1300);
expect(data.parameters.str).assertEqual('ACTS_CommonComponent_Call_1300');
expect(data.parameters.result).assertEqual('ACTS_CommonComponent_Call_1300processed');
console.log('ACTS_CommonComponent_Call_1300 do release');
caller.release();
}
subscriber = await commonEvent.createSubscriber(subscriberInfo);
commonEvent.subscribe(subscriber, subscribeCallBack);
globalThis.abilityContext.startAbilityByCall({
bundleName: thirdCallTestBundleName,
abilityName: thirdCallTestSecondAbilityName,
}).then(data => {
caller = data;
console.log('ACTS_CommonComponent_Call_1300 caller get')
caller.onRelease(releaseCallback1);
caller.release();
})
})
/**
* @tc.number: ACTS_CommonComponent_Call_1400
* @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string.
* @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string.
*/
it('ACTS_CommonComponent_Call_1400', 0, async function (done) {
console.log('ACTS_CommonComponent_Call_1400 begin');
var caller
function releaseCallback(data) {
expect(data).assertEqual('release');
console.log('ACTS_CommonComponent_Call_1400 releaseCallBack' + data);
setTimeout(()=>{done();}, 100)
}
function releaseCallback1(data) {
expect(data).assertEqual('release');
console.log('ACTS_CommonComponent_Call_1400 releaseCallBack' + data);
setTimeout(() => {
globalThis.abilityContext.startAbilityByCall({
bundleName: thirdCallTestBundleName,
abilityName: thirdCallTestSecondAbilityName,
}).then(data => {
caller = data;
caller.onRelease(releaseCallback);
let param = new MySequenceable(1400, "ACTS_CommonComponent_Call_1400", 'default');
caller.callWithResult('testCallWithResult', param).then((data) => {
console.log('ACTS_CommonComponent_Call_1400 call success');
var result = new MySequenceable(0, '', '');
data.readSequenceable(result);
expect(result.num).assertEqual(1400);
expect(result.str).assertEqual('ACTS_CommonComponent_Call_1400');
expect(result.result).assertEqual('ACTS_CommonComponent_Call_1400processed');
caller.release();
}).catch(err => {
console.log('ACTS_CommonComponent_Call_1400 call exception' + err);
expect().assertFail();
caller.release();
})
});
},100);
}
globalThis.abilityContext.startAbilityByCall({
bundleName: thirdCallTestBundleName,
abilityName: thirdCallTestSecondAbilityName,
}).then(data => {
caller = data;
console.log('ACTS_CommonComponent_Call_1400 caller get')
caller.onRelease(releaseCallback1);
caller.release();
})
globalThis.abilityContext.startAbilityByCall(want)
.then(data => {
console.info(`ACTS_CommonComponent_Call_1100 startAbilityByCall SUCCESS`);
expect().assertFail();
done();
})
.catch(error => {
console.info(`ACTS_CommonComponent_Call_1100 startAbilityByCall Catch`);
done();
});
})
/**
......@@ -297,17 +116,20 @@ export default function abilityTest() {
*/
it('ACTS_CommonComponent_Call_1500', 0, async function (done) {
console.log('ACTS_CommonComponent_Call_1500 begin');
var caller;
try{
caller = await globalThis.abilityContext.startAbilityByCall({
bundleName: systemAppCalleeABundleName,
abilityName: systemAppCalleeAMainAbilityName,
});
}catch(error){
console.log('ACTS_CommonComponent_Call_1500 start err'+error);
expect(error=="Error: function request remote error").assertTrue();
done();
let want = {
bundleName: systemAppCalleeABundleName,
abilityName: systemAppCalleeAMainAbilityName,
}
globalThis.abilityContext.startAbilityByCall(want)
.then(data => {
console.info(`ACTS_CommonComponent_Call_1100 startAbilityByCall SUCCESS`);
expect().assertFail();
done();
})
.catch(error => {
console.info(`ACTS_CommonComponent_Call_1100 startAbilityByCall Catch`);
done();
});
})
/**
......@@ -317,49 +139,20 @@ export default function abilityTest() {
*/
it('ACTS_CommonComponent_Call_1600', 0, async function (done) {
console.log('ACTS_CommonComponent_Call_1600 begin');
let caller;
let exceptionFlag = false;
try {
caller = await globalThis.abilityContext.startAbilityByCall({
bundleName: thirdAppABundleName,
abilityName: thirdAppAMainAbilityName,
});
console.log('ACTS_CommonComponent_Call_1600 startAbilityByCall' + JSON.stringify(caller))
} catch(err) {
console.log('ACTS_CommonComponent_Call_1600 exception' + err);
exceptionFlag = true;
expect(err.message).assertEqual("function request remote error");
let want = {
bundleName: thirdAppABundleName,
abilityName: thirdAppAMainAbilityName,
}
expect(exceptionFlag).assertEqual(true);
done();
})
/**
* @tc.number: ACTS_CommonComponent_Call_1800
* @tc.name: The parameter "method" of the Caller.callWithResult function is an empty string.
* @tc.desc: Verify that the parameter "method" of the Caller.callWithResult function is an empty string.
*/
it('ACTS_CommonComponent_Call_1800', 0, async function (done) {
console.log('ACTS_CommonComponent_Call_1800 begin');
let caller;
let exceptionFlag = false;
try {
caller = await globalThis.abilityContext.startAbilityByCall({
bundleName: thirdCallTestBundleName,
abilityName: thirdCallTestThirdAbilityName,
globalThis.abilityContext.startAbilityByCall(want)
.then(data => {
console.info(`ACTS_CommonComponent_Call_1100 startAbilityByCall SUCCESS`);
expect().assertFail();
done();
})
.catch(error => {
console.info(`ACTS_CommonComponent_Call_1100 startAbilityByCall Catch`);
done();
});
console.log('ACTS_CommonComponent_Call_1800 startAbilityByCall' + JSON.stringify(caller))
} catch(err) {
console.log('ACTS_CommonComponent_Call_1800 exception' + err);
exceptionFlag = true;
expect(err.message).assertEqual("function request remote error");
}
expect(exceptionFlag).assertEqual(true);
done();
})
})
}
\ No newline at end of file
......@@ -9,7 +9,7 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
......
......@@ -9,7 +9,7 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
......
......@@ -12,8 +12,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import dataAbility from '@ohos.data.dataAbility'
import featureAbility from '@ohos.ability.featureAbility'
import dataAbility from '@ohos.data.dataAbility'
import fileio from '@ohos.fileio'
import dataRdb from '@ohos.data.rdb'
......@@ -251,4 +251,4 @@ export default {
}
callback("success", uri);
}
};
\ No newline at end of file
};
......@@ -12,8 +12,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import dataAbility from '@ohos.data.dataAbility'
import featureAbility from '@ohos.ability.featureAbility'
import dataAbility from '@ohos.data.dataAbility'
import fileio from '@ohos.fileio'
import dataRdb from '@ohos.data.rdb'
......@@ -251,4 +251,4 @@ export default {
}
callback("success", uri);
}
};
\ No newline at end of file
};
......@@ -12,8 +12,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import dataAbility from '@ohos.data.dataAbility'
import featureAbility from '@ohos.ability.featureAbility'
import dataAbility from '@ohos.data.dataAbility'
import fileio from '@ohos.fileio'
import dataRdb from '@ohos.data.rdb'
......@@ -213,4 +213,4 @@ export default {
}
callback("success", uri);
}
};
\ No newline at end of file
};
......@@ -9,7 +9,7 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
......
......@@ -53,6 +53,16 @@
"icon": "$media:icon",
"label": "$string:MainAbility4_label"
}
],
"requestPermissions": [
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
},
{
"name":"ohos.permission.START_INVISIBLE_ABILITY",
"reason":"need use ohos.permission.START_INVISIBLE_ABILITY"
}
]
}
}
\ No newline at end of file
......@@ -41,6 +41,16 @@
"visible": true,
"launchType": "singleton"
}
],
"requestPermissions": [
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
},
{
"name":"ohos.permission.START_INVISIBLE_ABILITY",
"reason":"need use ohos.permission.START_INVISIBLE_ABILITY"
}
]
}
}
\ No newline at end of file
......@@ -41,6 +41,16 @@
"visible": true,
"launchType": "singleton"
}
],
"requestPermissions": [
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
},
{
"name":"ohos.permission.START_INVISIBLE_ABILITY",
"reason":"need use ohos.permission.START_INVISIBLE_ABILITY"
}
]
}
}
\ No newline at end of file
......@@ -41,6 +41,16 @@
"visible": true,
"launchType": "singleton"
}
],
"requestPermissions": [
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
},
{
"name":"ohos.permission.START_INVISIBLE_ABILITY",
"reason":"need use ohos.permission.START_INVISIBLE_ABILITY"
}
]
}
}
\ No newline at end of file
......@@ -46,6 +46,16 @@
"icon": "$media:icon",
"label": "$string:Ability2_label"
}
],
"requestPermissions": [
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
},
{
"name":"ohos.permission.START_INVISIBLE_ABILITY",
"reason":"need use ohos.permission.START_INVISIBLE_ABILITY"
}
]
}
}
\ No newline at end of file
......@@ -46,6 +46,16 @@
"icon": "$media:icon",
"label": "$string:Ability2_label"
}
],
"requestPermissions": [
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
},
{
"name":"ohos.permission.START_INVISIBLE_ABILITY",
"reason":"need use ohos.permission.START_INVISIBLE_ABILITY"
}
]
}
}
\ No newline at end of file
......@@ -9,7 +9,7 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
......
......@@ -9,7 +9,7 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
......
......@@ -9,7 +9,7 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
......
......@@ -9,7 +9,7 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
......
......@@ -54,8 +54,11 @@ export default function OnAndOffScreenTest() {
async function slideScreen(TAG) {
console.log(TAG + "slideScreen start");
var driver = UiDriver.create();
await driver.swipe(1000, 3000, 1000, 500, 1200);
await driver.delayMs(500);
await driver.swipe(1000, 3000, 1000, 500, 1200).then((data) => {
console.log(TAG + "swipe : " + JSON.stringify(data));
}).catch((error) => {
console.log(TAG + "swipe error = " + JSON.stringify(error));
})
console.log(TAG + "slideScreen end");
}
......
......@@ -34,6 +34,16 @@
}
]
}
],
"requestPermissions": [
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
},
{
"name":"ohos.permission.START_INVISIBLE_ABILITY",
"reason":"need use ohos.permission.START_INVISIBLE_ABILITY"
}
]
}
}
\ No newline at end of file
......@@ -34,6 +34,16 @@
}
]
}
],
"requestPermissions": [
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
},
{
"name":"ohos.permission.START_INVISIBLE_ABILITY",
"reason":"need use ohos.permission.START_INVISIBLE_ABILITY"
}
]
}
}
\ No newline at end of file
......@@ -13,13 +13,13 @@
* limitations under the License.
*/
import commonEvent from "@ohos.commonEvent"
import featureAbility from '@ohos.ability.featureAbility'
import particleAbility from '@ohos.ability.particleAbility'
export default {
onStart() {
console.info('ServiceAbility onStart');
commonEvent.publish("ACTS_InterfaceMultiUsers_0100_Start_CommonEvent", () => {
console.log(" Publish ACTS_InterfaceMultiUsersExtension_CommonEvent callback")
featureAbility.terminateSelf().then(() => {
particleAbility.terminateSelf().then(() => {
console.log('terminateSelf promise');
commonEvent.publish("ACTS_TerminateSelf_CommonEvent", () => {
console.log(" Publish ACTS_TerminateSelf_CommonEvent callback")
......
......@@ -114,6 +114,14 @@
{
"name": "ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION",
"reason": "need use ohos.permission.MANAGE_LOCAL_ACCOUNTS"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
},
{
"name":"ohos.permission.START_INVISIBLE_ABILITY",
"reason":"need use ohos.permission.START_INVISIBLE_ABILITY"
}
]
}
......
......@@ -9,7 +9,7 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
......
......@@ -92,6 +92,14 @@
{
"name": "ohos.permission.GET_RUNNING_INFO",
"reason": "need use ohos.permission.GET_RUNNING_INFO"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
},
{
"name":"ohos.permission.START_INVISIBLE_ABILITY",
"reason":"need use ohos.permission.START_INVISIBLE_ABILITY"
}
]
}
......
......@@ -73,6 +73,14 @@
{
"name": "ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason": "need use ohos.permission.GET_RUNNING_INFO"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
},
{
"name":"ohos.permission.START_INVISIBLE_ABILITY",
"reason":"need use ohos.permission.START_INVISIBLE_ABILITY"
}
]
}
......
......@@ -9,7 +9,7 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
......
......@@ -9,7 +9,7 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
......
......@@ -28,7 +28,7 @@ struct Index {
@State bundle: string = "com.example.apicoverhaptest";
@State ability: string = "FormAbility";
@State moduleName: string = "phone";
@State name: string = "widget";
@State name: string = "form1";
private dimension: FormDimension = FormDimension.Dimension_2_2;
private temporary = false;
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Ability from '@ohos.application.Ability'
export default class MainAbility extends Ability {
onCreate(want, launchParam) {
console.log("[Demo] FormHostAbility onCreate")
globalThis.abilityWant = want;
globalThis.applicationContext = this.context.getApplicationContext();
}
onDestroy() {
console.log("[Demo] FormHostAbility onDestroy")
}
onWindowStageCreate(windowStage) {
// Main window is created, set main page for this ability
console.log("[Demo] FormHostAbility onWindowStageCreate")
globalThis.abilityContext = this.context;
windowStage.setUIContent(this.context, "FormHostAbility/pages/MainAbility_pages", null)
}
onWindowStageDestroy() {
// Main window is destroyed, release UI related resources
console.log("[Demo] FormHostAbility onWindowStageDestroy")
}
onForeground() {
// Ability has brought to foreground
console.log("[Demo] FormHostAbility onForeground")
}
onBackground() {
// Ability has back to background
console.log("[Demo] FormHostAbility onBackground")
}
};
// @ts-nocheck
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import router from '@ohos.router';
@Entry
@Component
struct Index {
@State message: string = 'FormHostAbility'
@State isShowing: boolean = true;
@State formId: number = 0;
@State bundle: string = "com.example.apicoverhaptest";
@State ability: string = "FormAbility";
@State moduleName: string = "phone";
@State name: string = "widget";
private dimension: FormDimension = FormDimension.Dimension_2_1;
private temporary = false;
build() {
Row() {
Column() {
FormComponent({
id: this.formId,
name: this.name,
bundle: this.bundle,
ability: this.ability,
module: this.moduleName,
dimension: this.dimension,
temporary: this.temporary,
})
.allowUpdate(this.allowUpate)
.visibility(this.isShowing ? Visibility.Visible : Visibility.Hidden)
.onAcquired((form) => {
console.log("[FormComponent.FormHostAbility] get form, form id:" + form.id);
globalThis.formId21 = form.id
})
.onError((error) => {
console.log("[FormComponent.FormHostAbility] error code:" + error.errcode);
console.log("[FormComponent.FormHostAbility] error msg:" + error.msg);
})
Text(this.message)
.fontSize(50)
.fontWeight(FontWeight.Bold)
}
.width('100%')
}
.height('100%')
}
}
\ No newline at end of file
......@@ -20,6 +20,7 @@ import rpc from '@ohos.rpc';
export default class ServiceAbility extends ServiceExtension {
onCreate(want:Want) {
globalThis.abilityWant = want;
globalThis.serviceContext = this.context
let direction = this.context.config.direction
let pointerDervice = this.context.config.hasPointerDevice
let AbilityInfo = this.context.extensionAbilityInfo.bundleName
......
......@@ -35,11 +35,10 @@ function sleep(time) {
export default function ApiCoverTest() {
describe('ApiCoverTestTest', function () {
afterEach(async (done) => {
setTimeout(function () {
done();
}, 2000);
}, 2500);
})
/*
......@@ -242,19 +241,21 @@ export default function ApiCoverTest() {
expect("/data/storage/el1/bundle").assertEqual(globalThis.abilityContext.bundleCodeDir)
expect("/data/storage/el2/distributedfiles").assertEqual(globalThis.abilityContext.distributedFilesDir)
expect(1).assertEqual(globalThis.abilityContext.area)
let moduleContext = globalThis.abilityContext.createModuleContext("module1")
let moduleContext = globalThis.abilityContext.createModuleContext("module1")
expect("/data/storage/el2/base/cache").assertEqual(moduleContext.cacheDir)
globalThis.abilityContext.resourceManager.getConfiguration((err, data) => {
if(err == undefined){
globalThis.abilityContext.area = 0
expect(0).assertEqual(globalThis.abilityContext.area)
globalThis.abilityContext.resourceManager.getConfiguration((err, data) => {
if(err == undefined){
console.log(`Ability: getConfiguration success: ${JSON.stringify(data)}`);
console.log(`Ability: getConfiguration success: JSON.stringify(data.direction)`);
console.log(`Ability: getConfiguration success: JSON.stringify(data.direction)`);
expect(0).assertEqual(data.direction)
done()
}else{
expect().assertFail()
}else{
expect().assertFail()
done()
}
})
}
})
})
/*
......@@ -338,6 +339,12 @@ export default function ApiCoverTest() {
expect(-1).assertEqual(FormInfo.FormState.UNKNOWN)
expect(0).assertEqual(FormInfo.ColorMode.MODE_DARK)
expect(1).assertEqual(FormInfo.ColorMode.MODE_LIGHT)
console.info("SUB_AA_Form_provider_TestFormInfo_0100:" + FormInfo.FormDimension.Dimension_2_1);
expect(1).assertEqual(FormInfo.FormDimension.Dimension_1_2)
expect(2).assertEqual(FormInfo.FormDimension.Dimension_2_2)
expect(3).assertEqual(FormInfo.FormDimension.Dimension_2_4)
expect(4).assertEqual(FormInfo.FormDimension.Dimension_4_4)
expect(5).assertEqual(FormInfo.FormDimension.Dimension_2_1)
done();
});
......@@ -391,10 +398,13 @@ export default function ApiCoverTest() {
* @tc.desc Function test
* @tc.level 3
*/
it('SUB_AA_AbilityConstant_0200', 0, async function (done) {
it('SUB_AA_Test_AbilityConstant_0100', 0, async function (done) {
expect(1).assertEqual(abilityConstant.LaunchReason.START_ABILITY)
expect(1).assertEqual(abilityConstant.LastExitReason.ABILITY_NOT_RESPONDING)
expect(2).assertEqual(abilityConstant.LastExitReason.NORMAL)
expect(0).assertEqual(abilityConstant.MemoryLevel.MEMORY_LEVEL_MODERATE)
expect(1).assertEqual(abilityConstant.MemoryLevel.MEMORY_LEVEL_LOW)
expect(2).assertEqual(abilityConstant.MemoryLevel.MEMORY_LEVEL_CRITICAL)
done()
});
......@@ -462,6 +472,9 @@ export default function ApiCoverTest() {
* @tc.level 3
*/
it('SUB_AA_FMS_AbilityStage_0100', 0, async function (done) {
console.info("SUB_AA_FMS_AbilityStage_0100===AbilityStage===" + JSON.stringify(globalThis.stageContext))
console.info("SUB_AA_FMS_AbilityStage_0100===AbilityStage===" + JSON.stringify(globalThis.stageContext.config))
let directions = globalThis.stageContext.config.direction
let subscriber = null
let subscribeInfo = {
events: ["AbilityStage_StartAbility"]
......@@ -470,10 +483,12 @@ export default function ApiCoverTest() {
console.info("SUB_AA_FMS_AbilityStage_0100===UnSubscribeInfoCallback===")
done()
}
function SubscribeInfoCallback(err, data) {
async function SubscribeInfoCallback(err, data) {
console.info("SUB_AA_FMS_AbilityStage_0100===SubscribeInfoCallback===" + JSON.stringify(data))
expect(data.parameters["config"]).assertEqual(-1)
expect(data.parameters["config"]).assertEqual(directions)
commonEvent.unsubscribe(subscriber, UnSubscribeInfoCallback)
await sleep(4000)
done()
}
commonEvent.createSubscriber(subscribeInfo, (err, data) => {
......@@ -490,6 +505,7 @@ export default function ApiCoverTest() {
if(err.code == 0){
console.info("SUB_AA_FMS_AbilityStage_0100===CreateSubscriberCallback===")
}else{
console.info("SUB_AA_FMS_AbilityStage_0100===failed===")
expect().assertFail()
done()
}
......@@ -504,25 +520,34 @@ export default function ApiCoverTest() {
*/
it('SUB_AA_FMS_AbilityStage_0200', 0, async function (done) {
let subscriber = null
let subscribeInfo = {
events: ["ExtensionConext_StartAbility"]
}
function UnSubscribeInfoCallback(err, data) {
console.info("SUB_AA_FMS_AbilityStage_0200===UnSubscribeInfoCallback===")
}
function SubscribeInfoCallback(err, data) {
console.info("SUB_AA_FMS_AbilityStage_0200===SubscribeInfoCallback===" + JSON.stringify(data))
expect(data.parameters["config"]).assertLess(2)
expect(data.parameters["poniterDevices"]).assertFalse()
expect(data.parameters["AbilityInfo"]).assertEqual("com.example.apicoverhaptest")
commonEvent.unsubscribe(subscriber, UnSubscribeInfoCallback)
done()
}
commonEvent.createSubscriber(subscribeInfo, (err, data) => {
console.info("SUB_AA_FMS_AbilityStage_0200===CreateSubscriberCallback===")
subscriber = data
commonEvent.subscribe(subscriber, SubscribeInfoCallback)
})
let subscribeInfo = {
events: ["ExtensionConext_StartAbility"]
}
function UnSubscribeInfoCallback(err, data) {
console.info("SUB_AA_FMS_AbilityStage_0200===UnSubscribeInfoCallback===")
}
async function SubscribeInfoCallback(err, data) {
console.info("SUB_AA_FMS_AbilityStage_0200===SubscribeInfoCallback===" + JSON.stringify(data))
console.info("SUB_AA_FMS_AbilityStage_0200===serviceContext===" + JSON.stringify(globalThis.serviceContext))
console.info("SUB_AA_FMS_AbilityStage_0200===config===" + JSON.stringify(globalThis.serviceContext.config))
expect(data.parameters["config"]).assertLess(2)
expect(data.parameters["poniterDevices"]).assertFalse()
expect(data.parameters["AbilityInfo"]).assertEqual("com.example.apicoverhaptest")
let direction = globalThis.serviceContext.config.direction
let pointerDervice = globalThis.serviceContext.config.hasPointerDevice
let AbilityInfo = globalThis.serviceContext.extensionAbilityInfo.bundleName
expect(direction).assertLess(2)
expect(pointerDervice).assertFalse()
expect(AbilityInfo).assertEqual("com.example.apicoverhaptest")
commonEvent.unsubscribe(subscriber, UnSubscribeInfoCallback)
await sleep(4000)
done()
}
commonEvent.createSubscriber(subscribeInfo, (err, data) => {
console.info("SUB_AA_FMS_AbilityStage_0200===CreateSubscriberCallback===")
subscriber = data
commonEvent.subscribe(subscriber, SubscribeInfoCallback)
})
let formWant ={
deviceId:"",
bundleName:"com.example.apicoverhaptest",
......@@ -582,5 +607,56 @@ export default function ApiCoverTest() {
}
})
})
/*
* @tc.number SUB_AA_FormDisplaySpecifications_0100
* @tc.name Create a form and delete.
* @tc.desc Function test
* @tc.level 3
*/
it('SUB_AA_FormDisplaySpecifications_0100', 0, async function (done) {
let formWant ={
deviceId:"",
bundleName:"com.example.apicoverhaptest",
abilityName:"FormHostAbility",
}
globalThis.abilityContext.startAbility(formWant, (err, data)=>{
if(err.code == 0){
console.info("SUB_AA_FormDisplaySpecifications_0100===abilityContext startAbility success===")
}else{
expect().assertFail()
done()
}
})
await sleep(2000)
console.info("SUB_AA_FormDisplaySpecifications_0100===globalThis.formId21 success===" + globalThis.formId21)
expect(globalThis.formId21 != undefined).assertTrue()
formHost.deleteForm(globalThis.formId21).then((data)=>{
console.info("SUB_AA_FormDisplaySpecifications_0100===deleteForm success===")
done()
}).catch((err)=>{
console.info("SUB_AA_FormDisplaySpecifications_0100===deleteForm failed===")
expect().assertFail()
done()
})
})
/*
* @tc.number SUB_AA_FormDisplaySpecifications_0200
* @tc.name get the form info.
* @tc.desc Function test
* @tc.level 3
*/
it('SUB_AA_FormDisplaySpecifications_0200', 0, async function (done) {
await formHost.getFormsInfo("com.example.apicoverhaptest", "phone").then((data)=>{
console.info("SUB_AA_FormDisplaySpecifications_0200===deleteForm success===" + JSON.stringify(data))
expect(5).assertEqual(data[0].defaultDimension)
done()
}).catch((err)=>{
console.info("SUB_AA_FormDisplaySpecifications_0200===deleteForm failed===" + JSON.stringify(err))
expect().assertFail()
done()
})
})
})
}
......@@ -55,6 +55,17 @@
"startWindowBackground": "$color:white",
"visible": true,
"launchType": "singleton"
},
{
"name": "FormHostAbility",
"srcEntrance": "./ets/FormHostAbility/FormHostAbility.ts",
"description": "$string:phone_entry_main",
"icon": "$media:icon",
"label": "$string:entry_label",
"startWindowIcon": "$media:icon",
"startWindowBackground": "$color:white",
"visible": true,
"launchType": "singleton"
}
],
"extensionAbilities": [
......@@ -76,7 +87,8 @@
"srcEntrance": "./ets/ServiceAbility/ServiceAbility.ts",
"label": "$string:MainAbility_label",
"description": "$string:MainAbility_desc",
"type": "service"
"type": "service",
"visible": true
}
],
"requestPermissions":[
......@@ -88,6 +100,12 @@
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND"
},
{
"name":"ohos.permission.START_INVISIBLE_ABILITY"
}
]
}
......
......@@ -4,7 +4,7 @@
"isDefault": true,
"src": "./js/widget/pages/index/index",
"scheduledUpdateTime": "10:30",
"defaultDimension": "2*2",
"defaultDimension": "2*1",
"name": "widget",
"description": "This is a service widget.",
"colorMode": "auto",
......@@ -13,6 +13,25 @@
"autoDesignWidth": true
},
"formConfigAbility": "ability://xxxxx",
"supportDimensions": [
"2*1"
],
"updateEnabled": true,
"updateDuration": 1
},
{
"isDefault": false,
"src": "./js/widget/pages/index/index",
"scheduledUpdateTime": "10:30",
"defaultDimension": "2*2",
"name": "form1",
"description": "This is a service widget.",
"colorMode": "auto",
"window": {
"designWidth": 720,
"autoDesignWidth": true
},
"formConfigAbility": "ability://xxxxx",
"supportDimensions": [
"2*2"
],
......
......@@ -2,6 +2,7 @@
"src": [
"MainAbility/pages/MainAbility_pages",
"SecondAbility/pages/MainAbility_pages",
"CreateFormAbility/pages/MainAbility_pages"
"CreateFormAbility/pages/MainAbility_pages",
"FormHostAbility/pages/MainAbility_pages"
]
}
\ No newline at end of file
......@@ -61,6 +61,12 @@
"icon": "$media:icon",
"label": "$string:MainAbility5_label"
}
],
"requestPermissions": [
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
]
}
}
\ No newline at end of file
......@@ -9,7 +9,7 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
......
......@@ -9,7 +9,7 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
......
......@@ -9,7 +9,7 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
......
......@@ -112,6 +112,12 @@
"testRunner": {
"name": "OpenHarmonyTestRunner",
"srcPath": "TestRunner"
}
},
"reqPermissions": [
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
]
}
}
\ No newline at end of file
......@@ -9,7 +9,7 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
......
......@@ -9,7 +9,7 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
......
......@@ -9,7 +9,7 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
......
......@@ -5,7 +5,8 @@
"test-timeout": "600000",
"bundle-name": "com.example.faapicoverhaptest",
"package-name": "com.example.faapicoverhaptest",
"shell-timeout": "600000"
"shell-timeout": "600000",
"testcase-timeout": 70000
},
"kits": [
{
......
......@@ -16,6 +16,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "
import FormInfo from '@ohos.application.formInfo';
import formError from '@ohos.application.formError';
import featureAbility from '@ohos.ability.featureAbility'
export default function ApiCoverTest() {
describe('ApiCoverTestTest', function () {
......@@ -75,5 +76,40 @@ export default function ApiCoverTest() {
expect(1).assertEqual(FormInfo.FormState.READY)
done();
});
/*
* @tc.number SUB_AA_OpenHarmony_CoverApiContext_0100
* @tc.name Test getExternalCacheDir by callback.
* @tc.desc Function test
* @tc.level 0
*/
it('SUB_AA_OpenHarmony_CoverApiContext_0100', 0, async function (done) {
console.log("------------start SUB_AA_OpenHarmony_CoverApi_0500-------------");
let appContext = featureAbility.getContext()
appContext.getExternalCacheDir((err, data) => {
console.info('SUB_AA_OpenHarmony_CoverApiContext_0100 successful. data: ' + JSON.stringify(data));
expect(true).assertTrue()
done()
})
})
/*
* @tc.number SUB_AA_OpenHarmony_CoverApiContext_0200
* @tc.name Test getExternalCacheDir by promise.
* @tc.desc Function test
* @tc.level 0
*/
it('SUB_AA_OpenHarmony_CoverApiContext_0200', 0, async function (done) {
console.log("------------start SUB_AA_OpenHarmony_CoverApi_0500-------------");
let appContext = featureAbility.getContext()
appContext.getExternalCacheDir().then((data)=>{
console.info('SUB_AA_OpenHarmony_CoverApiContext_0200 successful. data: ' + JSON.stringify(data));
expect(true).assertTrue()
done()
}).catch((err)=>{
expect().assertFalse();
done()
})
})
})
}
\ No newline at end of file
......@@ -134,35 +134,26 @@ export default function verificationTest(){
try {
let list1 = []
let list2 = ["Fa_Auxiliary_MainAbility4_onDestroy", "Fa_Auxiliary_MainAbility5_onDestroy"]
let list2 = ["Fa_Auxiliary_MainAbility4_onDestroy"]
let number1 = undefined
let number2 = undefined
let number3 = undefined
let code1 = 536870912
let code2 = 2048
let subscriber = null
let subscribeInfo = {
events: ["Fa_Auxiliary_MainAbility4_onCreate", "Fa_Auxiliary_MainAbility4_onDestroy",
"Fa_Auxiliary_MainAbility5_onCreate", "Fa_Auxiliary_MainAbility5_onDestroy"]
events: ["Fa_Auxiliary_MainAbility4_onCreate", "Fa_Auxiliary_MainAbility4_onDestroy"]
}
function SubscribeInfoCallback(err, data) {
console.info(TAG + "===SubscribeInfoCallback===" + JSON.stringify(data))
if (data.event == "Fa_Auxiliary_MainAbility4_onCreate") {
number1 = data.parameters.flags
}
if (data.event == "Fa_Auxiliary_MainAbility5_onCreate") {
number2 = data.parameters.flags
}
if (data.event == "Fa_Auxiliary_MainAbility4_onDestroy") {
list1[0] = "Fa_Auxiliary_MainAbility4_onDestroy"
}
if (data.event == "Fa_Auxiliary_MainAbility5_onDestroy") {
list1[1] = "Fa_Auxiliary_MainAbility5_onDestroy"
}
if (JSON.stringify(list1) == JSON.stringify(list2)) {
expect(number3).assertEqual(1);
expect(number1).assertEqual(code1);
expect(number2).assertEqual(code2);
commonEvent.unsubscribe(subscriber, UnSubscribeInfoCallback)
}
}
......@@ -204,21 +195,6 @@ export default function verificationTest(){
expect().assertFail();
done();
});
let wantNum3 = {
want: {
bundleName: 'ohos.acts.aafwk.test.faauxiliary',
abilityName: 'ohos.acts.aafwk.test.faauxiliary.MainAbility5',
flags: wantConstant.Flags.FLAG_INSTALL_ON_DEMAND
}
}
await ability_featureAbility.startAbility(wantNum3).then((data) => {
console.info(TAG + "startAbility data = " + JSON.stringify(data));
}).catch((err) => {
console.info(TAG + "startAbility err = " + JSON.stringify(err));
expect().assertFail();
done();
});
} catch (err) {
console.info(TAG + "catch err = " + JSON.stringify(err));
expect().assertFail();
......
......@@ -121,6 +121,10 @@
{
"name": "ohos.permission.ACCELEROMETER",
"reason":"need use ohos.permission.ACCELEROMETER"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
],
"js": [
......
......@@ -133,6 +133,10 @@
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
],
"js": [
......
......@@ -132,6 +132,10 @@
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
],
"js": [
......
......@@ -154,6 +154,10 @@
{
"name": "ohos.permission.SET_TIME",
"reason": "need use ohos.permission.SET_TIME"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
],
"js": [
......
......@@ -131,6 +131,10 @@
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
],
"js": [
......
......@@ -43,7 +43,7 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => {
formHost.getFormsInfo(bundleName, (error, data) => {
console.log(`FMS_fuzzTest_getinfobundle ${tcNumber} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`);
expect(data).assertUndefined();
if (`STRING` === dataType) {
if (`string` === typeof bundleName) {
expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE);
expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED);
} else {
......@@ -79,7 +79,7 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => {
expect().assertFail();
} catch (error) {
console.log(`FMS_fuzzTest_getinfobundle ${tcNumber} exception caught: ${JSON.stringify(error)}`);
if (`STRING` === dataType) {
if (`string` === typeof bundleName) {
expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE);
expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED);
} else {
......@@ -108,7 +108,7 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => {
formHost.getFormsInfo(bundleName, moduleName, (error, data) => {
console.log(`${callbackName} ${tcNumber} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`);
expect(data).assertUndefined();
if (`STRING` === dataType) {
if (`string` === typeof bundleName) {
expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE);
expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED);
} else {
......@@ -146,7 +146,7 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => {
expect().assertFail();
} catch (error) {
console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`);
if (`STRING` === dataType) {
if (`string` === typeof bundleName) {
expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE);
expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED);
} else {
......@@ -175,7 +175,7 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => {
formHost.getFormsInfo(bundleName, moduleName, (error, data) => {
console.log(`${callbackName} ${tcNumber} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`);
expect(data).assertUndefined();
if (`STRING` === dataType) {
if (`string` === typeof moduleName) {
expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE);
expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED);
} else {
......@@ -212,7 +212,7 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => {
expect().assertFail();
} catch (error) {
console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`);
if (`STRING` === dataType) {
if (`string` === typeof moduleName) {
expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE);
expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED);
} else {
......
......@@ -76,7 +76,7 @@ export const releaseFormFuzzTest = (describeName, filterParameter) => {
expect().assertFail();
} catch (error) {
console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`);
if (`STRING` === dataType) {
if (`string` === typeof formId) {
expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE);
expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM);
} else {
......@@ -137,7 +137,7 @@ export const releaseFormFuzzTest = (describeName, filterParameter) => {
expect().assertFail();
} catch (error) {
console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`);
if (`STRING` === dataType) {
if (`string` === typeof formId) {
expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE);
expect(error.message).assertEqual(ERR_ADD_INVALID_PARAM);
} else {
......@@ -166,7 +166,7 @@ export const releaseFormFuzzTest = (describeName, filterParameter) => {
formHost.releaseForm(formId, isReleaseCache, (error, data) => {
console.log(`${callbackName} ${tcNumber} releaseForm data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`);
expect(data).assertUndefined();
if (`BOOLEAN` === dataType) {
if (`boolean` === typeof isReleaseCache) {
expect(error.code).assertEqual(ERR_NOT_EXIST_ID_CODE);
expect(error.message).assertEqual(ERR_NOT_EXIST_ID);
} else {
......@@ -203,7 +203,7 @@ export const releaseFormFuzzTest = (describeName, filterParameter) => {
expect().assertFail();
} catch (error) {
console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`);
if (`BOOLEAN` === dataType) {
if (`boolean` === typeof isReleaseCache) {
expect(error.code).assertEqual(ERR_NOT_EXIST_ID_CODE);
expect(error.message).assertEqual(ERR_NOT_EXIST_ID);
} else {
......
......@@ -104,7 +104,7 @@ export const setFormNextRefreshTimeFuzzTest = (describeName, filterParameter) =>
formProvider.setFormNextRefreshTime(formId, nextTime, (error, data) => {
console.log(`${callbackName} ${tcNumber} setFormNextRefreshTime data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`);
expect(data).assertUndefined();
if (`NUMBER` === dataType) {
if (`number` === typeof nextTime) {
if (ERR_NOT_EXIST_ID_CODE === error.code) {
expect(error.message).assertEqual(ERR_NOT_EXIST_ID);
} else if (ERR_ADD_INVALID_PARAM_CODE === error.code) {
......@@ -147,7 +147,7 @@ export const setFormNextRefreshTimeFuzzTest = (describeName, filterParameter) =>
expect().assertFail();
} catch (error) {
console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`);
if (`NUMBER` === dataType) {
if (`number` === typeof nextTime) {
if (ERR_NOT_EXIST_ID_CODE === error.code) {
expect(error.message).assertEqual(ERR_NOT_EXIST_ID);
} else if (ERR_ADD_INVALID_PARAM_CODE === error.code) {
......
......@@ -148,7 +148,13 @@ const functionTest = function () {
const getFuzzData = (datatype: string) => {
switch (datatype) {
case 'ARRAY':
return arrayTest();
let array1 = arrayTest();
let array2 = array1
if (isNaN(Number(array1.join("")))) {
return array2;
} else {
getFuzzData(DATA_TYPE_LIST[0]);
}
case 'BOOLEAN':
return booleanTest();
case 'FUNCTION':
......
......@@ -139,6 +139,10 @@
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
],
"js": [
......
......@@ -141,6 +141,10 @@
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
],
"js": [
......
......@@ -141,6 +141,10 @@
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
],
"js": [
......
......@@ -141,6 +141,10 @@
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
],
"js": [
......
......@@ -141,6 +141,14 @@
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
},
{
"name":"ohos.permission.START_INVISIBLE_ABILITY",
"reason":"need use ohos.permission.START_INVISIBLE_ABILITY"
}
],
"js": [
......
......@@ -141,6 +141,10 @@
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
],
"js": [
......
......@@ -160,6 +160,10 @@
},
{
"name": "ohos.permission.CLEAN_APPLICATION_DATA"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
],
"js": [
......
......@@ -68,7 +68,17 @@ export default function test() {
commonEvent.unsubscribe(onDeletedEventSubscriber, () => unsubscribeCallback("afterEach unsubscribe onDeletedEventSubscriber"));
commonEvent.unsubscribe(onAcquiredEventSubscriber, () => unsubscribeCallback("afterEach unsubscribe onAcquiredEventSubscriber"));
commonEvent.unsubscribe(onSupplyEventSubscriber, () => unsubscribeCallback("afterEach unsubscribe onSupplyEventSubscriber"));
await sleep(1000);
await featureAbility.startAbility({
want: {
bundleName: "com.ohos.st.formstresstest",
abilityName: "com.ohos.st.formstresstest.MainAbility"
}
}).then((data) => {
console.log("FmsStressTest startAbility data: " + JSON.stringify(data));
}).catch((err) => {
console.log("FmsStressTest startAbility err: " + JSON.stringify(err));
})
await sleep(2000);
})
const subscribeDeletedEvent = (tcNumber, expectedDeletedFormAmount, done) => {
......
......@@ -150,6 +150,10 @@
{
"name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
],
"js": [
......
......@@ -65,7 +65,17 @@ export default function test() {
commonEvent.unsubscribe(subscriberOnDeleted, () => unsubscribeCallback("afterEach unsubscribe subscriberOnDeleted"));
commonEvent.unsubscribe(subscriberOnRefresh, () => unsubscribeCallback("afterEach unsubscribe subscriberOnRefresh"));
commonEvent.unsubscribe(subscriberOnRequest, () => unsubscribeCallback("afterEach unsubscribe subscriberOnRequest"));
await sleep(1000);
await featureAbility.startAbility({
want: {
bundleName: "com.ohos.st.formupdaterefreshtest",
abilityName: "com.ohos.st.formupdaterefreshtest.MainAbility"
}
}).then((data) => {
console.log("FmsUpdateRefreshFormTest startAbility data: " + JSON.stringify(data));
}).catch((err) => {
console.log("FmsUpdateRefreshFormTest startAbility err: " + JSON.stringify(err));
})
await sleep(2000);
})
/**
* @tc.number: FMS_updateForm_0100
......
......@@ -12,13 +12,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import ConnectAbilityTest1 from './ConnectAbilityTest1'
import ConnectAbilityTest from './ConnectAbilityTest'
import connectAbilityTest_PA from './connectAbilityTest_PA'
import ConnectAbilityTest from './ConnectAbilityTest'
import ConnectAbilityTest1 from './ConnectAbilityTest1'
export default function testsuite() {
ConnectAbilityTest1();
ConnectAbilityTest();
connectAbilityTest_PA();
}
\ No newline at end of file
export default function testsuite() {
connectAbilityTest_PA();
ConnectAbilityTest();
ConnectAbilityTest1();
}
......@@ -17,7 +17,7 @@ import featureAbility from '@ohos.ability.featureAbility';
export default {
onCreate() {
console.info('Application onCreate')
setTimeout(function () {
setTimeout(()=> {
featureAbility.terminateSelf()
.then((data) => {
console.info('[Demo] MainAbility2 terminateself succeeded: ' + data);
......
......@@ -127,6 +127,12 @@
},
{
"name": "ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND"
},
{
"name":"ohos.permission.START_INVISIBLE_ABILITY"
}
]
}
......
......@@ -133,6 +133,14 @@
{
"reason": "need use ohos.permission.LISTEN_BUNDLE_CHANGE",
"name": "ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
},
{
"name":"ohos.permission.START_INVISIBLE_ABILITY",
"reason":"need use ohos.permission.START_INVISIBLE_ABILITY"
}
]
}
......
......@@ -46,7 +46,7 @@ export default function StartAbilityForResult2() {
})
await Utils.sleep(500);
var cmd3 = "cp data/test/AtomizationResultFaEntry.hap /data/app/el2/100/base/com.ohos.hag.famanager/haps/" +
"entry/files";
"entry/files";
delegator.executeShellCommand(cmd3, (err: any, d: any) => {
console.info("executeShellCommand3 : err : " + JSON.stringify(err), " data : " + JSON.stringify(d));
done();
......@@ -92,10 +92,10 @@ export default function StartAbilityForResult2() {
}
featureAbility.startAbilityForResult(str1)
.then((data) => {
console.info(TAG + ' StartAbilityForResultPromise successful. Data: ' + JSON.stringify(data))
console.info(TAG + ' StartAbilityForResultPromise2200 successful. Data: ' + JSON.stringify(data))
}).catch((error) => {
console.info(TAG + ' StartAbilityForResultPromise failed. Cause: ' + JSON.stringify(error));
})
console.info(TAG + ' StartAbilityForResultPromise2200 failed. Cause: ' + JSON.stringify(error));
})
await Utils.sleep(3000);
let wrong;
var str = {
......@@ -108,10 +108,10 @@ export default function StartAbilityForResult2() {
}
await featureAbility.startAbilityForResult(str)
.then((data) => {
console.info(TAG + ' StartAbilityForResultPromise successful. Data: ' + JSON.stringify(data))
console.info(TAG + ' StartAbilityForResultPromise2200 successful. Data: ' + JSON.stringify(data))
}).catch((error) => {
wrong = error;
console.info(TAG + ' StartAbilityForResultPromise failed. Cause: ' + JSON.stringify(error));
console.info(TAG + ' StartAbilityForResultPromise2200 failed. Cause: ' + JSON.stringify(error));
})
await Utils.sleep(2000);
expect(wrong.code).assertEqual(13);
......@@ -128,7 +128,8 @@ export default function StartAbilityForResult2() {
it("FreeInstall_FA_StartAbilityForResult_2300", 0, async function (done) {
console.log("------------start FreeInstall_FA_StartAbilityForResult_2300-------------");
TAG = "FreeInstall_FA_StartAbilityForResult_2300";
var cmd19 = "bm install -p data/test/AtomizationResultFaEntry.hap";
var cmd19 = "bm install -rp /data/test/AtomizationResultFaEntry.hap";
console.log("------------start FreeInstall_FA_StartAbilityForResult_2300------install-------");
delegator.executeShellCommand(cmd19, (err: any, d: any) => {
console.info("executeShellCommand19: err : " + JSON.stringify(err), " data : " + JSON.stringify(d));
})
......@@ -142,29 +143,30 @@ export default function StartAbilityForResult2() {
}
featureAbility.startAbilityForResult(str1)
.then((data) => {
console.info(TAG + ' StartAbilityForResultPromise successful. Data: ' + JSON.stringify(data))
console.info(TAG + ' StartAbilityForResultPromise2300 successful. Data1: ' + JSON.stringify(data))
}).catch((error) => {
console.info(TAG + ' StartAbilityForResultPromise failed. Cause: ' + JSON.stringify(error));
})
await Utils.sleep(3000);
let wrong;
var str = {
'want': {
"bundleName": "com.example.qianyiyingyong.hmservice",
"abilityName": "com.example.qianyiyingyong.MainAbility",
"moduleName": "entry",
"flags": wantConstant.Flags.FLAG_INSTALL_ON_DEMAND,
}
}
await featureAbility.startAbilityForResult(str)
.then((data) => {
console.info(TAG + ' StartAbilityForResultPromise successful. Data: ' + JSON.stringify(data))
}).catch((error) => {
wrong = error;
console.info(TAG + ' StartAbilityForResultPromise failed. Cause: ' + JSON.stringify(error));
console.info(TAG + ' StartAbilityForResultPromise2300 failed. Cause1: ' + JSON.stringify(error));
})
await Utils.sleep(2000);
expect(wrong.code).assertEqual(13);
await Utils.sleep(1000);
setTimeout(async () => {
var wrong;
var str = {
'want': {
"bundleName": "com.example.qianyiyingyong.hmservice",
"abilityName": "com.example.qianyiyingyong.MainAbility",
"moduleName": "entry",
"flags": wantConstant.Flags.FLAG_INSTALL_ON_DEMAND,
}
}
await featureAbility.startAbilityForResult(str)
.then((data) => {
console.info(TAG + ' StartAbilityForResultPromise2300 successful. 1Data: ' + JSON.stringify(data))
}).catch((error) => {
wrong = error;
console.info(TAG + ' StartAbilityForResultPromise2300 failed. 1Cause: ' + JSON.stringify(error));
})
expect(wrong.code).assertEqual(13);
}, 2000)
done();
});
......@@ -181,47 +183,45 @@ export default function StartAbilityForResult2() {
delegator.executeShellCommand(cmd20, (err: any, d: any) => {
console.info("executeShellCommand20: err : " + JSON.stringify(err), " data : " + JSON.stringify(d));
})
await Utils.sleep(500);
var cmd21 = "bm install -p data/test/MockServiceTimeout.hap";
delegator.executeShellCommand(cmd21, (err: any, d: any) => {
console.info("executeShellCommand21: err : " + JSON.stringify(err), " data : " + JSON.stringify(d));
})
await Utils.sleep(500);
var cmd1 = "mkdir -p /data/app/el2/100/base/com.ohos.hag.famanager/haps/entry";
delegator.executeShellCommand(cmd1, (err: any, d: any) => {
console.info("executeShellCommand1 : err : " + JSON.stringify(err), " data : " + JSON.stringify(d));
console.info("executeShellCommand11 : err : " + JSON.stringify(err), " data : " + JSON.stringify(d));
})
await Utils.sleep(500);
var cmd2 = "mkdir -p /data/app/el2/100/base/com.ohos.hag.famanager/haps/entry/files";
delegator.executeShellCommand(cmd2, (err: any, d: any) => {
console.info("executeShellCommand2 : err : " + JSON.stringify(err), " data : " + JSON.stringify(d));
console.info("executeShellCommand21 : err : " + JSON.stringify(err), " data : " + JSON.stringify(d));
})
await Utils.sleep(500);
var cmd3 = "cp data/test/AtomizationResultFaEntry.hap /data/app/el2/100/base/com.ohos.hag.famanager/haps/" +
"entry/files";
"entry/files";
delegator.executeShellCommand(cmd3, (err: any, d: any) => {
console.info("executeShellCommand3 : err : " + JSON.stringify(err), " data : " + JSON.stringify(d));
console.info("executeShellCommand31 : err : " + JSON.stringify(err), " data : " + JSON.stringify(d));
})
await Utils.sleep(500);
let wrong;
var str = {
'want': {
"bundleName": "com.example.qianyiyingyong.hmservice",
"abilityName": "com.example.qianyiyingyong.MainAbility",
"moduleName": "entry",
"flags": wantConstant.Flags.FLAG_INSTALL_ON_DEMAND,
setTimeout(async () => {
var wrong;
var str = {
'want': {
"bundleName": "com.example.qianyiyingyong.hmservice",
"abilityName": "com.example.qianyiyingyong.MainAbility",
"moduleName": "entry",
"flags": wantConstant.Flags.FLAG_INSTALL_ON_DEMAND,
}
}
}
featureAbility.startAbilityForResult(str)
.then((data) => {
console.info(TAG + ' StartAbilityForResultPromise successful. Data: ' + JSON.stringify(data))
}).catch((error) => {
wrong = error;
console.info(TAG + ' StartAbilityForResultPromise failed. Cause: ' + JSON.stringify(error));
})
await Utils.sleep(35000);
expect(wrong.code).assertEqual(3);
await featureAbility.startAbilityForResult(str)
.then((data) => {
console.info(TAG + ' StartAbilityForResultPromise2600 successful. Data: ' + JSON.stringify(data))
}).catch((error) => {
wrong = error;
console.info(TAG + ' StartAbilityForResultPromise2600 failed. Cause: ' + JSON.stringify(error));
})
expect(wrong.code).assertEqual(3)
}, 20000)
done();
});
})
}
\ No newline at end of file
}
......@@ -16,19 +16,19 @@
import featureAbility from '@ohos.ability.featureAbility';
export default {
onCreate() {
console.info('Application onCreate')
setTimeout(function () {
featureAbility.terminateSelf()
.then((data) => {
console.info('PageAbility terminateself succeeded: ' + data);
}).catch((error) => {
console.error('PageAbility terminateself failed. Cause: ' + error);
})
}, 8000);
},
onCreate() {
console.info('Applicationfa onCreate')
setTimeout(async () => {
await featureAbility.terminateSelf()
.then((data) => {
console.info('PageAbilityfa terminateself succeeded: ' + data);
}).catch((error) => {
console.error('PageAbilityfa terminateself failed. Cause: ' + error);
})
}, 8000);
},
onDestroy() {
console.info('Application onDestroy')
},
onDestroy() {
console.info('Application onDestroy')
},
}
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册