diff --git a/ability/ability_runtime/BUILD.gn b/ability/ability_runtime/BUILD.gn
index acc30cb3884b1cabcd70ebea55c39361a9052c3e..80824234f356b83924779c2cb2789f41f45fc2db 100644
--- a/ability/ability_runtime/BUILD.gn
+++ b/ability/ability_runtime/BUILD.gn
@@ -28,6 +28,7 @@ group("ability_runtime") {
"actscalldataabilitytest:ActsCallDataAbilityTest",
"actscalldataabilitytest:ActsCallDataAbilityTest",
"actscalltest:actscalltest",
+ "actsdataabilityaccessdatasharetest:dataabilityaccessdatashare",
"actsfwkdataaccessortest:dataability",
"actsqueryfunctiontest:actsqueryfunctiontest",
"actsserviceabilityclienttest:serviceability",
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/BUILD.gn b/ability/ability_runtime/actsdataabilityaccessdatasharetest/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..36dbc7c62c12d71672c4047a09b4a4fe7fa4db55
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/BUILD.gn
@@ -0,0 +1,24 @@
+# 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("//test/xts/tools/build/suite.gni")
+
+group("dataabilityaccessdatashare") {
+ testonly = true
+ if (is_standard_system) {
+ deps = [
+ "actsdataabilityaccessdatasharetest:ActsDataAbilityAccessDataShareTest",
+ "datashareserverhap:DataShareServerHap",
+ ]
+ }
+}
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/BUILD.gn b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..d522afc61be34630a4cf9435dbe5e6336f656a3d
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/BUILD.gn
@@ -0,0 +1,36 @@
+# 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("//test/xts/tools/build/suite.gni")
+
+ohos_js_hap_suite("ActsDataAbilityAccessDataShareTest") {
+ hap_profile = "./src/main/config.json"
+ hap_name = "ActsDataAbilityAccessDataShareTest"
+ deps = [
+ ":hjs_demo_js_assets",
+ ":hjs_demo_resources",
+ ]
+ certificate_profile = "./signature/openharmony_sx.p7b"
+
+ subsystem_name = "ability"
+ part_name = "ability_runtime"
+}
+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"
+}
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/Test.json b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/Test.json
new file mode 100644
index 0000000000000000000000000000000000000000..fb2d778715571b36ef6cb7b319a414fb5e61648e
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/Test.json
@@ -0,0 +1,20 @@
+{
+ "description": "Configuration for hjunit demo Tests",
+ "driver": {
+ "type": "OHJSUnitTest",
+ "test-timeout": "180000",
+ "shell-timeout": "180000",
+ "bundle-name": "com.amsst.dataabilityaccessdatashare",
+ "package-name": "com.amsst.dataabilityaccessdatashare"
+ },
+ "kits": [
+ {
+ "test-file-name": [
+ "ActsDataAbilityAccessDataShareTest.hap",
+ "DataShareServerHap.hap"
+ ],
+ "type": "AppInstallKit",
+ "cleanup-apps": true
+ }
+ ]
+}
\ No newline at end of file
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/signature/openharmony_sx.p7b b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/signature/openharmony_sx.p7b
new file mode 100644
index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5
Binary files /dev/null and b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/signature/openharmony_sx.p7b differ
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/config.json b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/config.json
new file mode 100644
index 0000000000000000000000000000000000000000..76b545b42244d02a3cb7bd311809f99bd91f1e73
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/config.json
@@ -0,0 +1,94 @@
+{
+ "app": {
+ "bundleName": "com.amsst.dataabilityaccessdatashare",
+ "vendor": "amsst",
+ "version": {
+ "code": 1,
+ "name": "1.0"
+ },
+ "apiVersion": {
+ "compatible": 9,
+ "target": 5,
+ "releaseType": "Beta1"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.amsst.dataabilityaccessdatashare",
+ "name": ".entry",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "entry",
+ "moduleType": "entry"
+ },
+ "abilities": [
+ {
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ],
+ "orientation": "unspecified",
+ "formsEnabled": false,
+ "name": ".MainAbility",
+ "srcLanguage": "js",
+ "srcPath": "MainAbility",
+ "icon": "$media:icon",
+ "description": "$string:MainAbility_desc",
+ "label": "$string:MainAbility_label",
+ "type": "page",
+ "visible": true,
+ "launchType": "standard"
+ },
+ {
+ "orientation": "unspecified",
+ "formsEnabled": false,
+ "name": ".TestAbility",
+ "srcLanguage": "js",
+ "srcPath": "TestAbility",
+ "icon": "$media:icon",
+ "description": "$string:TestAbility_desc",
+ "label": "$string:TestAbility_label",
+ "type": "page",
+ "visible": true,
+ "launchType": "standard"
+ }
+ ],
+ "js": [
+ {
+ "pages": [
+ "pages/index/index"
+ ],
+ "name": "default",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ },
+ {
+ "pages": [
+ "pages/index/index"
+ ],
+ "name": ".TestAbility",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": false
+ }
+ }
+ ],
+ "testRunner": {
+ "name": "OpenHarmonyTestRunner",
+ "srcPath": "TestRunner"
+ },
+ "mainAbility": ".MainAbility",
+ "srcPath": ""
+ }
+}
\ No newline at end of file
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/MainAbility/app.js b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/MainAbility/app.js
new file mode 100644
index 0000000000000000000000000000000000000000..5ab30d89d09c11d290f2c64a14b4b27afa5c8a36
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/MainAbility/app.js
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2022 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.
+ */
+export default {
+ onCreate() {
+ console.info('AceApplication onCreate');
+ },
+ onDestroy() {
+ console.info('AceApplication onDestroy');
+ }
+};
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/MainAbility/i18n/en-US.json b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/MainAbility/i18n/en-US.json
new file mode 100644
index 0000000000000000000000000000000000000000..e63c70d978a3a53be988388c87182f81785e170c
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/MainAbility/i18n/en-US.json
@@ -0,0 +1,6 @@
+{
+ "strings": {
+ "hello": "Hello",
+ "world": "World"
+ }
+}
\ No newline at end of file
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/MainAbility/i18n/zh-CN.json b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/MainAbility/i18n/zh-CN.json
new file mode 100644
index 0000000000000000000000000000000000000000..de6ee5748322f44942c1b003319d8e66c837675f
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/MainAbility/i18n/zh-CN.json
@@ -0,0 +1,6 @@
+{
+ "strings": {
+ "hello": "您好",
+ "world": "世界"
+ }
+}
\ No newline at end of file
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/MainAbility/pages/index/index.css b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/MainAbility/pages/index/index.css
new file mode 100644
index 0000000000000000000000000000000000000000..6724ec055a554cf3f9c7be83780c30df2274875b
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/MainAbility/pages/index/index.css
@@ -0,0 +1,12 @@
+.container {
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+}
+
+.title {
+ font-size: 100px;
+}
+.titleST {
+ font-size: 32px;
+}
\ No newline at end of file
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/MainAbility/pages/index/index.hml b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/MainAbility/pages/index/index.hml
new file mode 100644
index 0000000000000000000000000000000000000000..4f779dcdff4fa69413976fe7032ca3656758793a
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/MainAbility/pages/index/index.hml
@@ -0,0 +1,8 @@
+
+
+ {{ $t('strings.hello') }} {{ title }}
+
+
+ STDataAbility
+
+
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/MainAbility/pages/index/index.js b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/MainAbility/pages/index/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..dd962694ee71f8605150daad4626edbb069b3a05
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/MainAbility/pages/index/index.js
@@ -0,0 +1,30 @@
+/*
+ * 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 file from '@system.file'
+import app from '@system.app'
+
+export default {
+ data: {
+ title: ""
+ },
+ onInit() {
+ this.title = this.$t('strings.world');
+ },
+ onShow() {
+ console.info('====onShow finish====<')
+ },
+ onReady() {
+ },
+}
\ No newline at end of file
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/TestAbility/app.js b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/TestAbility/app.js
new file mode 100644
index 0000000000000000000000000000000000000000..d5ee271df29e516d1c8929054283e5f2bf5c981c
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/TestAbility/app.js
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2022 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 AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
+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)
+ },
+ onDestroy() {
+ console.info("TestApplication onDestroy");
+ }
+};
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/TestAbility/i18n/en-US.json b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/TestAbility/i18n/en-US.json
new file mode 100644
index 0000000000000000000000000000000000000000..55561b83737c3c31d082fbfa11e5fc987a351104
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/TestAbility/i18n/en-US.json
@@ -0,0 +1,8 @@
+{
+ "strings": {
+ "hello": "Hello",
+ "world": "World"
+ },
+ "Files": {
+ }
+}
\ No newline at end of file
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/TestAbility/i18n/zh-CN.json b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/TestAbility/i18n/zh-CN.json
new file mode 100644
index 0000000000000000000000000000000000000000..cce1af06761a42add0cac1a0567aa3237eda8cb4
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/TestAbility/i18n/zh-CN.json
@@ -0,0 +1,8 @@
+{
+ "strings": {
+ "hello": "您好",
+ "world": "世界"
+ },
+ "Files": {
+ }
+}
\ No newline at end of file
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/TestAbility/pages/index/index.css b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/TestAbility/pages/index/index.css
new file mode 100644
index 0000000000000000000000000000000000000000..b21c92c6290ea747bd891e2ab673721afc5521ed
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/TestAbility/pages/index/index.css
@@ -0,0 +1,30 @@
+.container {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ left: 0px;
+ top: 0px;
+ width: 100%;
+ height: 100%;
+}
+
+.title {
+ font-size: 60px;
+ text-align: center;
+ width: 100%;
+ height: 40%;
+ margin: 10px;
+}
+
+@media screen and (device-type: phone) and (orientation: landscape) {
+ .title {
+ font-size: 60px;
+ }
+}
+
+@media screen and (device-type: tablet) and (orientation: landscape) {
+ .title {
+ font-size: 100px;
+ }
+}
\ No newline at end of file
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/TestAbility/pages/index/index.hml b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/TestAbility/pages/index/index.hml
new file mode 100644
index 0000000000000000000000000000000000000000..f64b040a5ae394dbaa5e185e1ecd4f4556b92184
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/TestAbility/pages/index/index.hml
@@ -0,0 +1,5 @@
+
+
+ {{ $t('strings.hello') }} {{ title }}
+
+
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/TestAbility/pages/index/index.js b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/TestAbility/pages/index/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..d94b75c085fa1c16a0b2721609b18c57a7295476
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/TestAbility/pages/index/index.js
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2022 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.
+ */
+
+export default {
+ data: {
+ title: ""
+ },
+ onInit() {
+ this.title = this.$t('strings.world');
+ }
+}
+
+
+
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/TestRunner/OpenHarmonyTestRunner.js b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/TestRunner/OpenHarmonyTestRunner.js
new file mode 100644
index 0000000000000000000000000000000000000000..b9e78ce7cf73f1ade6ba52a408a44e33f5430f0d
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/TestRunner/OpenHarmonyTestRunner.js
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2022 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 AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
+
+function translateParamsToString(parameters) {
+ const keySet = new Set([
+ '-s class', '-s notClass', '-s suite', '-s itName',
+ '-s level', '-s testType', '-s size', '-s timeout',
+ '-s package', '-s dryRun'
+ ])
+ let targetParams = '';
+ for (const key in parameters) {
+ if (keySet.has(key)) {
+ targetParams += ' ' + key + ' ' + parameters[key]
+ }
+ }
+ return targetParams.trim()
+}
+
+ export default {
+ onPrepare() {
+ console.info('OpenHarmonyTestRunner OnPrepare')
+ },
+ onRun() {
+ console.log('OpenHarmonyTestRunner onRun run')
+ var abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
+ var abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
+
+ var testAbilityName = abilityDelegatorArguments.parameters['-p'] + '.TestAbility'
+
+ var cmd = 'aa start -d 0 -a ' + testAbilityName + ' -b ' + abilityDelegatorArguments.bundleName
+ cmd += ' ' + translateParamsToString(abilityDelegatorArguments.parameters)
+ var debug = abilityDelegatorArguments.parameters["-D"]
+ console.info('debug value : '+debug)
+ if (debug == 'true')
+ {
+ cmd += ' -D'
+ }
+ console.info('cmd : '+cmd)
+ abilityDelegator.executeShellCommand(cmd, (err, data) => {
+ console.info('executeShellCommand : err : ' + JSON.stringify(err));
+ console.info('executeShellCommand : data : ' + data.stdResult);
+ console.info('executeShellCommand : data : ' + data.exitCode);
+ })
+ }
+};
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/test/DataAbilityHelperJsSt.test.js b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/test/DataAbilityHelperJsSt.test.js
new file mode 100644
index 0000000000000000000000000000000000000000..bbff5f02637b972a113d2c51c230619144b0de13
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/actsdataabilityaccessdatasharetest/src/main/js/test/DataAbilityHelperJsSt.test.js
@@ -0,0 +1,764 @@
+/*
+ * Copyright (C) 2022 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 featureAbility from '@ohos.ability.featureAbility'
+import ohosDataAbility from '@ohos.data.dataAbility'
+import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
+
+export default function ActsDataAbilityHelperTest() {
+describe('ActsDataAbilityHelperTest', function () {
+ let dataAbilityUri = ("dataability:///com.example.dataabilityserver_fa.DataAbility");
+ let dataShareUri = ("datashare:///com.example.dataabilityserver_fa.DataAbility");
+ let columns = ['id', 'name', 'introduction']
+ let DAHelper;
+ let gSetTimeout = 500;
+ let TAG = ''
+
+ function sleep(delay) {
+ let start = new Date().getTime();
+ while (true) {
+ if (new Date().getTime() - start > delay) {
+ break;
+ }
+ }
+ }
+
+ beforeAll(async (done) => {
+ console.debug('= ACTS_beforeAll ==== ' + DAHelper + " ,JSON. " + JSON.stringify(DAHelper));
+ if(DAHelper == null){
+ console.debug('ACTS_beforeAll DAHelper ====> DAHelper == null');
+ return;
+ }
+ } catch (err) {
+ console.error('=ACTS_beforeAll acquireDataAbilityHelper catch(err)====>' + err);
+ }
+ sleep(500);
+ console.debug('= ACTS_beforeAll ==== {
+ console.debug('= ACTS_afterAll ==== {
+ console.log(TAG + ' insert err, data====>'
+ + 'json err [ ' + JSON.stringify(err) + ' ], json data [ ' + JSON.stringify(data) + ' ]');
+ expect(data).assertEqual(1);
+ console.log(TAG + '====' + err);
+ expect(false).assertTrue();
+ }
+ console.log(TAG + '===='
+ + 'json data [ ' + JSON.stringify(data) + ' ]');
+ expect(data).assertEqual(2);
+ console.log(TAG + '===='
+ + 'json err [ ' + JSON.stringify(err) + ' ]');
+ expect(false).assertTrue();
+ console.log(TAG + '====' + err);
+ expect(false).assertTrue();
+ console.log(TAG + '==== {
+ console.log(TAG + ' query err, data====>'
+ + 'json err [ ' + JSON.stringify(err) + ' ], json data [ ' + JSON.stringify(data) + ' ]');
+ expect(typeof (data)).assertEqual("object");
+ console.log(TAG + '====' + err);
+ console.log(TAG + '===='
+ + 'json queryPromise [ ' + JSON.stringify(queryPromise) + ' ]');
+ expect(typeof (queryPromise)).assertEqual("object");
+ console.log(TAG + '====' + err);
+ console.log(TAG + '==== {
+ console.log(TAG + ' update err, data====>'
+ + 'json err [ ' + JSON.stringify(err) + ' ], json data [ ' + JSON.stringify(data) + ' ]');
+ expect(data).assertEqual(1);
+ console.log(TAG + '====' + err);
+ console.log(TAG + '==== {
+ console.log(TAG + ' then data====>'
+ + 'json data [ ' + JSON.stringify(data) + ' ]');
+ expect(data).assertEqual(1);
+ console.log(TAG + '==== {
+ console.log(TAG + ' catch err ====>'
+ + 'json err [ ' + JSON.stringify(err) + ' ]');
+ console.log(TAG + '====' + err);
+ console.log(TAG + '==== {
+ console.log(TAG + ' delete err, data====>'
+ + 'json err [ ' + JSON.stringify(err) + ' ], json data [ ' + JSON.stringify(data) + ' ]');
+ expect(data).assertEqual(1);
+ console.log(TAG + '====' + err);
+ console.log(TAG + '==== {
+ console.log(TAG + ' then data====>'
+ + 'json data [ ' + JSON.stringify(data) + ' ]');
+ expect(data).assertEqual(1);
+ console.log(TAG + '==== {
+ console.log(TAG + ' catch err ====>'
+ + 'json err [ ' + JSON.stringify(err) + ' ]');
+ console.log(TAG + '====' + err);
+ console.log(TAG + '==== {
+ console.log(TAG +' batchInsert err, data====>'
+ + 'json err [ ' + JSON.stringify(err) + ' ], json data [ ' + JSON.stringify(data) + ' ]');
+ expect(data).assertEqual(3);
+ console.log(TAG +'====' + err);
+ console.log(TAG +'==== {
+ console.log(TAG + ' then data====>'
+ + 'json data [ ' + JSON.stringify(data) + ' ]');
+ expect(data).assertEqual(3);
+ console.log(TAG + '==== {
+ console.log(TAG + ' catch err ====>'
+ + 'json err [ ' + JSON.stringify(err) + ' ]');
+ console.log(TAG + '====' + err);
+ console.log(TAG + '==== {
+ console.log(TAG + ' err=======>'
+ + 'err [ ' + JSON.stringify(err) + ' ]');
+ expect(err.code).assertEqual(0);
+ }
+ );
+ }
+ } catch (err) {
+ console.error(TAG + ' catch(err)====>' + err);
+ expect(false).assertTrue();
+ console.log(TAG + '====');
+ expect(false).assertTrue();
+ clearTimeout(currentAlertTimeout);
+ console.log(TAG + '==== {
+ if (err.code != 0) {
+ console.log(TAG + ' err=======>'
+ + 'err [ ' + JSON.stringify(err) + ' ]');
+ expect(false).assertTrue();
+ console.log(TAG + '==== {
+ expect(err.code).assertEqual(0);
+ console.log(TAG + '====' + err);
+ expect(false).assertTrue();
+ console.log(TAG + '==== {
+ console.debug(TAG + ' getType err,data=======>'
+ + 'json err [ ' + JSON.stringify(err) + ' ], json data [ ' + JSON.stringify(data) + ' ]');
+ expect(data).assertEqual(mimeType);
+ console.log(TAG + '====' + err);
+ console.log(TAG + '==== {
+ console.log(TAG + ' then data====>'
+ + 'json data [ ' + JSON.stringify(data) + ' ]');
+ expect(data).assertEqual(mimeType);
+ console.log(TAG + '==== {
+ console.log(TAG + ' catch err ====>'
+ + 'json err [ ' + JSON.stringify(err) + ' ]');
+ console.log(TAG + '====' + promise)
+ } catch (err) {
+ console.error(TAG + ' getType AsyncCallback catch(err)====>' + err);
+ console.log(TAG + '==== {
+ console.log(TAG + ' getFileTypes err,data=======>'
+ + 'json err [ ' + JSON.stringify(err) + ' ], json data [ ' + JSON.stringify(data) + ' ]');
+ console.log(TAG + ' data.length ====>' + data.length);
+ expect(data.length).assertEqual(3);
+ for (let i = 0; i < data.length; i++) {
+ expect(typeof (data[i])).assertEqual("string");
+ console.log(TAG + ' for data ====>' + err.code +
+ ' data[' + i + ']: ' + data[i]);
+ if (i == 0) {
+ expect(data[i]).assertEqual("type01");
+ } else if (i == 1) {
+ expect(data[i]).assertEqual("type00");
+ } else if (i == 2) {
+ expect(data[i]).assertEqual("type03");
+ }
+ }
+ console.log(TAG + '====' + err);
+ console.log(TAG + '==== {
+ console.log(TAG + ' then data====>'
+ + 'json data [ ' + JSON.stringify(data) + ' ]');
+ console.log(TAG + ' getFileTypes data.length ====>' + data.length);
+ expect(data.length).assertEqual(3);
+ for (var i = 0; i < data.length; i++) {
+ expect(typeof (data[i])).assertEqual("string");
+ console.log(TAG + ' for data[' + i + '] ====>' + data[i])
+ if (i == 0) {
+ expect(data[i]).assertEqual("type01");
+ } else if (i == 1) {
+ expect(data[i]).assertEqual("type00");
+ } else if (i == 2) {
+ expect(data[i]).assertEqual("type03");
+ }
+ }
+ console.log(TAG + '==== {
+ console.log(TAG + ' getFileTypes catch err ====>'
+ + 'json err [ ' + JSON.stringify(err) + ' ]');
+ console.log(TAG + '====: ' + promise)
+ } catch (err) {
+ console.error(TAG + ' getFileTypes AsyncCallback catch(err)====>' + err);
+ console.log(TAG + '==== {
+ console.log(TAG + ' err,data=======>'
+ + 'json err [ ' + JSON.stringify(err) + ' ], json data [ ' + JSON.stringify(data) + ' ]');
+ expect(typeof (data)).assertEqual("string");
+ expect(data).assertEqual(dataShareUri);
+ console.log(TAG + '====' + err);
+ console.log(TAG + '==== {
+ console.log(TAG + ' then data====>'
+ + 'json data [ ' + JSON.stringify(data) + ' ]');
+ expect(data).assertEqual(dataShareUri);
+ console.log(TAG + '==== {
+ console.log(TAG + ' catch err ====>'
+ + 'json err [ ' + JSON.stringify(err) + ' ]');
+ console.log(TAG + '====' + err);
+ console.log(TAG + '==== {
+ console.log(TAG + ' err,data=======>'
+ + 'json err [ ' + JSON.stringify(err) + ' ], json data [ ' + JSON.stringify(data) + ' ]');
+ expect(data).assertEqual(dataShareUri);
+ console.log(TAG + '====' + err);
+ console.log(TAG + '==== {
+ console.log(TAG +' then data====>'
+ + 'json data [ ' + JSON.stringify(data) + ' ]');
+ expect(data).assertEqual(dataShareUri);
+ console.log(TAG +'==== {
+ console.log(TAG +' catch err ====>'
+ + 'json err [ ' + JSON.stringify(err) + ' ]');
+ console.log(TAG +'====' + err);
+ console.log(TAG +'====
+ setTimeout(resolve,time)
+ ) } async function output() {
+ let out = await sleep(1000);
+ console.log('1');
+ return out;
+}
+
+export default class DataShareExtAbility extends Extension {
+ async onCreate(want, callback) {
+ console.log('[DataShareServer]: DataShareExtAbility onCreate, want:' + want.abilityName);
+ console.log('[DataShareServer]: DataShareExtAbility onCreate this.context.databaseDir:' + this.context.databaseDir);
+ // @ts-ignore
+ rdbStore = await rdb.getRdbStore(this.context, { name: DB_NAME }, 1);
+ console.log('[DataShareServer]: DataShareExtAbility getRdbStore done');
+ await rdbStore.executeSql(DDL_TBL_CREATE, []);
+ console.log('[DataShareServer]: DataShareExtAbility executeSql done');
+ let err = {"code":0};
+ callback(err);
+ console.log('[DataShareServer]: DataShareExtAbility onCreate end');
+ }
+
+ async getFileTypes(uri: string, mimeTypeFilter: string, callback) {
+ console.log('[DataShareServer]: [getFileTypes] enter');
+ let ret = new Array("type01", "type00", "type03");
+ console.log('[DataShareServer]: [getFileTypes] leave, ret:' + ret);
+ let err = {"code":0};
+ await callback(err,ret);
+ return ret;
+ }
+
+ async openFile(uri: string, mode: string, callback) {
+ console.log('[DataShareServer]: [openFile] enter');
+ let ret = 1;
+ let err = {"code":0};
+ await callback(err,ret);
+ console.log('[DataShareServer]: [openFile] leave, ret:' + ret);
+ }
+
+ async insert(uri, value, callback) {
+ console.log('[DataShareServer]: [insert] enter');
+ if (value == null) {
+ console.error('[DataShareServer]: [insert] invalid valueBuckets');
+ return;
+ }
+ console.log('[DataShareServer]: [insert] value = ' + value);
+ console.log('[DataShareServer]: [insert] value = ' + JSON.stringify(value));
+ await rdbStore.insert(TBL_NAME, value, function (err, ret) {
+ console.log('[DataShareServer]: <> [insert] callback ret:' + ret);
+ if (callback != undefined) {
+ callback(err, ret);
+ }
+ });
+ console.log('[DataShareServer]: [insert] leave');
+ }
+
+ async update(uri, predicates, value, callback) {
+ console.log('[DataShareServer]: [update] enter');
+ if (predicates == null || predicates == undefined) {
+ console.error('[DataShareServer]: <> [update] invalid predicates');
+ return;
+ }
+ console.log('[DataShareServer]: [update] values = ' + value);
+ console.log('[DataShareServer]: [update] values = ' + JSON.stringify(value));
+ console.log('[DataShareServer]: [update] predicates = ' + predicates);
+ console.log('[DataShareServer]: [update] predicates = ' + JSON.stringify(predicates));
+ try {
+ await rdbStore.update(TBL_NAME, value, predicates, function (err, ret) {
+ console.log('[DataShareServer]: [update] callback ret:' + ret);
+ console.log('[DataShareServer]: [update] callback err:' + err);
+ if (callback != undefined) {
+ callback(err, ret);
+ }
+ });
+ } catch (err) {
+ console.error('[DataShareServer]: [update] error' + err);
+ }
+ sleep(1);
+ console.log('[DataShareServer]: [update] leave');
+ }
+
+ async delete(uri, predicates, callback) {
+ console.log('[DataShareServer]: [delete] enter');
+ if (predicates == null || predicates == undefined) {
+ console.error('[DataShareServer]: [delete] invalid predicates');
+ return;
+ }
+ console.log('[DataShareServer]: [delete] predicates = ' + predicates);
+ console.log('[DataShareServer]: [delete] predicates = ' + JSON.stringify(predicates));
+ try {
+ await rdbStore.delete(TBL_NAME, predicates, function (err, ret) {
+ console.log('[DataShareServer]: [delete] ret:' + ret);
+ if (callback != undefined) {
+ callback(err, ret);
+ }
+ });
+ } catch (err) {
+ console.error('[DataShareServer]: [delete] error' + err);
+ }
+ console.log('[DataShareServer]: [delete] leave');
+ }
+
+ async query(uri, predicates, columns, callback) {
+ console.log('[DataShareServer]: [query] enter');
+ if (predicates == null || predicates == undefined) {
+ console.error('[DataShareServer]: [query] invalid predicates');
+ }
+ console.log('[DataShareServer]: [query] values = ' + columns);
+ console.log('[DataShareServer]: [query] values = ' + JSON.stringify(columns));
+ console.log('[DataShareServer]: [query] predicates = ' + predicates);
+ console.log('[DataShareServer]: [query] predicates = ' + JSON.stringify(predicates));
+ try {
+ await rdbStore.query(TBL_NAME, predicates, columns, function (err, resultSet) {
+ console.log('[DataShareServer]: [query] ret: ' + resultSet);
+ if (resultSet != undefined) {
+ console.log('[DataShareServer]: [query] resultSet.rowCount: ' + resultSet.rowCount);
+ }
+ if (callback != undefined) {
+ callback(err, resultSet);
+ }
+ });
+ } catch (err) {
+ console.error('[DataShareServer]: [query] error' + err);
+ }
+
+ console.log('[DataShareServer]: [query] leave');
+ }
+
+ async getType(uri: string, callback) {
+ console.log('[DataShareServer]: [getType] enter');
+ let ret = "image";
+ console.log('[DataShareServer]: [getType] leave, ret:' + ret);
+ let err = {"code":0};
+ await callback(err,ret);
+ return ret;
+ }
+
+ async batchInsert(uri: string, valueBuckets, callback) {
+ console.log('[DataShareServer]: [batchInsert] enter');
+ if (valueBuckets == null || valueBuckets.length == undefined) {
+ console.error('[DataShareServer]: <> [batchInsert] invalid valueBuckets');
+ return;
+ }
+ console.log('[DataShareServer]: [batchInsert] valueBuckets.length:' + valueBuckets.length);
+ let resultNum = valueBuckets.length
+ await valueBuckets.forEach(vb => {
+ console.log('[DataShareServer]: [batchInsert] vb:' + JSON.stringify(vb));
+ rdbStore.insert(TBL_NAME, vb, function (err, ret) {
+ console.log('[DataShareServer]: [batchInsert] callback ret:' + ret);
+ if (callback != undefined) {
+ callback(err, resultNum);
+ }
+ });
+ });
+ console.log('[DataShareServer]: [batchInsert] leave');
+ }
+
+ async normalizeUri(uri: string, callback) {
+ console.log('[DataShareServer]: [normalizeUri] enter');
+ let ret = uri;
+ let err = {"code":0};
+ await callback(err, ret);
+ console.log('[DataShareServer]: [normalizeUri] leave, ret:' + ret);
+ }
+
+ async denormalizeUri(uri: string, callback) {
+ console.log('[DataShareServer]: [denormalizeUri] enter');
+ let ret = uri;
+ let err = {"code":0};
+ await callback(err, ret);
+ console.log('[DataShareServer]: [denormalizeUri] leave, ret:' + ret);
+ }
+};
\ No newline at end of file
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/entry/src/main/ets/MainAbility/MainAbility.ts
new file mode 100644
index 0000000000000000000000000000000000000000..618bcd06d8ce579fd5cc66bbf8303dcc6a404e49
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/entry/src/main/ets/MainAbility/MainAbility.ts
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2022 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("[DataShareServer]: MainAbility onCreate")
+ globalThis.abilityWant = want;
+ }
+
+ onDestroy() {
+ console.log("[DataShareServer]: MainAbility onDestroy")
+ }
+
+ onWindowStageCreate(windowStage) {
+ // Main window is created, set main page for this ability
+ console.log("[DataShareServer]: MainAbility onWindowStageCreate")
+
+ windowStage.loadContent("pages/index", (err, data) => {
+ if (err.code) {
+ console.error("[DataShareServer]: Failed to load the content. Cause: " + JSON.stringify(err));
+ return;
+ }
+ console.log("[DataShareServer]: Succeeded in loading the content. Data: " + JSON.stringify(data))
+ });
+ }
+
+ onWindowStageDestroy() {
+ // Main window is destroyed, release UI related resources
+ console.log("[DataShareServer]: MainAbility onWindowStageDestroy")
+ }
+
+ onForeground() {
+ // Ability has brought to foreground
+ console.log("[DataShareServer]: MainAbility onForeground")
+ }
+
+ onBackground() {
+ // Ability has back to background
+ console.log("[DataShareServer]: MainAbility onBackground")
+ }
+};
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/entry/src/main/ets/pages/index.ets
new file mode 100644
index 0000000000000000000000000000000000000000..fb89f1e578a2315b78248ba65edf9f921773d319
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/entry/src/main/ets/pages/index.ets
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2022 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.
+ */
+
+@Entry
+@Component
+struct Index {
+ @State message: string = 'stagemode: datashare server'
+
+ build() {
+ Row() {
+ Column() {
+ Text(this.message)
+ .fontSize(50)
+ .fontWeight(FontWeight.Bold)
+ }
+ .width('100%')
+ }
+ .height('100%')
+ }
+}
\ No newline at end of file
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/entry/src/main/module.json b/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/entry/src/main/module.json
new file mode 100644
index 0000000000000000000000000000000000000000..5ef6a57755e1dc55db48f7176742fc6ad72c8783
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/entry/src/main/module.json
@@ -0,0 +1,50 @@
+{
+ "module": {
+ "name": "entry",
+ "type": "entry",
+ "srcEntrance": "./ets/Application/MyAbilityStage.ts",
+ "description": "$string:entry_desc",
+ "mainElement": "MainAbility",
+ "deviceTypes": [
+ "default",
+ "tablet"
+ ],
+ "deliveryWithInstall": true,
+ "installationFree": false,
+ "pages": "$profile:main_pages",
+ "uiSyntax": "ets",
+ "abilities": [
+ {
+ "name": "MainAbility",
+ "srcEntrance": "./ets/MainAbility/MainAbility.ts",
+ "description": "$string:MainAbility_desc",
+ "icon": "$media:icon",
+ "label": "$string:MainAbility_label",
+ "startWindowIcon": "$media:icon",
+ "startWindowBackground": "$color:white",
+ "visible": true,
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ]
+ }
+ ],
+ "extensionAbilities": [
+ {
+ "srcEntrance": "./ets/DataShareExtAbility/DataShareExtAbility.ts",
+ "name": "DataShareExtAbility",
+ "icon": "$media:icon",
+ "description": "$string:DataShareExtAbility_desc",
+ "type": "dataShare",
+ "uri": "datashare://com.example.dataabilityserver_fa.DataAbility",
+ "visible": true
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/entry/src/main/resources/base/element/color.json b/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/entry/src/main/resources/base/element/color.json
new file mode 100644
index 0000000000000000000000000000000000000000..1bbc9aa9617e97c45440e1d3d66afc1154837012
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/entry/src/main/resources/base/element/color.json
@@ -0,0 +1,8 @@
+{
+ "color": [
+ {
+ "name": "white",
+ "value": "#FFFFFF"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/entry/src/main/resources/base/element/string.json b/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/entry/src/main/resources/base/element/string.json
new file mode 100644
index 0000000000000000000000000000000000000000..8c7cb2aa4611048f2274a70ae34c675ab8522d87
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/entry/src/main/resources/base/element/string.json
@@ -0,0 +1,24 @@
+{
+ "string": [
+ {
+ "name": "entry_desc",
+ "value": "description"
+ },
+ {
+ "name": "MainAbility_desc",
+ "value": "description"
+ },
+ {
+ "name": "MainAbility_label",
+ "value": "label"
+ },
+ {
+ "name": "DataShareExtAbility_desc",
+ "value": "description"
+ },
+ {
+ "name": "DataShareExtAbility_label",
+ "value": "label"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/entry/src/main/resources/base/media/icon.png b/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/entry/src/main/resources/base/media/icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c
Binary files /dev/null and b/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/entry/src/main/resources/base/media/icon.png differ
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/entry/src/main/resources/base/profile/form_config.json b/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/entry/src/main/resources/base/profile/form_config.json
new file mode 100644
index 0000000000000000000000000000000000000000..b672a6f28aa83a8f8044e696c3c3eee89f9cd258
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/entry/src/main/resources/base/profile/form_config.json
@@ -0,0 +1,40 @@
+{
+ "forms": [
+ {
+ "name": "widget",
+ "description": "This is a service widget.",
+ "src": "./js/widget/pages/index/index",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": true
+ },
+ "colorMode": "auto",
+ "isDefault": true,
+ "updateEnabled": true,
+ "scheduledUpdateTime": "10:30",
+ "updateDuration": 1,
+ "defaultDimension": "2*2",
+ "supportDimensions": [
+ "2*2"
+ ]
+ },
+ {
+ "name": "widget",
+ "description": "This is a service widget.",
+ "src": "./js/widget/pages/index/index",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": true
+ },
+ "colorMode": "auto",
+ "isDefault": true,
+ "updateEnabled": true,
+ "scheduledUpdateTime": "10:30",
+ "updateDuration": 1,
+ "defaultDimension": "2*2",
+ "supportDimensions": [
+ "2*2"
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/entry/src/main/resources/base/profile/main_pages.json b/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/entry/src/main/resources/base/profile/main_pages.json
new file mode 100644
index 0000000000000000000000000000000000000000..feec276e105eeb8d621c20aaf838f318b0a94150
--- /dev/null
+++ b/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/entry/src/main/resources/base/profile/main_pages.json
@@ -0,0 +1,5 @@
+{
+ "src": [
+ "pages/index"
+ ]
+}
diff --git a/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/signature/openharmony_sx.p7b b/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/signature/openharmony_sx.p7b
new file mode 100644
index 0000000000000000000000000000000000000000..1bc7370912ff0914f3ccbcf639788d441f8d2dcc
Binary files /dev/null and b/ability/ability_runtime/actsdataabilityaccessdatasharetest/datashareserverhap/signature/openharmony_sx.p7b differ