提交 4377618f 编写于 作者: C chengxingzhen

XTS失败用例适配

Signed-off-by: Nchengxingzhen <chengxingzhen@huawei.com>
上级 3e0a7bff
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("FormSystemHost") { ohos_hap("FormSystemHost") {
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
":hjs_demo_js_assets", ":hjs_demo_js_assets",
...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHost") { ...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHost") {
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHost" hap_name = "FormSystemHost"
js_build_mode = "debug"
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
} }
ohos_js_assets("hjs_demo_js_assets") { ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("FormSystemHostB") { ohos_hap("FormSystemHostB") {
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
":hjs_demo_js_assets", ":hjs_demo_js_assets",
...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostB") { ...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostB") {
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostB" hap_name = "FormSystemHostB"
js_build_mode = "debug"
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
} }
ohos_js_assets("hjs_demo_js_assets") { ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("FormSystemHostC") { ohos_hap("FormSystemHostC") {
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
":hjs_demo_js_assets", ":hjs_demo_js_assets",
...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostC") { ...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostC") {
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostC" hap_name = "FormSystemHostC"
js_build_mode = "debug"
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
} }
ohos_js_assets("hjs_demo_js_assets") { ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("FormSystemHostD") { ohos_hap("FormSystemHostD") {
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
":hjs_demo_js_assets", ":hjs_demo_js_assets",
...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostD") { ...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostD") {
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostD" hap_name = "FormSystemHostD"
js_build_mode = "debug"
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
} }
ohos_js_assets("hjs_demo_js_assets") { ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("FormSystemHostE") { ohos_hap("FormSystemHostE") {
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
":hjs_demo_js_assets", ":hjs_demo_js_assets",
...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostE") { ...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostE") {
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostE" hap_name = "FormSystemHostE"
js_build_mode = "debug"
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
} }
ohos_js_assets("hjs_demo_js_assets") { ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("FormSystemHostF") { ohos_hap("FormSystemHostF") {
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
":hjs_demo_js_assets", ":hjs_demo_js_assets",
...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostF") { ...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostF") {
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostF" hap_name = "FormSystemHostF"
js_build_mode = "debug"
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
} }
ohos_js_assets("hjs_demo_js_assets") { ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("FormSystemHostG") { ohos_hap("FormSystemHostG") {
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
":hjs_demo_js_assets", ":hjs_demo_js_assets",
...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostG") { ...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostG") {
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostG" hap_name = "FormSystemHostG"
js_build_mode = "debug"
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
} }
ohos_js_assets("hjs_demo_js_assets") { ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("FormSystemHostI") { ohos_hap("FormSystemHostI") {
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
":hjs_demo_js_assets", ":hjs_demo_js_assets",
...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostI") { ...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostI") {
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostI" hap_name = "FormSystemHostI"
js_build_mode = "debug"
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
} }
ohos_js_assets("hjs_demo_js_assets") { ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("FormSystemHostJ") { ohos_hap("FormSystemHostJ") {
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
":hjs_demo_js_assets", ":hjs_demo_js_assets",
...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostJ") { ...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostJ") {
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostJ" hap_name = "FormSystemHostJ"
js_build_mode = "debug"
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
} }
ohos_js_assets("hjs_demo_js_assets") { ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("FormSystemHostK") { ohos_hap("FormSystemHostK") {
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
":hjs_demo_js_assets", ":hjs_demo_js_assets",
...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostK") { ...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostK") {
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostK" hap_name = "FormSystemHostK"
js_build_mode = "debug"
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
} }
ohos_js_assets("hjs_demo_js_assets") { ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("FormSystemHostL") { ohos_hap("FormSystemHostL") {
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
":hjs_demo_js_assets", ":hjs_demo_js_assets",
...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostL") { ...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostL") {
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostL" hap_name = "FormSystemHostL"
js_build_mode = "debug"
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
} }
ohos_js_assets("hjs_demo_js_assets") { ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("FormSystemHostN") { ohos_hap("FormSystemHostN") {
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
":hjs_demo_js_assets", ":hjs_demo_js_assets",
...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostN") { ...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostN") {
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostN" hap_name = "FormSystemHostN"
js_build_mode = "debug"
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
} }
ohos_js_assets("hjs_demo_js_assets") { ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("FormSystemHostNoPerm") { ohos_hap("FormSystemHostNoPerm") {
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
":hjs_demo_js_assets", ":hjs_demo_js_assets",
...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostNoPerm") { ...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostNoPerm") {
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostNoPerm" hap_name = "FormSystemHostNoPerm"
js_build_mode = "debug"
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
} }
ohos_js_assets("hjs_demo_js_assets") { ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("FormSystemHostO") { ohos_hap("FormSystemHostO") {
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
":hjs_demo_js_assets", ":hjs_demo_js_assets",
...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostO") { ...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostO") {
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostO" hap_name = "FormSystemHostO"
js_build_mode = "debug"
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
} }
ohos_js_assets("hjs_demo_js_assets") { ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("FormSystemHostP") { ohos_hap("FormSystemHostP") {
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
":hjs_demo_js_assets", ":hjs_demo_js_assets",
...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostP") { ...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemHostP") {
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FormSystemHostP" hap_name = "FormSystemHostP"
js_build_mode = "debug"
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
} }
ohos_js_assets("hjs_demo_js_assets") { ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("FormSystemProviderA") { ohos_hap("FormSystemProviderA") {
hap_name = "FormSystemProviderA" hap_name = "FormSystemProviderA"
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemProviderA") { ...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemProviderA") {
] ]
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
js_build_mode = "debug"
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
} }
ohos_js_assets("hjs_demo_js_assets") { ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
{
"description": "Configuration for hjunit demo Tests"
}
\ No newline at end of file
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("FormSystemProviderB") { ohos_hap("FormSystemProviderB") {
hap_name = "FormSystemProviderB" hap_name = "FormSystemProviderB"
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemProviderB") { ...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemProviderB") {
] ]
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
js_build_mode = "debug"
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
} }
ohos_js_assets("hjs_demo_js_assets") { ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
{
"description": "Configuration for hjunit demo Tests"
}
\ No newline at end of file
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("FormSystemProviderC") { ohos_hap("FormSystemProviderC") {
hap_name = "FormSystemProviderC" hap_name = "FormSystemProviderC"
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemProviderC") { ...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemProviderC") {
] ]
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
js_build_mode = "debug"
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
} }
ohos_js_assets("hjs_demo_js_assets") { ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
{
"description": "Configuration for hjunit demo Tests"
}
\ No newline at end of file
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("FormSystemProviderD") { ohos_hap("FormSystemProviderD") {
hap_name = "FormSystemProviderD" hap_name = "FormSystemProviderD"
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemProviderD") { ...@@ -22,6 +22,10 @@ ohos_js_hap_suite("FormSystemProviderD") {
] ]
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
js_build_mode = "debug"
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
} }
ohos_js_assets("hjs_demo_js_assets") { ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
{
"description": "Configuration for hjunit demo Tests"
}
\ No newline at end of file
...@@ -24,8 +24,8 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => { ...@@ -24,8 +24,8 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => {
const ERR_ADD_INVALID_PARAM = `invalid input parameter during form operation`; const ERR_ADD_INVALID_PARAM = `invalid input parameter during form operation`;
describe(`${describeName}`, () => { describe(`${describeName}`, () => {
const callbackName = `FMS_fuzzTest_getinfobundle`; const callbackName = `FMS_fuzzTest_getinfomodule_callback`;
const promiseName = `FMS_fuzzTest_getinfobundle`; const promiseName = `FMS_fuzzTest_getinfomodule_promise`;
const length = DATA_TYPE_LIST.length; const length = DATA_TYPE_LIST.length;
for (let i = 0; i < length; ++i) { for (let i = 0; i < length; ++i) {
...@@ -35,13 +35,13 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => { ...@@ -35,13 +35,13 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => {
* @tc.number FMS_fuzzTest_getinfobundle_0100 ~ FMS_fuzzTest_getinfobundle_0800 * @tc.number FMS_fuzzTest_getinfobundle_0100 ~ FMS_fuzzTest_getinfobundle_0800
* @tc.desc Check whether the getFormsInfo interface can pass the fuzzy test (by AsyncCallback) * @tc.desc Check whether the getFormsInfo interface can pass the fuzzy test (by AsyncCallback)
*/ */
it(`${callbackName}_${tcNumber}`, filterParameter, async (done) => { it(`FMS_fuzzTest_getinfobundle_${tcNumber}`, filterParameter, async (done) => {
const dataType = DATA_TYPE_LIST[i]; const dataType = DATA_TYPE_LIST[i];
const bundleName = getFuzzData(dataType); const bundleName = getFuzzData(dataType);
console.log(`${callbackName} ${tcNumber} bundleName typeof: ${typeof bundleName}`); console.log(`FMS_fuzzTest_getinfobundle ${tcNumber} bundleName typeof: ${typeof bundleName}`);
try { try {
formHost.getFormsInfo(bundleName, (error, data) => { formHost.getFormsInfo(bundleName, (error, data) => {
console.log(`${callbackName} ${tcNumber} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); console.log(`FMS_fuzzTest_getinfobundle ${tcNumber} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`);
expect(data).assertUndefined(); expect(data).assertUndefined();
if (`STRING` === dataType) { if (`STRING` === dataType) {
expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE); expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE);
...@@ -53,8 +53,8 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => { ...@@ -53,8 +53,8 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => {
done(); done();
}); });
} catch (error) { } catch (error) {
console.log(`${callbackName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); console.log(`FMS_fuzzTest_getinfobundle ${tcNumber} exception caught: ${JSON.stringify(error)}`);
console.log(`${callbackName} ${tcNumber} should not reach here`); console.log(`FMS_fuzzTest_getinfobundle ${tcNumber} should not reach here`);
expect().assertFail(); expect().assertFail();
} }
}); });
...@@ -68,17 +68,17 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => { ...@@ -68,17 +68,17 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => {
* @tc.number FMS_fuzzTest_getinfobundle_0900 ~ FMS_fuzzTest_getinfobundle_1600 * @tc.number FMS_fuzzTest_getinfobundle_0900 ~ FMS_fuzzTest_getinfobundle_1600
* @tc.desc Check whether the getFormsInfo interface can pass the fuzzy test (by Promise) * @tc.desc Check whether the getFormsInfo interface can pass the fuzzy test (by Promise)
*/ */
it(`${promiseName}_${tcNumber}`, filterParameter, async (done) => { it(`FMS_fuzzTest_getinfobundle_${tcNumber}`, filterParameter, async (done) => {
const dataType = DATA_TYPE_LIST[i]; const dataType = DATA_TYPE_LIST[i];
const bundleName = getFuzzData(dataType); const bundleName = getFuzzData(dataType);
console.log(`${promiseName} ${tcNumber} ${describeName} bundleName typeof: ${typeof bundleName}`); console.log(`FMS_fuzzTest_getinfobundle ${tcNumber} ${describeName} bundleName typeof: ${typeof bundleName}`);
try { try {
const data = await formHost.getFormsInfo(bundleName); const data = await formHost.getFormsInfo(bundleName);
console.log(`${promiseName} ${tcNumber} getFormsInfo data: ${JSON.stringify(data)}`); console.log(`FMS_fuzzTest_getinfobundle ${tcNumber} getFormsInfo data: ${JSON.stringify(data)}`);
console.log(`${promiseName} ${tcNumber} should not reach here`); console.log(`FMS_fuzzTest_getinfobundle ${tcNumber} should not reach here`);
expect().assertFail(); expect().assertFail();
} catch (error) { } catch (error) {
console.log(`${promiseName} ${tcNumber} exception caught: ${JSON.stringify(error)}`); console.log(`FMS_fuzzTest_getinfobundle ${tcNumber} exception caught: ${JSON.stringify(error)}`);
if (`STRING` === dataType) { if (`STRING` === dataType) {
expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE); expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE);
expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED); expect(error.message).assertEqual(ERR_GET_BUNDLE_FAILED);
...@@ -90,12 +90,6 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => { ...@@ -90,12 +90,6 @@ export const getFormsInfoFuzzTest = (describeName, filterParameter) => {
} }
}); });
} }
});
describe(`${describeName}`, () => {
const callbackName = `FMS_fuzzTest_getinfomodule_callback`;
const promiseName = `FMS_fuzzTest_getinfomodule_promise`;
const length = DATA_TYPE_LIST.length;
for (let i = 0; i < length; ++i) { for (let i = 0; i < length; ++i) {
const tcNumber = `0${(i + 1) * 100}`; const tcNumber = `0${(i + 1) * 100}`;
......
...@@ -16,15 +16,6 @@ import { getAllFormsInfoTest } from './GetAllFormsInfo.test.ets'; ...@@ -16,15 +16,6 @@ import { getAllFormsInfoTest } from './GetAllFormsInfo.test.ets';
import { getFormsInfoTest } from './GetFormsInfo.test.ets'; import { getFormsInfoTest } from './GetFormsInfo.test.ets';
export default function testsuite() { export default function testsuite() {
// FMS_getFormsInfo_0500
getAllFormsInfoTest(`GetAllFormsInfoTest`, 0); getAllFormsInfoTest(`GetAllFormsInfoTest`, 0);
// FMS_getFormsInfo_0900
// FMS_getFormsInfo_1000
// FMS_getFormsInfo_1100
// FMS_getFormsInfo_1400
// FMS_getFormsInfo_1500
// FMS_getFormsInfo_1600
// FMS_getFormsInfo_1700 fail
// FMS_getFormsInfo_1800
getFormsInfoTest(`GetFormsInfoTest`, 0); getFormsInfoTest(`GetFormsInfoTest`, 0);
} }
...@@ -66,6 +66,7 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => { ...@@ -66,6 +66,7 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => {
console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`); console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`);
console.log(`${promiseName} should not reach here`); console.log(`${promiseName} should not reach here`);
expect().assertFail(); expect().assertFail();
done()
} }
}); });
}); });
......
...@@ -21,9 +21,13 @@ export const getFormsInfoTest = (describeName, filterParameter) => { ...@@ -21,9 +21,13 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
const ERR_PERMISSION_DENY = `does not have permission to use forms`; const ERR_PERMISSION_DENY = `does not have permission to use forms`;
describe(`${describeName}`, () => { describe(`${describeName}`, () => {
const callbackName = `FMS_getFormsInfo_0800 callback`; const callbackName = `FMS_getFormsInfo_Callback_0800`;
const promiseName = `FMS_getFormsInfo_0800 promise`; const promiseName = `FMS_getFormsInfo_Promise_0800`;
const bundleName = `1`; const bundleName = `1`;
const callbackName1 = `FMS_getFormsInfo_Callback_1300`;
const promiseName1 = `FMS_getFormsInfo_Promise_1300`;
const bundleName1 = `2`;
const moduleName = `a`;
/** /**
* @tc.name: getFormsInfo * @tc.name: getFormsInfo
...@@ -69,33 +73,26 @@ export const getFormsInfoTest = (describeName, filterParameter) => { ...@@ -69,33 +73,26 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
console.log(`==========${promiseName} ${describeName} end==========`); console.log(`==========${promiseName} ${describeName} end==========`);
} }
}); });
});
describe(`${describeName}`, () => {
const callbackName = `FMS_getFormsInfo_1300 callback`;
const promiseName = `FMS_getFormsInfo_1300 promise`;
const bundleName = `2`;
const moduleName = `a`;
/** /**
* @tc.name: getFormsInfo * @tc.name: getFormsInfo
* @tc.number: FMS_getFormsInfo_1300 * @tc.number: FMS_getFormsInfo_1300
* @tc.desc: Query specific form configuration information by bundle name and module name without permission (by AsyncCallback) * @tc.desc: Query specific form configuration information by bundle name and module name without permission (by AsyncCallback)
*/ */
it(`${callbackName}`, filterParameter, async (done) => { it(`${callbackName1}`, filterParameter, async (done) => {
console.log(`==========${callbackName} ${describeName} start==========`); console.log(`==========${callbackName1} ${describeName} start==========`);
try { try {
formHost.getFormsInfo(bundleName, moduleName, (error, data) => { formHost.getFormsInfo(bundleName1, moduleName, (error, data) => {
console.log(`${callbackName} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); console.log(`${callbackName1} getFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`);
expect(error.code).assertEqual(ERR_PERMISSION_DENY_CODE); expect(error.code).assertEqual(ERR_PERMISSION_DENY_CODE);
expect(error.message).assertEqual(ERR_PERMISSION_DENY); expect(error.message).assertEqual(ERR_PERMISSION_DENY);
done(); done();
console.log(`==========${callbackName} ${describeName} end==========`); console.log(`==========${callbackName1} ${describeName} end==========`);
}); });
} catch (error) { } catch (error) {
console.log(`${callbackName} exception caught: ${JSON.stringify(error)})`); console.log(`${callbackName1} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName} should not reach here`); console.log(`${callbackName1} should not reach here`);
expect().assertFail(); expect().assertFail();
} }
}); });
...@@ -105,20 +102,20 @@ export const getFormsInfoTest = (describeName, filterParameter) => { ...@@ -105,20 +102,20 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
* @tc.number FMS_getFormsInfo_1300 * @tc.number FMS_getFormsInfo_1300
* @tc.desc: Query specific form configuration information by bundle name and module name without permission (by Promise) * @tc.desc: Query specific form configuration information by bundle name and module name without permission (by Promise)
*/ */
it(`${promiseName}`, filterParameter, async (done) => { it(`${promiseName1}`, filterParameter, async (done) => {
console.log(`==========${promiseName} ${describeName} start==========`); console.log(`==========${promiseName1} ${describeName} start==========`);
try { try {
const data = await formHost.getFormsInfo(bundleName, moduleName); const data = await formHost.getFormsInfo(bundleName1, moduleName);
console.log(`${promiseName} getFormsInfo data: ${JSON.stringify(data)}`); console.log(`${promiseName1} getFormsInfo data: ${JSON.stringify(data)}`);
console.log(`${promiseName} should not reach here`); console.log(`${promiseName1} should not reach here`);
expect().assertFail(); expect().assertFail();
} catch (error) { } catch (error) {
console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`); console.log(`${promiseName1} exception caught: ${JSON.stringify(error)})`);
expect(error.code).assertEqual(ERR_PERMISSION_DENY_CODE); expect(error.code).assertEqual(ERR_PERMISSION_DENY_CODE);
expect(error.message).assertEqual(ERR_PERMISSION_DENY); expect(error.message).assertEqual(ERR_PERMISSION_DENY);
done(); done();
console.log(`==========${promiseName} ${describeName} end==========`); console.log(`==========${promiseName1} ${describeName} end==========`);
} }
}); });
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册