diff --git a/aafwk/aafwk_standard/formmanager/BUILD.gn b/aafwk/aafwk_standard/formmanager/BUILD.gn old mode 100755 new mode 100644 index 8aefe399d64bf5b9f348a5ed2fc823adfd72eeef..f40aec09e44ecea9d10fbe70b2f8f17108590302 --- a/aafwk/aafwk_standard/formmanager/BUILD.gn +++ b/aafwk/aafwk_standard/formmanager/BUILD.gn @@ -17,9 +17,15 @@ group("formmanager") { testonly = true if (is_standard_system) { deps = [ - #"formsystemtesthost/FormFuzzTest:FormFuzzTest", - #"formsystemtesthost/getallformsinfo:GetAllFormsInfo", - #"formsystemtestservice/formsystemtestservicea:ActsFormSystemTestServiceA", + "formsystemtesthost/FormFuzzTest:FormFuzzTest", + "formsystemtesthost/getallformsinfo10:GetAllFormsInfo10", + "formsystemtesthost/getallformsinfo201:GetAllFormsInfo201", + "formsystemtesthost/getallformsinfo211:GetAllFormsInfo211", + "formsystemtesthost/getallformsinfo212:GetAllFormsInfo212", + "formsystemtestservice/formsystemtestservicea:ActsFormSystemTestServiceA", + "formsystemtestservice/formsystemtestserviceb:ActsFormSystemTestServiceB", + "formsystemtestservice/formsystemtestservicec:ActsFormSystemTestServiceC", + "formsystemtestservice/formsystemtestserviced:ActsFormSystemTestServiceD", ] } } diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/Test.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/Test.json index 49e7fd17e4f2ee1ab0518e52e74589a56d4ee788..7e05f9f85a53faf0262d9ec0c733af41791bff6e 100755 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/Test.json +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/Test.json @@ -2,7 +2,7 @@ "description": "Configuration for hjunit demo Tests", "driver": { "type": "JSUnitTest", - "test-timeout": "240000", + "test-timeout": "360000", "package": "com.example.formfuzztest", "shell-timeout": "60000" }, diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTest.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTest.test.js deleted file mode 100755 index b6d1b992de90777ba539603afc68b78eec9d2f71..0000000000000000000000000000000000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTest.test.js +++ /dev/null @@ -1,634 +0,0 @@ -/* - * 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 formManager from '@ohos.ability.formManager' -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' -import {parameterValue, stringTest, numberTest, booleanTest, -nullTest, undefinedTest, objectTest, arrayTest, functionTest} from './getParam.js' - -const TIMEOUT = 2000; -describe('formFuzzTest', function () { - console.log("formFuzzTest===start"); - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_0200 - * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTest_0200_callback', 0, async function (done) { - console.log("FMS_fuzzTest_0200_callback deleteForm begin"); - - var formId = parameterValue(); - console.log("FMS_fuzzTest_0200_callback deleteForm formId typeof:"+ typeof(formId)); - - try{ - formManager.deleteForm( - formId, // formId: number>0 ok - (err,data) => { - console.log("FMS_fuzzTest_0200_callback async::callbak return!!!") - console.log("FMS_fuzzTest_0200_callback async::sucess data:" + data); - console.log("FMS_fuzzTest_0200_callback async::error err:" + err); - expect(err).assertEqual(1); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTest_0200_callback Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_0200_callback deleteForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_0200_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_0200 - * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTest_0200_promise', 0, async function (done) { - console.log("FMS_fuzzTest_0200_promise deleteForm begin"); - - var formId = parameterValue(); - console.log("FMS_fuzzTest_0200_promise deleteForm formId typeof:"+ typeof(formId)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.deleteForm(formId)); // formId: number>0 ok - console.log("FMS_fuzzTest_0200_promise async::sucess retResult:" + retResult); - expect(retResult).assertEqual(1); - done(); - } catch (e) { - console.log("FMS_fuzzTest_0200_promise Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_0200_promise deleteForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_0200_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTest_0300_param_01_callback', 0, async function (done) { - console.log("FMS_fuzzTest_0300_param_01_callback releaseForm begin"); - - var formId = parameterValue(); - console.log("FMS_fuzzTest_0300_param_01_callback releaseForm formId typeof:"+ typeof(formId)); - - var isReleaseCache = booleanTest(); - console.log("FMS_fuzzTest_0300_param_01_callback releaseForm isReleaseCache typeof:"+ typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, // formId: number>0 ok - isReleaseCache, // isReleaseCache: boolean ok - (err,data) => { - console.log("FMS_fuzzTest_0300_param_01_callback async::callbak return!!!") - console.log("FMS_fuzzTest_0300_param_01_callback async::sucess data:" + data); - console.log("FMS_fuzzTest_0300_param_01_callback async::error err:" + err); - expect(err).assertEqual(1); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTest_0300_param_01_callback Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_0300_param_01_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_0300_param_01_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTest_0300_param_01_promise', 0, async function (done) { - console.log("FMS_fuzzTest_0300_param_01_promise releaseForm begin"); - - var formId = parameterValue(); - console.log("FMS_fuzzTest_0300_param_01_promise releaseForm formId typeof:"+ typeof(formId)); - - var isReleaseCache = booleanTest(); - console.log("FMS_fuzzTest_0300_param_01_promise releaseForm isReleaseCache typeof:"+ typeof(isReleaseCache)); - - var retResult; - try{ - // formId: number>0 ok, isReleaseCache: boolean - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTest_0300_param_01_promise async::sucess retResult:" + retResult); - expect(retResult).assertEqual(1); - done(); - } catch (e) { - console.log("FMS_fuzzTest_0300_param_01_promise Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_0300_param_01_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_0300_param_01_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTest_0300_param_02_callback', 0, async function (done) { - console.log("FMS_fuzzTest_0300_param_02_callback releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTest_0300_param_02_callback releaseForm formId typeof:"+ - typeof(formId) + ",formId:" + formId); - - var isReleaseCache = parameterValue(); - console.log("FMS_fuzzTest_0300_param_02_callback releaseForm isReleaseCache typeof:"+ typeof(isReleaseCache)); - - try{ - formManager.releaseForm( - formId, // formId: number>0 ok - isReleaseCache, // isReleaseCache: boolean ok - (err,data) => { - console.log("FMS_fuzzTest_0300_param_02_callback async::callbak return!!!") - console.log("FMS_fuzzTest_0300_param_02_callback async::sucess data:" + data); - console.log("FMS_fuzzTest_0300_param_02_callback async::error err:" + err); - expect(err).assertEqual(1); - done(); - } - - ); - } catch (e) { - console.log("FMS_fuzzTest_0300_param_02_callback Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_0300_param_02_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_0300_param_02_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTest_0300_param_02_promise', 0, async function (done) { - console.log("FMS_fuzzTest_0300_param_02_promise releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTest_0300_param_02_promise releaseForm formId typeof:"+ - typeof(formId) + ",formId:" + formId); - - var isReleaseCache = parameterValue(); - console.log("FMS_fuzzTest_0300_param_02_promise releaseForm isReleaseCache typeof:"+ typeof(isReleaseCache)); - - var retResult; - try{ - // formId: number>0 ok, isReleaseCache: boolean - retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); - console.log("FMS_fuzzTest_0300_param_02_promise async::sucess retResult:" + retResult); - expect(retResult).assertEqual(1); - done(); - } catch (e) { - console.log("FMS_fuzzTest_0300_param_02_promise Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_0300_param_02_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_0300_param_02_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTest_0300_param_03_callback', 0, async function (done) { - console.log("FMS_fuzzTest_0300_param_03_callback releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTest_0300_param_03_callback releaseForm formId typeof:"+ - typeof(formId) + ",formId:" + formId); - - try{ - formManager.releaseForm( - formId, // formId: number>0 ok - (err,data) => { - console.log("FMS_fuzzTest_0300_param_03_callback async::callbak return!!!") - console.log("FMS_fuzzTest_0300_param_03_callback async::sucess data:" + data); - console.log("FMS_fuzzTest_0300_param_03_callback async::error err:" + err); - expect(err).assertEqual(1); - done(); - } - - ); - } catch (e) { - console.log("FMS_fuzzTest_0300_param_03_callback Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_0300_param_03_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_0300_param_03_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTest_0300_param_03_promise', 0, async function (done) { - console.log("FMS_fuzzTest_0300_param_03_promise releaseForm begin"); - - var formId = stringTest(); - console.log("FMS_fuzzTest_0300_param_03_promise releaseForm formId typeof:"+ - typeof(formId) + ",formId:" + formId); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId)); // formId: number>0 ok - console.log("FMS_fuzzTest_0300_param_03_promise async::sucess retResult:" + retResult); - expect(retResult).assertEqual(1); - done(); - } catch (e) { - console.log("FMS_fuzzTest_0300_param_03_promise Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_0300_param_03_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_0300_param_03_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTest_0300_param_04_callback', 0, async function (done) { - console.log("FMS_fuzzTest_0300_param_04_callback releaseForm begin"); - - var formId = parameterValue(); - console.log("FMS_fuzzTest_0300_param_04_callback releaseForm formId typeof:"+ typeof(formId)); - - try{ - formManager.releaseForm( - formId, // formId: number>0 ok - (err,data) => { - console.log("FMS_fuzzTest_0300_param_04_callback async::callbak return!!!") - console.log("FMS_fuzzTest_0300_param_04_callback async::sucess data:" + data); - console.log("FMS_fuzzTest_0300_param_04_callback async::error err:" + err); - expect(err).assertEqual(1); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTest_0300_param_04_callback Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_0300_param_04_callback releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_0300_param_04_callback==================end'); - }, TIMEOUT) -}) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_0300 - * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) - */ -it('FMS_fuzzTest_0300_param_04_promise', 0, async function (done) { - console.log("FMS_fuzzTest_0300_param_04_promise releaseForm begin"); - - var formId = parameterValue(); - console.log("FMS_fuzzTest_0300_param_04_promise releaseForm formId typeof:"+ typeof(formId)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.releaseForm(formId)); // formId: number>0 ok - console.log("FMS_fuzzTest_0300_param_04_promise async::sucess retResult:" + retResult); - expect(retResult).assertEqual(1); - done(); - } catch (e) { - console.log("FMS_fuzzTest_0300_param_04_promise Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_0300_param_04_promise releaseForm end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_0300_param_04_promise==================end'); - }, TIMEOUT) -}) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_1200 - * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTest_1200_callback', 0, async function (done) { - console.log("FMS_fuzzTest_1200_callback getAllFormsInfo begin"); - - var testParam = parameterValue(); - console.log("FMS_fuzzTest_1200_callback getAllFormsInfo formIds typeof:"+ typeof(testParam)); - - try{ - formManager.getAllFormsInfo( - testParam, // formIds: array ok - (err,data) => { - console.log("FMS_fuzzTest_1200_callback async::callbak return!!!") - console.log("FMS_fuzzTest_1200_callback async::sucess data:" + data); - console.log("FMS_fuzzTest_1200_callback async::error err:" + err); - expect(err).assertEqual(1); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTest_1200_callback Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_1200_callback getAllFormsInfo end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_1200_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_1200 - * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTest_1200_promise', 0, async function (done) { - console.log("FMS_fuzzTest_1200_promise getAllFormsInfo begin"); - - var testParam = parameterValue(); - console.log("FMS_fuzzTest_1200_promise getAllFormsInfo formIds typeof:"+ typeof(testParam)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getAllFormsInfo(testParam)); - console.log("FMS_fuzzTest_1200_promise async::sucess retResult:" + retResult); - expect(retResult).assertEqual(1); - done(); - } catch (e) { - console.log("FMS_fuzzTest_1200_promise Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_1200_promise getAllFormsInfo end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_1200_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_1300 - * @tc.desc Check whether the form configuration information query interface of the specified package - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTest_1300_callback', 0, async function (done) { - console.log("FMS_fuzzTest_1300_callback getFormsInfoByApp begin"); - - var bundleName = parameterValue(); - console.log("FMS_fuzzTest_1300_callback getFormsInfoByApp bundleName typeof:"+ typeof(bundleName)); - - try{ - formManager.getFormsInfo( - bundleName, // bundleName string - (err,data) => { - console.log("FMS_fuzzTest_1300_callback async::callbak return!!!") - console.log("FMS_fuzzTest_1300_callback async::sucess data:" + data); - console.log("FMS_fuzzTest_1300_callback async::error err:" + err); - expect(err).assertEqual(1); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTest_1300_callback Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_1300_callback getFormsInfoByApp end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_1300_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_1300 - * @tc.desc Check whether the form configuration information query interface of the specified package - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTest_1300_promise', 0, async function (done) { - console.log("FMS_fuzzTest_1300_promise getFormsInfoByApp begin"); - - var bundleName = parameterValue(); - console.log("FMS_fuzzTest_1300_promise getFormsInfoByApp bundleName typeof:"+ typeof(bundleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName)); - console.log("FMS_fuzzTest_1300_promise async::sucess retResult:" + retResult); - expect(retResult).assertEqual(1); - done(); - } catch (e) { - console.log("FMS_fuzzTest_1300_promise Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_1300_promise getFormsInfoByApp end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_1300_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTest_1400_param_01_callback', 0, async function (done) { - console.log("FMS_fuzzTest_1400_param_01_callback getFormsInfoByModule begin"); - - var bundleName = parameterValue(); - console.log("FMS_fuzzTest_1400_param_01_callback getFormsInfoByModule bundleName typeof:"+ typeof(bundleName)); - - var moduleName = stringTest(); - console.log("FMS_fuzzTest_1400_param_01_callback getFormsInfoByModule moduleName typeof:"+ typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, // bundleName string - moduleName,// moduleName string - (err,data) => { - console.log("FMS_fuzzTest_1400_param_01_callback async::callbak return!!!") - console.log("FMS_fuzzTest_1400_param_01_callback async::sucess data:" + data); - console.log("FMS_fuzzTest_1400_param_01_callback async::error err:" + err); - expect(err).assertEqual(1); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTest_1400_param_01_callback Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_1400_param_01_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_1400_param_01_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTest_1400_param_01_promise', 0, async function (done) { - console.log("FMS_fuzzTest_1400_param_01_promise getFormsInfoByModule begin"); - - var bundleName = parameterValue(); - console.log("FMS_fuzzTest_1400_param_01_promise getFormsInfoByModule bundleName typeof:"+ typeof(bundleName)); - - var moduleName = stringTest(); - console.log("FMS_fuzzTest_1400_param_01_promise getFormsInfoByModule moduleName typeof:"+ typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTest_1400_param_01_promise async::sucess retResult:" + retResult); - expect(retResult).assertEqual(1); - done(); - } catch (e) { - console.log("FMS_fuzzTest_1400_param_01_promise Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_1400_param_01_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_1400_param_01_promise==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by AsyncCallback) - */ - it('FMS_fuzzTest_1400_param_02_callback', 0, async function (done) { - console.log("FMS_fuzzTest_1400_param_02_callback getFormsInfoByModule begin"); - - var bundleName = stringTest(); - console.log("FMS_fuzzTest_1400_param_02_callback getFormsInfoByModule bundleName typeof:"+ typeof(bundleName)); - - var moduleName = parameterValue(); - console.log("FMS_fuzzTest_1400_param_02_callback getFormsInfoByModule moduleName typeof:"+ typeof(moduleName)); - - try{ - formManager.getFormsInfo( - bundleName, // bundleName string - moduleName, // moduleName string - (err,data) => { - console.log("FMS_fuzzTest_1400_param_02_callback async::callbak return!!!") - console.log("FMS_fuzzTest_1400_param_02_callback async::sucess data:" + data); - console.log("FMS_fuzzTest_1400_param_02_callback async::error err:" + err); - expect(err).assertEqual(1); - done(); - } - ); - } catch (e) { - console.log("FMS_fuzzTest_1400_param_02_callback Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_1400_param_02_callback getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_1400_param_02_callback==================end'); - }, TIMEOUT) - }) - - /** - * @tc.name fuzzTest - * @tc.number FMS_fuzzTest_1400 - * @tc.desc Check whether the form configuration information query interface of the specified module - * can pass the fuzzy test (by Promise) - */ - it('FMS_fuzzTest_1400_param_02_promise', 0, async function (done) { - console.log("FMS_fuzzTest_1400_param_02_promise getFormsInfoByModule begin"); - - var bundleName = stringTest(); - console.log("FMS_fuzzTest_1400_param_02_promise getFormsInfoByModule bundleName typeof:"+ typeof(bundleName)); - - var moduleName = parameterValue(); - console.log("FMS_fuzzTest_1400_param_02_promise getFormsInfoByModule moduleName typeof:"+ typeof(moduleName)); - - var retResult; - try{ - retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); - console.log("FMS_fuzzTest_1400_param_02_promise async::sucess retResult:" + retResult); - expect(retResult).assertEqual(1); - done(); - } catch (e) { - console.log("FMS_fuzzTest_1400_param_02_promise Exception caught:" + e); - expect(0).assertEqual(0); - } - - console.log("FMS_fuzzTest_1400_param_02_promise getFormsInfoByModule end"); - done(); - setTimeout(function () { - console.info('=====================FMS_fuzzTest_1400_param_02_promise==================end'); - }, TIMEOUT) - }) - -}) diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestArray.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestArray.test.js new file mode 100644 index 0000000000000000000000000000000000000000..b8adcabc76aef1dae7644259f7fd5c188fd1a262 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestArray.test.js @@ -0,0 +1,1465 @@ +/* + * 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 formManager from '@ohos.ability.formManager' +import {describe, it, expect} from 'deccjsunit/index' +import {stringTest, numberTest, booleanTest, nullTest, undefinedTest, + objectTest, arrayTest, functionTest} from './getParam.js' + +const TIMEOUT = 5000; +describe('FMS_fuzzTestArray', function () { + console.log("FMS_fuzzTestArray===start"); + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_0200 + * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestArray_0200_callback', 0, async function (done) { + console.log("FMS_fuzzTestArray_0200_callback deleteForm begin"); + + var formId = arrayTest(); + console.log("FMS_fuzzTestArray_0200_callback deleteForm formId typeof:" + typeof(formId)); + + try{ + formManager.deleteForm( + formId, + (err,data) => { + console.log("FMS_fuzzTestArray_0200_callback async::callbak return!!!") + console.log("FMS_fuzzTestArray_0200_callback async::sucess data:" + data); + console.log("FMS_fuzzTestArray_0200_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestArray_0200_callback Exception caught:" + e); + expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_0200_callback deleteForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_0200_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_0200 + * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestArray_0200_promise', 0, async function (done) { + console.log("FMS_fuzzTestArray_0200_promise deleteForm begin"); + + var formId = arrayTest(); + console.log("FMS_fuzzTestArray_0200_promise deleteForm formId typeof:" + typeof(formId)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.deleteForm(formId)); + console.log("FMS_fuzzTestArray_0200_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestArray_0200_promise Exception caught:" + e); + expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_0200_promise deleteForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_0200_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestArray_0300_param_01_callback', 0, async function (done) { + console.log("FMS_fuzzTestArray_0300_param_01_callback releaseForm begin"); + + var formId = arrayTest(); + console.log("FMS_fuzzTestArray_0300_param_01_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = arrayTest(); + console.log("FMS_fuzzTestArray_0300_param_01_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestArray_0300_param_01_callback async::callbak return!!!") + console.log("FMS_fuzzTestArray_0300_param_01_callback async::sucess data:" + data); + console.log("FMS_fuzzTestArray_0300_param_01_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestArray_0300_param_01_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_0300_param_01_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_0300_param_01_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestArray_0300_param_01_promise', 0, async function (done) { + console.log("FMS_fuzzTestArray_0300_param_01_promise releaseForm begin"); + + var formId = arrayTest(); + console.log("FMS_fuzzTestArray_0300_param_01_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = arrayTest(); + console.log("FMS_fuzzTestArray_0300_param_01_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestArray_0300_param_01_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestArray_0300_param_01_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_0300_param_01_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_0300_param_01_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestArray_0300_param_02_callback', 0, async function (done) { + console.log("FMS_fuzzTestArray_0300_param_02_callback releaseForm begin"); + + var formId = arrayTest(); + console.log("FMS_fuzzTestArray_0300_param_02_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = booleanTest(); + console.log("FMS_fuzzTestArray_0300_param_02_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestArray_0300_param_02_callback async::callbak return!!!") + console.log("FMS_fuzzTestArray_0300_param_02_callback async::sucess data:" + data); + console.log("FMS_fuzzTestArray_0300_param_02_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestArray_0300_param_02_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_0300_param_02_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_0300_param_02_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestArray_0300_param_02_promise', 0, async function (done) { + console.log("FMS_fuzzTestArray_0300_param_02_promise releaseForm begin"); + + var formId = arrayTest(); + console.log("FMS_fuzzTestArray_0300_param_02_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = booleanTest(); + console.log("FMS_fuzzTestArray_0300_param_02_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestArray_0300_param_02_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestArray_0300_param_02_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_0300_param_02_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_0300_param_02_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestArray_0300_param_03_callback', 0, async function (done) { + console.log("FMS_fuzzTestArray_0300_param_03_callback releaseForm begin"); + + var formId = arrayTest(); + console.log("FMS_fuzzTestArray_0300_param_03_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = functionTest(); + console.log("FMS_fuzzTestArray_0300_param_03_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestArray_0300_param_03_callback async::callbak return!!!") + console.log("FMS_fuzzTestArray_0300_param_03_callback async::sucess data:" + data); + console.log("FMS_fuzzTestArray_0300_param_03_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestArray_0300_param_03_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_0300_param_03_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_0300_param_03_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestArray_0300_param_03_promise', 0, async function (done) { + console.log("FMS_fuzzTestArray_0300_param_03_promise releaseForm begin"); + + var formId = arrayTest(); + console.log("FMS_fuzzTestArray_0300_param_03_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = functionTest(); + console.log("FMS_fuzzTestArray_0300_param_03_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestArray_0300_param_03_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestArray_0300_param_03_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_0300_param_03_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_0300_param_03_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestArray_0300_param_04_callback', 0, async function (done) { + console.log("FMS_fuzzTestArray_0300_param_04_callback releaseForm begin"); + + var formId = arrayTest(); + console.log("FMS_fuzzTestArray_0300_param_04_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = nullTest(); + console.log("FMS_fuzzTestArray_0300_param_04_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestArray_0300_param_04_callback async::callbak return!!!") + console.log("FMS_fuzzTestArray_0300_param_04_callback async::sucess data:" + data); + console.log("FMS_fuzzTestArray_0300_param_04_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestArray_0300_param_04_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_0300_param_04_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_0300_param_04_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestArray_0300_param_04_promise', 0, async function (done) { + console.log("FMS_fuzzTestArray_0300_param_04_promise releaseForm begin"); + + var formId = arrayTest(); + console.log("FMS_fuzzTestArray_0300_param_04_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = nullTest(); + console.log("FMS_fuzzTestArray_0300_param_04_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestArray_0300_param_04_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestArray_0300_param_04_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_0300_param_04_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_0300_param_04_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestArray_0300_param_05_callback', 0, async function (done) { + console.log("FMS_fuzzTestArray_0300_param_05_callback releaseForm begin"); + + var formId = arrayTest(); + console.log("FMS_fuzzTestArray_0300_param_05_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = numberTest(); + console.log("FMS_fuzzTestArray_0300_param_05_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestArray_0300_param_05_callback async::callbak return!!!") + console.log("FMS_fuzzTestArray_0300_param_05_callback async::sucess data:" + data); + console.log("FMS_fuzzTestArray_0300_param_05_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestArray_0300_param_05_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_0300_param_05_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_0300_param_05_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestArray_0300_param_05_promise', 0, async function (done) { + console.log("FMS_fuzzTestArray_0300_param_05_promise releaseForm begin"); + + var formId = arrayTest(); + console.log("FMS_fuzzTestArray_0300_param_05_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = numberTest(); + console.log("FMS_fuzzTestArray_0300_param_05_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestArray_0300_param_05_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestArray_0300_param_05_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_0300_param_05_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_0300_param_05_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestArray_0300_param_06_callback', 0, async function (done) { + console.log("FMS_fuzzTestArray_0300_param_06_callback releaseForm begin"); + + var formId = arrayTest(); + console.log("FMS_fuzzTestArray_0300_param_06_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = objectTest(); + console.log("FMS_fuzzTestArray_0300_param_06_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestArray_0300_param_06_callback async::callbak return!!!") + console.log("FMS_fuzzTestArray_0300_param_06_callback async::sucess data:" + data); + console.log("FMS_fuzzTestArray_0300_param_06_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestArray_0300_param_06_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_0300_param_06_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_0300_param_06_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestArray_0300_param_06_promise', 0, async function (done) { + console.log("FMS_fuzzTestArray_0300_param_06_promise releaseForm begin"); + + var formId = arrayTest(); + console.log("FMS_fuzzTestArray_0300_param_06_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = objectTest(); + console.log("FMS_fuzzTestArray_0300_param_06_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestArray_0300_param_06_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestArray_0300_param_06_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_0300_param_06_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_0300_param_06_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestArray_0300_param_07_callback', 0, async function (done) { + console.log("FMS_fuzzTestArray_0300_param_07_callback releaseForm begin"); + + var formId = arrayTest(); + console.log("FMS_fuzzTestArray_0300_param_07_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = stringTest(); + console.log("FMS_fuzzTestArray_0300_param_07_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestArray_0300_param_07_callback async::callbak return!!!") + console.log("FMS_fuzzTestArray_0300_param_07_callback async::sucess data:" + data); + console.log("FMS_fuzzTestArray_0300_param_07_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestArray_0300_param_07_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_0300_param_07_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_0300_param_07_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestArray_0300_param_07_promise', 0, async function (done) { + console.log("FMS_fuzzTestArray_0300_param_07_promise releaseForm begin"); + + var formId = arrayTest(); + console.log("FMS_fuzzTestArray_0300_param_07_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = stringTest(); + console.log("FMS_fuzzTestArray_0300_param_07_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestArray_0300_param_07_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestArray_0300_param_07_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_0300_param_07_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_0300_param_07_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestArray_0300_param_08_callback', 0, async function (done) { + console.log("FMS_fuzzTestArray_0300_param_08_callback releaseForm begin"); + + var formId = arrayTest(); + console.log("FMS_fuzzTestArray_0300_param_08_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = undefinedTest(); + console.log("FMS_fuzzTestArray_0300_param_08_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestArray_0300_param_08_callback async::callbak return!!!") + console.log("FMS_fuzzTestArray_0300_param_08_callback async::sucess data:" + data); + console.log("FMS_fuzzTestArray_0300_param_08_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestArray_0300_param_08_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_0300_param_08_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_0300_param_08_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestArray_0300_param_08_promise', 0, async function (done) { + console.log("FMS_fuzzTestArray_0300_param_08_promise releaseForm begin"); + + var formId = arrayTest(); + console.log("FMS_fuzzTestArray_0300_param_08_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = undefinedTest(); + console.log("FMS_fuzzTestArray_0300_param_08_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestArray_0300_param_08_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestArray_0300_param_08_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_0300_param_08_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_0300_param_08_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestArray_0300_param_09_callback', 0, async function (done) { + console.log("FMS_fuzzTestArray_0300_param_09_callback releaseForm begin"); + + var formId = arrayTest(); + console.log("FMS_fuzzTestArray_0300_param_09_callback releaseForm formId typeof:" + + typeof(formId) + ",formId:" + formId); + + try{ + formManager.releaseForm( + formId, + (err,data) => { + console.log("FMS_fuzzTestArray_0300_param_09_callback async::callbak return!!!") + console.log("FMS_fuzzTestArray_0300_param_09_callback async::sucess data:" + data); + console.log("FMS_fuzzTestArray_0300_param_09_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + + ); + } catch (e) { + console.log("FMS_fuzzTestArray_0300_param_09_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_0300_param_09_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_0300_param_09_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestArray_0300_param_09_promise', 0, async function (done) { + console.log("FMS_fuzzTestArray_0300_param_09_promise releaseForm begin"); + + var formId = arrayTest(); + console.log("FMS_fuzzTestArray_0300_param_09_promise releaseForm formId typeof:" + + typeof(formId) + ",formId:" + formId); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId)); + console.log("FMS_fuzzTestArray_0300_param_09_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestArray_0300_param_09_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_0300_param_09_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_0300_param_09_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_1200 + * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestArray_1200_callback', 0, async function (done) { + console.log("FMS_fuzzTestArray_1200_callback getAllFormsInfo begin"); + + var testParam = arrayTest(); + console.log("FMS_fuzzTestArray_1200_callback getAllFormsInfo formIds typeof:" + typeof(testParam)); + + try{ + formManager.getAllFormsInfo( + testParam, + (err,data) => { + console.log("FMS_fuzzTestArray_1200_callback async::callbak return!!!") + console.log("FMS_fuzzTestArray_1200_callback async::sucess data:" + data); + console.log("FMS_fuzzTestArray_1200_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestArray_1200_callback Exception caught:" + e); + expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_1200_callback getAllFormsInfo end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_1200_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_1200 + * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestArray_1200_promise', 0, async function (done) { + console.log("FMS_fuzzTestArray_1200_promise getAllFormsInfo begin"); + + var testParam = arrayTest(); + console.log("FMS_fuzzTestArray_1200_promise getAllFormsInfo formIds typeof:" + typeof(testParam)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getAllFormsInfo(testParam)); + console.log("FMS_fuzzTestArray_1200_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestArray_1200_promise Exception caught:" + e); + expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_1200_promise getAllFormsInfo end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_1200_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_1300 + * @tc.desc Check whether the form configuration information query interface of the specified package + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestArray_1300_callback', 0, async function (done) { + console.log("FMS_fuzzTestArray_1300_callback getFormsInfoByApp begin"); + + var bundleName = arrayTest(); + console.log("FMS_fuzzTestArray_1300_callback getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); + + try{ + formManager.getFormsInfo( + bundleName, + (err,data) => { + console.log("FMS_fuzzTestArray_1300_callback async::callbak return!!!") + console.log("FMS_fuzzTestArray_1300_callback async::sucess data:" + data); + console.log("FMS_fuzzTestArray_1300_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestArray_1300_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_1300_callback getFormsInfoByApp end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_1300_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_1300 + * @tc.desc Check whether the form configuration information query interface of the specified package + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestArray_1300_promise', 0, async function (done) { + console.log("FMS_fuzzTestArray_1300_promise getFormsInfoByApp begin"); + + var bundleName = arrayTest(); + console.log("FMS_fuzzTestArray_1300_promise getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName)); + console.log("FMS_fuzzTestArray_1300_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestArray_1300_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_1300_promise getFormsInfoByApp end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_1300_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestArray_1400_param_01_callback', 0, async function (done) { + console.log("FMS_fuzzTestArray_1400_param_01_callback getFormsInfoByModule begin"); + + var bundleName = arrayTest(); + console.log("FMS_fuzzTestArray_1400_param_01_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = arrayTest(); + console.log("FMS_fuzzTestArray_1400_param_01_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestArray_1400_param_01_callback async::callbak return!!!") + console.log("FMS_fuzzTestArray_1400_param_01_callback async::sucess data:" + data); + console.log("FMS_fuzzTestArray_1400_param_01_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestArray_1400_param_01_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_1400_param_01_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_1400_param_01_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestArray_1400_param_01_promise', 0, async function (done) { + console.log("FMS_fuzzTestArray_1400_param_01_promise getFormsInfoByModule begin"); + + var bundleName = arrayTest(); + console.log("FMS_fuzzTestArray_1400_param_01_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = arrayTest(); + console.log("FMS_fuzzTestArray_1400_param_01_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestArray_1400_param_01_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestArray_1400_param_01_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_1400_param_01_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_1400_param_01_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestArray_1400_param_02_callback', 0, async function (done) { + console.log("FMS_fuzzTestArray_1400_param_02_callback getFormsInfoByModule begin"); + + var bundleName = arrayTest(); + console.log("FMS_fuzzTestArray_1400_param_02_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = booleanTest(); + console.log("FMS_fuzzTestArray_1400_param_02_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestArray_1400_param_02_callback async::callbak return!!!") + console.log("FMS_fuzzTestArray_1400_param_02_callback async::sucess data:" + data); + console.log("FMS_fuzzTestArray_1400_param_02_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestArray_1400_param_02_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_1400_param_02_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_1400_param_02_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestArray_1400_param_02_promise', 0, async function (done) { + console.log("FMS_fuzzTestArray_1400_param_02_promise getFormsInfoByModule begin"); + + var bundleName = arrayTest(); + console.log("FMS_fuzzTestArray_1400_param_02_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = booleanTest(); + console.log("FMS_fuzzTestArray_1400_param_02_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestArray_1400_param_02_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestArray_1400_param_02_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_1400_param_02_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_1400_param_02_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestArray_1400_param_03_callback', 0, async function (done) { + console.log("FMS_fuzzTestArray_1400_param_03_callback getFormsInfoByModule begin"); + + var bundleName = arrayTest(); + console.log("FMS_fuzzTestArray_1400_param_03_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = functionTest(); + console.log("FMS_fuzzTestArray_1400_param_03_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestArray_1400_param_03_callback async::callbak return!!!") + console.log("FMS_fuzzTestArray_1400_param_03_callback async::sucess data:" + data); + console.log("FMS_fuzzTestArray_1400_param_03_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestArray_1400_param_03_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_1400_param_03_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_1400_param_03_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestArray_1400_param_03_promise', 0, async function (done) { + console.log("FMS_fuzzTestArray_1400_param_03_promise getFormsInfoByModule begin"); + + var bundleName = arrayTest(); + console.log("FMS_fuzzTestArray_1400_param_03_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = functionTest(); + console.log("FMS_fuzzTestArray_1400_param_03_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestArray_1400_param_03_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestArray_1400_param_03_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_1400_param_03_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_1400_param_03_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestArray_1400_param_04_callback', 0, async function (done) { + console.log("FMS_fuzzTestArray_1400_param_04_callback getFormsInfoByModule begin"); + + var bundleName = arrayTest(); + console.log("FMS_fuzzTestArray_1400_param_04_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = nullTest(); + console.log("FMS_fuzzTestArray_1400_param_04_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestArray_1400_param_04_callback async::callbak return!!!") + console.log("FMS_fuzzTestArray_1400_param_04_callback async::sucess data:" + data); + console.log("FMS_fuzzTestArray_1400_param_04_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestArray_1400_param_04_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_1400_param_04_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_1400_param_04_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestArray_1400_param_04_promise', 0, async function (done) { + console.log("FMS_fuzzTestArray_1400_param_04_promise getFormsInfoByModule begin"); + + var bundleName = arrayTest(); + console.log("FMS_fuzzTestArray_1400_param_04_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = nullTest(); + console.log("FMS_fuzzTestArray_1400_param_04_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestArray_1400_param_04_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestArray_1400_param_04_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_1400_param_04_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_1400_param_04_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestArray_1400_param_05_callback', 0, async function (done) { + console.log("FMS_fuzzTestArray_1400_param_05_callback getFormsInfoByModule begin"); + + var bundleName = arrayTest(); + console.log("FMS_fuzzTestArray_1400_param_05_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = numberTest(); + console.log("FMS_fuzzTestArray_1400_param_05_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestArray_1400_param_05_callback async::callbak return!!!") + console.log("FMS_fuzzTestArray_1400_param_05_callback async::sucess data:" + data); + console.log("FMS_fuzzTestArray_1400_param_05_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestArray_1400_param_05_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_1400_param_05_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_1400_param_05_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestArray_1400_param_05_promise', 0, async function (done) { + console.log("FMS_fuzzTestArray_1400_param_05_promise getFormsInfoByModule begin"); + + var bundleName = arrayTest(); + console.log("FMS_fuzzTestArray_1400_param_05_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = numberTest(); + console.log("FMS_fuzzTestArray_1400_param_05_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestArray_1400_param_05_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestArray_1400_param_05_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_1400_param_05_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_1400_param_05_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestArray_1400_param_06_callback', 0, async function (done) { + console.log("FMS_fuzzTestArray_1400_param_06_callback getFormsInfoByModule begin"); + + var bundleName = arrayTest(); + console.log("FMS_fuzzTestArray_1400_param_06_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = objectTest(); + console.log("FMS_fuzzTestArray_1400_param_06_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestArray_1400_param_06_callback async::callbak return!!!") + console.log("FMS_fuzzTestArray_1400_param_06_callback async::sucess data:" + data); + console.log("FMS_fuzzTestArray_1400_param_06_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestArray_1400_param_06_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_1400_param_06_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_1400_param_06_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestArray_1400_param_06_promise', 0, async function (done) { + console.log("FMS_fuzzTestArray_1400_param_06_promise getFormsInfoByModule begin"); + + var bundleName = arrayTest(); + console.log("FMS_fuzzTestArray_1400_param_06_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = objectTest(); + console.log("FMS_fuzzTestArray_1400_param_06_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestArray_1400_param_06_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestArray_1400_param_06_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_1400_param_06_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_1400_param_06_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestArray_1400_param_07_callback', 0, async function (done) { + console.log("FMS_fuzzTestArray_1400_param_07_callback getFormsInfoByModule begin"); + + var bundleName = arrayTest(); + console.log("FMS_fuzzTestArray_1400_param_07_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = stringTest(); + console.log("FMS_fuzzTestArray_1400_param_07_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestArray_1400_param_07_callback async::callbak return!!!") + console.log("FMS_fuzzTestArray_1400_param_07_callback async::sucess data:" + data); + console.log("FMS_fuzzTestArray_1400_param_07_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestArray_1400_param_07_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_1400_param_07_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_1400_param_07_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestArray_1400_param_07_promise', 0, async function (done) { + console.log("FMS_fuzzTestArray_1400_param_07_promise getFormsInfoByModule begin"); + + var bundleName = arrayTest(); + console.log("FMS_fuzzTestArray_1400_param_07_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = stringTest(); + console.log("FMS_fuzzTestArray_1400_param_07_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestArray_1400_param_07_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestArray_1400_param_07_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_1400_param_07_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_1400_param_07_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestArray_1400_param_08_callback', 0, async function (done) { + console.log("FMS_fuzzTestArray_1400_param_08_callback getFormsInfoByModule begin"); + + var bundleName = arrayTest(); + console.log("FMS_fuzzTestArray_1400_param_08_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = undefinedTest(); + console.log("FMS_fuzzTestArray_1400_param_08_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestArray_1400_param_08_callback async::callbak return!!!") + console.log("FMS_fuzzTestArray_1400_param_08_callback async::sucess data:" + data); + console.log("FMS_fuzzTestArray_1400_param_08_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestArray_1400_param_08_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_1400_param_08_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_1400_param_08_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestArray_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestArray_1400_param_08_promise', 0, async function (done) { + console.log("FMS_fuzzTestArray_1400_param_08_promise getFormsInfoByModule begin"); + + var bundleName = arrayTest(); + console.log("FMS_fuzzTestArray_1400_param_08_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = undefinedTest(); + console.log("FMS_fuzzTestArray_1400_param_08_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestArray_1400_param_08_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestArray_1400_param_08_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestArray_1400_param_08_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestArray_1400_param_08_promise==================end'); + }, TIMEOUT) + }) +}) \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestBool.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestBool.test.js new file mode 100644 index 0000000000000000000000000000000000000000..15d25f6fa7660dd6c19bf73317b0a356d74eec76 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestBool.test.js @@ -0,0 +1,1465 @@ +/* + * 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 formManager from '@ohos.ability.formManager' +import {describe, it, expect} from 'deccjsunit/index' +import {stringTest, numberTest, booleanTest, nullTest, undefinedTest, + objectTest, arrayTest, functionTest} from './getParam.js' + +const TIMEOUT = 5000; +describe('FMS_FuzzTest', function () { + console.log("FMS_FuzzTest===start"); + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_0200 + * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestBool_0200_callback', 0, async function (done) { + console.log("FMS_fuzzTestBool_0200_callback deleteForm begin"); + + var formId = booleanTest(); + console.log("FMS_fuzzTestBool_0200_callback deleteForm formId typeof:" + typeof(formId)); + + try{ + formManager.deleteForm( + formId, + (err,data) => { + console.log("FMS_fuzzTestBool_0200_callback async::callbak return!!!") + console.log("FMS_fuzzTestBool_0200_callback async::sucess data:" + data); + console.log("FMS_fuzzTestBool_0200_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestBool_0200_callback Exception caught:" + e); + expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_0200_callback deleteForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_0200_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_0200 + * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestBool_0200_promise', 0, async function (done) { + console.log("FMS_fuzzTestBool_0200_promise deleteForm begin"); + + var formId = booleanTest(); + console.log("FMS_fuzzTestBool_0200_promise deleteForm formId typeof:" + typeof(formId)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.deleteForm(formId)); + console.log("FMS_fuzzTestBool_0200_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestBool_0200_promise Exception caught:" + e); + expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_0200_promise deleteForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_0200_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestBool_0300_param_01_callback', 0, async function (done) { + console.log("FMS_fuzzTestBool_0300_param_01_callback releaseForm begin"); + + var formId = booleanTest(); + console.log("FMS_fuzzTestBool_0300_param_01_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = arrayTest(); + console.log("FMS_fuzzTestBool_0300_param_01_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestBool_0300_param_01_callback async::callbak return!!!") + console.log("FMS_fuzzTestBool_0300_param_01_callback async::sucess data:" + data); + console.log("FMS_fuzzTestBool_0300_param_01_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestBool_0300_param_01_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_0300_param_01_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_0300_param_01_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestBool_0300_param_01_promise', 0, async function (done) { + console.log("FMS_fuzzTestBool_0300_param_01_promise releaseForm begin"); + + var formId = booleanTest(); + console.log("FMS_fuzzTestBool_0300_param_01_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = arrayTest(); + console.log("FMS_fuzzTestBool_0300_param_01_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestBool_0300_param_01_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestBool_0300_param_01_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_0300_param_01_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_0300_param_01_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestBool_0300_param_02_callback', 0, async function (done) { + console.log("FMS_fuzzTestBool_0300_param_02_callback releaseForm begin"); + + var formId = booleanTest(); + console.log("FMS_fuzzTestBool_0300_param_02_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = booleanTest(); + console.log("FMS_fuzzTestBool_0300_param_02_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestBool_0300_param_02_callback async::callbak return!!!") + console.log("FMS_fuzzTestBool_0300_param_02_callback async::sucess data:" + data); + console.log("FMS_fuzzTestBool_0300_param_02_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestBool_0300_param_02_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_0300_param_02_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_0300_param_02_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestBool_0300_param_02_promise', 0, async function (done) { + console.log("FMS_fuzzTestBool_0300_param_02_promise releaseForm begin"); + + var formId = booleanTest(); + console.log("FMS_fuzzTestBool_0300_param_02_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = booleanTest(); + console.log("FMS_fuzzTestBool_0300_param_02_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestBool_0300_param_02_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestBool_0300_param_02_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_0300_param_02_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_0300_param_02_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestBool_0300_param_03_callback', 0, async function (done) { + console.log("FMS_fuzzTestBool_0300_param_03_callback releaseForm begin"); + + var formId = booleanTest(); + console.log("FMS_fuzzTestBool_0300_param_03_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = functionTest(); + console.log("FMS_fuzzTestBool_0300_param_03_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestBool_0300_param_03_callback async::callbak return!!!") + console.log("FMS_fuzzTestBool_0300_param_03_callback async::sucess data:" + data); + console.log("FMS_fuzzTestBool_0300_param_03_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestBool_0300_param_03_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_0300_param_03_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_0300_param_03_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestBool_0300_param_03_promise', 0, async function (done) { + console.log("FMS_fuzzTestBool_0300_param_03_promise releaseForm begin"); + + var formId = booleanTest(); + console.log("FMS_fuzzTestBool_0300_param_03_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = functionTest(); + console.log("FMS_fuzzTestBool_0300_param_03_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestBool_0300_param_03_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestBool_0300_param_03_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_0300_param_03_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_0300_param_03_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestBool_0300_param_04_callback', 0, async function (done) { + console.log("FMS_fuzzTestBool_0300_param_04_callback releaseForm begin"); + + var formId = booleanTest(); + console.log("FMS_fuzzTestBool_0300_param_04_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = nullTest(); + console.log("FMS_fuzzTestBool_0300_param_04_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestBool_0300_param_04_callback async::callbak return!!!") + console.log("FMS_fuzzTestBool_0300_param_04_callback async::sucess data:" + data); + console.log("FMS_fuzzTestBool_0300_param_04_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestBool_0300_param_04_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_0300_param_04_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_0300_param_04_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestBool_0300_param_04_promise', 0, async function (done) { + console.log("FMS_fuzzTestBool_0300_param_04_promise releaseForm begin"); + + var formId = booleanTest(); + console.log("FMS_fuzzTestBool_0300_param_04_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = nullTest(); + console.log("FMS_fuzzTestBool_0300_param_04_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestBool_0300_param_04_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestBool_0300_param_04_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_0300_param_04_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_0300_param_04_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestBool_0300_param_05_callback', 0, async function (done) { + console.log("FMS_fuzzTestBool_0300_param_05_callback releaseForm begin"); + + var formId = booleanTest(); + console.log("FMS_fuzzTestBool_0300_param_05_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = numberTest(); + console.log("FMS_fuzzTestBool_0300_param_05_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestBool_0300_param_05_callback async::callbak return!!!") + console.log("FMS_fuzzTestBool_0300_param_05_callback async::sucess data:" + data); + console.log("FMS_fuzzTestBool_0300_param_05_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestBool_0300_param_05_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_0300_param_05_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_0300_param_05_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestBool_0300_param_05_promise', 0, async function (done) { + console.log("FMS_fuzzTestBool_0300_param_05_promise releaseForm begin"); + + var formId = booleanTest(); + console.log("FMS_fuzzTestBool_0300_param_05_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = numberTest(); + console.log("FMS_fuzzTestBool_0300_param_05_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestBool_0300_param_05_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestBool_0300_param_05_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_0300_param_05_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_0300_param_05_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestBool_0300_param_06_callback', 0, async function (done) { + console.log("FMS_fuzzTestBool_0300_param_06_callback releaseForm begin"); + + var formId = booleanTest(); + console.log("FMS_fuzzTestBool_0300_param_06_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = objectTest(); + console.log("FMS_fuzzTestBool_0300_param_06_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestBool_0300_param_06_callback async::callbak return!!!") + console.log("FMS_fuzzTestBool_0300_param_06_callback async::sucess data:" + data); + console.log("FMS_fuzzTestBool_0300_param_06_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestBool_0300_param_06_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_0300_param_06_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_0300_param_06_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestBool_0300_param_06_promise', 0, async function (done) { + console.log("FMS_fuzzTestBool_0300_param_06_promise releaseForm begin"); + + var formId = booleanTest(); + console.log("FMS_fuzzTestBool_0300_param_06_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = objectTest(); + console.log("FMS_fuzzTestBool_0300_param_06_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestBool_0300_param_06_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestBool_0300_param_06_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_0300_param_06_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_0300_param_06_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestBool_0300_param_07_callback', 0, async function (done) { + console.log("FMS_fuzzTestBool_0300_param_07_callback releaseForm begin"); + + var formId = booleanTest(); + console.log("FMS_fuzzTestBool_0300_param_07_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = stringTest(); + console.log("FMS_fuzzTestBool_0300_param_07_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestBool_0300_param_07_callback async::callbak return!!!") + console.log("FMS_fuzzTestBool_0300_param_07_callback async::sucess data:" + data); + console.log("FMS_fuzzTestBool_0300_param_07_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestBool_0300_param_07_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_0300_param_07_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_0300_param_07_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestBool_0300_param_07_promise', 0, async function (done) { + console.log("FMS_fuzzTestBool_0300_param_07_promise releaseForm begin"); + + var formId = booleanTest(); + console.log("FMS_fuzzTestBool_0300_param_07_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = stringTest(); + console.log("FMS_fuzzTestBool_0300_param_07_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestBool_0300_param_07_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestBool_0300_param_07_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_0300_param_07_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_0300_param_07_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestBool_0300_param_08_callback', 0, async function (done) { + console.log("FMS_fuzzTestBool_0300_param_08_callback releaseForm begin"); + + var formId = booleanTest(); + console.log("FMS_fuzzTestBool_0300_param_08_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = undefinedTest(); + console.log("FMS_fuzzTestBool_0300_param_08_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestBool_0300_param_08_callback async::callbak return!!!") + console.log("FMS_fuzzTestBool_0300_param_08_callback async::sucess data:" + data); + console.log("FMS_fuzzTestBool_0300_param_08_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestBool_0300_param_08_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_0300_param_08_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_0300_param_08_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestBool_0300_param_08_promise', 0, async function (done) { + console.log("FMS_fuzzTestBool_0300_param_08_promise releaseForm begin"); + + var formId = booleanTest(); + console.log("FMS_fuzzTestBool_0300_param_08_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = undefinedTest(); + console.log("FMS_fuzzTestBool_0300_param_08_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestBool_0300_param_08_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestBool_0300_param_08_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_0300_param_08_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_0300_param_08_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestBool_0300_param_09_callback', 0, async function (done) { + console.log("FMS_fuzzTestBool_0300_param_09_callback releaseForm begin"); + + var formId = booleanTest(); + console.log("FMS_fuzzTestBool_0300_param_09_callback releaseForm formId typeof:" + + typeof(formId) + ",formId:" + formId); + + try{ + formManager.releaseForm( + formId, + (err,data) => { + console.log("FMS_fuzzTestBool_0300_param_09_callback async::callbak return!!!") + console.log("FMS_fuzzTestBool_0300_param_09_callback async::sucess data:" + data); + console.log("FMS_fuzzTestBool_0300_param_09_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + + ); + } catch (e) { + console.log("FMS_fuzzTestBool_0300_param_09_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_0300_param_09_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_0300_param_09_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestBool_0300_param_09_promise', 0, async function (done) { + console.log("FMS_fuzzTestBool_0300_param_09_promise releaseForm begin"); + + var formId = booleanTest(); + console.log("FMS_fuzzTestBool_0300_param_09_promise releaseForm formId typeof:" + + typeof(formId) + ",formId:" + formId); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId)); + console.log("FMS_fuzzTestBool_0300_param_09_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestBool_0300_param_09_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_0300_param_09_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_0300_param_09_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_1200 + * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestBool_1200_callback', 0, async function (done) { + console.log("FMS_fuzzTestBool_1200_callback getAllFormsInfo begin"); + + var testParam = booleanTest(); + console.log("FMS_fuzzTestBool_1200_callback getAllFormsInfo formIds typeof:" + typeof(testParam)); + + try{ + formManager.getAllFormsInfo( + testParam, + (err,data) => { + console.log("FMS_fuzzTestBool_1200_callback async::callbak return!!!") + console.log("FMS_fuzzTestBool_1200_callback async::sucess data:" + data); + console.log("FMS_fuzzTestBool_1200_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestBool_1200_callback Exception caught:" + e); + expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_1200_callback getAllFormsInfo end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_1200_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_1200 + * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestBool_1200_promise', 0, async function (done) { + console.log("FMS_fuzzTestBool_1200_promise getAllFormsInfo begin"); + + var testParam = booleanTest(); + console.log("FMS_fuzzTestBool_1200_promise getAllFormsInfo formIds typeof:" + typeof(testParam)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getAllFormsInfo(testParam)); + console.log("FMS_fuzzTestBool_1200_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestBool_1200_promise Exception caught:" + e); + expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_1200_promise getAllFormsInfo end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_1200_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_1300 + * @tc.desc Check whether the form configuration information query interface of the specified package + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestBool_1300_callback', 0, async function (done) { + console.log("FMS_fuzzTestBool_1300_callback getFormsInfoByApp begin"); + + var bundleName = booleanTest(); + console.log("FMS_fuzzTestBool_1300_callback getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); + + try{ + formManager.getFormsInfo( + bundleName, + (err,data) => { + console.log("FMS_fuzzTestBool_1300_callback async::callbak return!!!") + console.log("FMS_fuzzTestBool_1300_callback async::sucess data:" + data); + console.log("FMS_fuzzTestBool_1300_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestBool_1300_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_1300_callback getFormsInfoByApp end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_1300_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_1300 + * @tc.desc Check whether the form configuration information query interface of the specified package + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestBool_1300_promise', 0, async function (done) { + console.log("FMS_fuzzTestBool_1300_promise getFormsInfoByApp begin"); + + var bundleName = booleanTest(); + console.log("FMS_fuzzTestBool_1300_promise getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName)); + console.log("FMS_fuzzTestBool_1300_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestBool_1300_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_1300_promise getFormsInfoByApp end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_1300_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestBool_1400_param_01_callback', 0, async function (done) { + console.log("FMS_fuzzTestBool_1400_param_01_callback getFormsInfoByModule begin"); + + var bundleName = booleanTest(); + console.log("FMS_fuzzTestBool_1400_param_01_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = arrayTest(); + console.log("FMS_fuzzTestBool_1400_param_01_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestBool_1400_param_01_callback async::callbak return!!!") + console.log("FMS_fuzzTestBool_1400_param_01_callback async::sucess data:" + data); + console.log("FMS_fuzzTestBool_1400_param_01_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestBool_1400_param_01_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_1400_param_01_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_1400_param_01_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestBool_1400_param_01_promise', 0, async function (done) { + console.log("FMS_fuzzTestBool_1400_param_01_promise getFormsInfoByModule begin"); + + var bundleName = booleanTest(); + console.log("FMS_fuzzTestBool_1400_param_01_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = arrayTest(); + console.log("FMS_fuzzTestBool_1400_param_01_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestBool_1400_param_01_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestBool_1400_param_01_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_1400_param_01_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_1400_param_01_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestBool_1400_param_02_callback', 0, async function (done) { + console.log("FMS_fuzzTestBool_1400_param_02_callback getFormsInfoByModule begin"); + + var bundleName = booleanTest(); + console.log("FMS_fuzzTestBool_1400_param_02_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = booleanTest(); + console.log("FMS_fuzzTestBool_1400_param_02_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestBool_1400_param_02_callback async::callbak return!!!") + console.log("FMS_fuzzTestBool_1400_param_02_callback async::sucess data:" + data); + console.log("FMS_fuzzTestBool_1400_param_02_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestBool_1400_param_02_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_1400_param_02_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_1400_param_02_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestBool_1400_param_02_promise', 0, async function (done) { + console.log("FMS_fuzzTestBool_1400_param_02_promise getFormsInfoByModule begin"); + + var bundleName = booleanTest(); + console.log("FMS_fuzzTestBool_1400_param_02_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = booleanTest(); + console.log("FMS_fuzzTestBool_1400_param_02_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestBool_1400_param_02_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestBool_1400_param_02_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_1400_param_02_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_1400_param_02_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestBool_1400_param_03_callback', 0, async function (done) { + console.log("FMS_fuzzTestBool_1400_param_03_callback getFormsInfoByModule begin"); + + var bundleName = booleanTest(); + console.log("FMS_fuzzTestBool_1400_param_03_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = functionTest(); + console.log("FMS_fuzzTestBool_1400_param_03_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestBool_1400_param_03_callback async::callbak return!!!") + console.log("FMS_fuzzTestBool_1400_param_03_callback async::sucess data:" + data); + console.log("FMS_fuzzTestBool_1400_param_03_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestBool_1400_param_03_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_1400_param_03_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_1400_param_03_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestBool_1400_param_03_promise', 0, async function (done) { + console.log("FMS_fuzzTestBool_1400_param_03_promise getFormsInfoByModule begin"); + + var bundleName = booleanTest(); + console.log("FMS_fuzzTestBool_1400_param_03_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = functionTest(); + console.log("FMS_fuzzTestBool_1400_param_03_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestBool_1400_param_03_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestBool_1400_param_03_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_1400_param_03_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_1400_param_03_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestBool_1400_param_04_callback', 0, async function (done) { + console.log("FMS_fuzzTestBool_1400_param_04_callback getFormsInfoByModule begin"); + + var bundleName = booleanTest(); + console.log("FMS_fuzzTestBool_1400_param_04_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = nullTest(); + console.log("FMS_fuzzTestBool_1400_param_04_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestBool_1400_param_04_callback async::callbak return!!!") + console.log("FMS_fuzzTestBool_1400_param_04_callback async::sucess data:" + data); + console.log("FMS_fuzzTestBool_1400_param_04_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestBool_1400_param_04_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_1400_param_04_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_1400_param_04_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestBool_1400_param_04_promise', 0, async function (done) { + console.log("FMS_fuzzTestBool_1400_param_04_promise getFormsInfoByModule begin"); + + var bundleName = booleanTest(); + console.log("FMS_fuzzTestBool_1400_param_04_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = nullTest(); + console.log("FMS_fuzzTestBool_1400_param_04_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestBool_1400_param_04_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestBool_1400_param_04_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_1400_param_04_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_1400_param_04_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestBool_1400_param_05_callback', 0, async function (done) { + console.log("FMS_fuzzTestBool_1400_param_05_callback getFormsInfoByModule begin"); + + var bundleName = booleanTest(); + console.log("FMS_fuzzTestBool_1400_param_05_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = numberTest(); + console.log("FMS_fuzzTestBool_1400_param_05_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestBool_1400_param_05_callback async::callbak return!!!") + console.log("FMS_fuzzTestBool_1400_param_05_callback async::sucess data:" + data); + console.log("FMS_fuzzTestBool_1400_param_05_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestBool_1400_param_05_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_1400_param_05_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_1400_param_05_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestBool_1400_param_05_promise', 0, async function (done) { + console.log("FMS_fuzzTestBool_1400_param_05_promise getFormsInfoByModule begin"); + + var bundleName = booleanTest(); + console.log("FMS_fuzzTestBool_1400_param_05_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = numberTest(); + console.log("FMS_fuzzTestBool_1400_param_05_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestBool_1400_param_05_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestBool_1400_param_05_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_1400_param_05_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_1400_param_05_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestBool_1400_param_06_callback', 0, async function (done) { + console.log("FMS_fuzzTestBool_1400_param_06_callback getFormsInfoByModule begin"); + + var bundleName = booleanTest(); + console.log("FMS_fuzzTestBool_1400_param_06_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = objectTest(); + console.log("FMS_fuzzTestBool_1400_param_06_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestBool_1400_param_06_callback async::callbak return!!!") + console.log("FMS_fuzzTestBool_1400_param_06_callback async::sucess data:" + data); + console.log("FMS_fuzzTestBool_1400_param_06_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestBool_1400_param_06_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_1400_param_06_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_1400_param_06_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestBool_1400_param_06_promise', 0, async function (done) { + console.log("FMS_fuzzTestBool_1400_param_06_promise getFormsInfoByModule begin"); + + var bundleName = booleanTest(); + console.log("FMS_fuzzTestBool_1400_param_06_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = objectTest(); + console.log("FMS_fuzzTestBool_1400_param_06_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestBool_1400_param_06_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestBool_1400_param_06_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_1400_param_06_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_1400_param_06_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestBool_1400_param_07_callback', 0, async function (done) { + console.log("FMS_fuzzTestBool_1400_param_07_callback getFormsInfoByModule begin"); + + var bundleName = booleanTest(); + console.log("FMS_fuzzTestBool_1400_param_07_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = stringTest(); + console.log("FMS_fuzzTestBool_1400_param_07_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestBool_1400_param_07_callback async::callbak return!!!") + console.log("FMS_fuzzTestBool_1400_param_07_callback async::sucess data:" + data); + console.log("FMS_fuzzTestBool_1400_param_07_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestBool_1400_param_07_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_1400_param_07_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_1400_param_07_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestBool_1400_param_07_promise', 0, async function (done) { + console.log("FMS_fuzzTestBool_1400_param_07_promise getFormsInfoByModule begin"); + + var bundleName = booleanTest(); + console.log("FMS_fuzzTestBool_1400_param_07_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = stringTest(); + console.log("FMS_fuzzTestBool_1400_param_07_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestBool_1400_param_07_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestBool_1400_param_07_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_1400_param_07_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_1400_param_07_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestBool_1400_param_08_callback', 0, async function (done) { + console.log("FMS_fuzzTestBool_1400_param_08_callback getFormsInfoByModule begin"); + + var bundleName = booleanTest(); + console.log("FMS_fuzzTestBool_1400_param_08_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = undefinedTest(); + console.log("FMS_fuzzTestBool_1400_param_08_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestBool_1400_param_08_callback async::callbak return!!!") + console.log("FMS_fuzzTestBool_1400_param_08_callback async::sucess data:" + data); + console.log("FMS_fuzzTestBool_1400_param_08_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestBool_1400_param_08_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_1400_param_08_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_1400_param_08_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestBool_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestBool_1400_param_08_promise', 0, async function (done) { + console.log("FMS_fuzzTestBool_1400_param_08_promise getFormsInfoByModule begin"); + + var bundleName = booleanTest(); + console.log("FMS_fuzzTestBool_1400_param_08_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = undefinedTest(); + console.log("FMS_fuzzTestBool_1400_param_08_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestBool_1400_param_08_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestBool_1400_param_08_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestBool_1400_param_08_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestBool_1400_param_08_promise==================end'); + }, TIMEOUT) + }) +}) \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestFunction.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestFunction.test.js new file mode 100644 index 0000000000000000000000000000000000000000..329134e715f3359cc38035fba5a7e98233e0a054 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestFunction.test.js @@ -0,0 +1,1465 @@ +/* + * 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 formManager from '@ohos.ability.formManager' +import {describe, it, expect} from 'deccjsunit/index' +import {stringTest, numberTest, booleanTest, nullTest, undefinedTest, + objectTest, arrayTest, functionTest} from './getParam.js' + +const TIMEOUT = 5000; +describe('FMS_fuzzTestFunction', function () { + console.log("FMS_fuzzTestFunction===start"); + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_0200 + * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestFunction_0200_callback', 0, async function (done) { + console.log("FMS_fuzzTestFunction_0200_callback deleteForm begin"); + + var formId = functionTest(); + console.log("FMS_fuzzTestFunction_0200_callback deleteForm formId typeof:" + typeof(formId)); + + try{ + formManager.deleteForm( + formId, + (err,data) => { + console.log("FMS_fuzzTestFunction_0200_callback async::callbak return!!!") + console.log("FMS_fuzzTestFunction_0200_callback async::sucess data:" + data); + console.log("FMS_fuzzTestFunction_0200_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestFunction_0200_callback Exception caught:" + e); + expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_0200_callback deleteForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_0200_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_0200 + * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestFunction_0200_promise', 0, async function (done) { + console.log("FMS_fuzzTestFunction_0200_promise deleteForm begin"); + + var formId = functionTest(); + console.log("FMS_fuzzTestFunction_0200_promise deleteForm formId typeof:" + typeof(formId)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.deleteForm(formId)); + console.log("FMS_fuzzTestFunction_0200_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestFunction_0200_promise Exception caught:" + e); + expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_0200_promise deleteForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_0200_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestFunction_0300_param_01_callback', 0, async function (done) { + console.log("FMS_fuzzTestFunction_0300_param_01_callback releaseForm begin"); + + var formId = functionTest(); + console.log("FMS_fuzzTestFunction_0300_param_01_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = arrayTest(); + console.log("FMS_fuzzTestFunction_0300_param_01_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestFunction_0300_param_01_callback async::callbak return!!!") + console.log("FMS_fuzzTestFunction_0300_param_01_callback async::sucess data:" + data); + console.log("FMS_fuzzTestFunction_0300_param_01_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestFunction_0300_param_01_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_0300_param_01_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_0300_param_01_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestFunction_0300_param_01_promise', 0, async function (done) { + console.log("FMS_fuzzTestFunction_0300_param_01_promise releaseForm begin"); + + var formId = functionTest(); + console.log("FMS_fuzzTestFunction_0300_param_01_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = arrayTest(); + console.log("FMS_fuzzTestFunction_0300_param_01_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestFunction_0300_param_01_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestFunction_0300_param_01_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_0300_param_01_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_0300_param_01_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestFunction_0300_param_02_callback', 0, async function (done) { + console.log("FMS_fuzzTestFunction_0300_param_02_callback releaseForm begin"); + + var formId = functionTest(); + console.log("FMS_fuzzTestFunction_0300_param_02_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = booleanTest(); + console.log("FMS_fuzzTestFunction_0300_param_02_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestFunction_0300_param_02_callback async::callbak return!!!") + console.log("FMS_fuzzTestFunction_0300_param_02_callback async::sucess data:" + data); + console.log("FMS_fuzzTestFunction_0300_param_02_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestFunction_0300_param_02_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_0300_param_02_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_0300_param_02_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestFunction_0300_param_02_promise', 0, async function (done) { + console.log("FMS_fuzzTestFunction_0300_param_02_promise releaseForm begin"); + + var formId = functionTest(); + console.log("FMS_fuzzTestFunction_0300_param_02_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = booleanTest(); + console.log("FMS_fuzzTestFunction_0300_param_02_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestFunction_0300_param_02_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestFunction_0300_param_02_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_0300_param_02_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_0300_param_02_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestFunction_0300_param_03_callback', 0, async function (done) { + console.log("FMS_fuzzTestFunction_0300_param_03_callback releaseForm begin"); + + var formId = functionTest(); + console.log("FMS_fuzzTestFunction_0300_param_03_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = functionTest(); + console.log("FMS_fuzzTestFunction_0300_param_03_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestFunction_0300_param_03_callback async::callbak return!!!") + console.log("FMS_fuzzTestFunction_0300_param_03_callback async::sucess data:" + data); + console.log("FMS_fuzzTestFunction_0300_param_03_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestFunction_0300_param_03_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_0300_param_03_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_0300_param_03_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestFunction_0300_param_03_promise', 0, async function (done) { + console.log("FMS_fuzzTestFunction_0300_param_03_promise releaseForm begin"); + + var formId = functionTest(); + console.log("FMS_fuzzTestFunction_0300_param_03_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = functionTest(); + console.log("FMS_fuzzTestFunction_0300_param_03_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestFunction_0300_param_03_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestFunction_0300_param_03_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_0300_param_03_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_0300_param_03_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestFunction_0300_param_04_callback', 0, async function (done) { + console.log("FMS_fuzzTestFunction_0300_param_04_callback releaseForm begin"); + + var formId = functionTest(); + console.log("FMS_fuzzTestFunction_0300_param_04_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = nullTest(); + console.log("FMS_fuzzTestFunction_0300_param_04_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestFunction_0300_param_04_callback async::callbak return!!!") + console.log("FMS_fuzzTestFunction_0300_param_04_callback async::sucess data:" + data); + console.log("FMS_fuzzTestFunction_0300_param_04_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestFunction_0300_param_04_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_0300_param_04_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_0300_param_04_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestFunction_0300_param_04_promise', 0, async function (done) { + console.log("FMS_fuzzTestFunction_0300_param_04_promise releaseForm begin"); + + var formId = functionTest(); + console.log("FMS_fuzzTestFunction_0300_param_04_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = nullTest(); + console.log("FMS_fuzzTestFunction_0300_param_04_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestFunction_0300_param_04_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestFunction_0300_param_04_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_0300_param_04_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_0300_param_04_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestFunction_0300_param_05_callback', 0, async function (done) { + console.log("FMS_fuzzTestFunction_0300_param_05_callback releaseForm begin"); + + var formId = functionTest(); + console.log("FMS_fuzzTestFunction_0300_param_05_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = numberTest(); + console.log("FMS_fuzzTestFunction_0300_param_05_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestFunction_0300_param_05_callback async::callbak return!!!") + console.log("FMS_fuzzTestFunction_0300_param_05_callback async::sucess data:" + data); + console.log("FMS_fuzzTestFunction_0300_param_05_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestFunction_0300_param_05_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_0300_param_05_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_0300_param_05_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestFunction_0300_param_05_promise', 0, async function (done) { + console.log("FMS_fuzzTestFunction_0300_param_05_promise releaseForm begin"); + + var formId = functionTest(); + console.log("FMS_fuzzTestFunction_0300_param_05_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = numberTest(); + console.log("FMS_fuzzTestFunction_0300_param_05_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestFunction_0300_param_05_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestFunction_0300_param_05_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_0300_param_05_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_0300_param_05_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestFunction_0300_param_06_callback', 0, async function (done) { + console.log("FMS_fuzzTestFunction_0300_param_06_callback releaseForm begin"); + + var formId = functionTest(); + console.log("FMS_fuzzTestFunction_0300_param_06_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = objectTest(); + console.log("FMS_fuzzTestFunction_0300_param_06_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestFunction_0300_param_06_callback async::callbak return!!!") + console.log("FMS_fuzzTestFunction_0300_param_06_callback async::sucess data:" + data); + console.log("FMS_fuzzTestFunction_0300_param_06_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestFunction_0300_param_06_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_0300_param_06_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_0300_param_06_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestFunction_0300_param_06_promise', 0, async function (done) { + console.log("FMS_fuzzTestFunction_0300_param_06_promise releaseForm begin"); + + var formId = functionTest(); + console.log("FMS_fuzzTestFunction_0300_param_06_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = objectTest(); + console.log("FMS_fuzzTestFunction_0300_param_06_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestFunction_0300_param_06_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestFunction_0300_param_06_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_0300_param_06_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_0300_param_06_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestFunction_0300_param_07_callback', 0, async function (done) { + console.log("FMS_fuzzTestFunction_0300_param_07_callback releaseForm begin"); + + var formId = functionTest(); + console.log("FMS_fuzzTestFunction_0300_param_07_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = stringTest(); + console.log("FMS_fuzzTestFunction_0300_param_07_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestFunction_0300_param_07_callback async::callbak return!!!") + console.log("FMS_fuzzTestFunction_0300_param_07_callback async::sucess data:" + data); + console.log("FMS_fuzzTestFunction_0300_param_07_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestFunction_0300_param_07_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_0300_param_07_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_0300_param_07_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestFunction_0300_param_07_promise', 0, async function (done) { + console.log("FMS_fuzzTestFunction_0300_param_07_promise releaseForm begin"); + + var formId = functionTest(); + console.log("FMS_fuzzTestFunction_0300_param_07_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = stringTest(); + console.log("FMS_fuzzTestFunction_0300_param_07_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestFunction_0300_param_07_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestFunction_0300_param_07_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_0300_param_07_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_0300_param_07_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestFunction_0300_param_08_callback', 0, async function (done) { + console.log("FMS_fuzzTestFunction_0300_param_08_callback releaseForm begin"); + + var formId = functionTest(); + console.log("FMS_fuzzTestFunction_0300_param_08_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = undefinedTest(); + console.log("FMS_fuzzTestFunction_0300_param_08_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestFunction_0300_param_08_callback async::callbak return!!!") + console.log("FMS_fuzzTestFunction_0300_param_08_callback async::sucess data:" + data); + console.log("FMS_fuzzTestFunction_0300_param_08_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestFunction_0300_param_08_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_0300_param_08_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_0300_param_08_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestFunction_0300_param_08_promise', 0, async function (done) { + console.log("FMS_fuzzTestFunction_0300_param_08_promise releaseForm begin"); + + var formId = functionTest(); + console.log("FMS_fuzzTestFunction_0300_param_08_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = undefinedTest(); + console.log("FMS_fuzzTestFunction_0300_param_08_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestFunction_0300_param_08_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestFunction_0300_param_08_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_0300_param_08_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_0300_param_08_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestFunction_0300_param_09_callback', 0, async function (done) { + console.log("FMS_fuzzTestFunction_0300_param_09_callback releaseForm begin"); + + var formId = functionTest(); + console.log("FMS_fuzzTestFunction_0300_param_09_callback releaseForm formId typeof:" + + typeof(formId) + ",formId:" + formId); + + try{ + formManager.releaseForm( + formId, + (err,data) => { + console.log("FMS_fuzzTestFunction_0300_param_09_callback async::callbak return!!!") + console.log("FMS_fuzzTestFunction_0300_param_09_callback async::sucess data:" + data); + console.log("FMS_fuzzTestFunction_0300_param_09_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + + ); + } catch (e) { + console.log("FMS_fuzzTestFunction_0300_param_09_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_0300_param_09_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_0300_param_09_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestFunction_0300_param_09_promise', 0, async function (done) { + console.log("FMS_fuzzTestFunction_0300_param_09_promise releaseForm begin"); + + var formId = functionTest(); + console.log("FMS_fuzzTestFunction_0300_param_09_promise releaseForm formId typeof:" + + typeof(formId) + ",formId:" + formId); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId)); + console.log("FMS_fuzzTestFunction_0300_param_09_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestFunction_0300_param_09_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_0300_param_09_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_0300_param_09_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_1200 + * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestFunction_1200_callback', 0, async function (done) { + console.log("FMS_fuzzTestFunction_1200_callback getAllFormsInfo begin"); + + var testParam = functionTest(); + console.log("FMS_fuzzTestFunction_1200_callback getAllFormsInfo formIds typeof:" + typeof(testParam)); + + try{ + formManager.getAllFormsInfo( + testParam, + (err,data) => { + console.log("FMS_fuzzTestFunction_1200_callback async::callbak return!!!") + console.log("FMS_fuzzTestFunction_1200_callback async::sucess data:" + data); + console.log("FMS_fuzzTestFunction_1200_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestFunction_1200_callback Exception caught:" + e); + expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_1200_callback getAllFormsInfo end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_1200_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_1200 + * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestFunction_1200_promise', 0, async function (done) { + console.log("FMS_fuzzTestFunction_1200_promise getAllFormsInfo begin"); + + var testParam = functionTest(); + console.log("FMS_fuzzTestFunction_1200_promise getAllFormsInfo formIds typeof:" + typeof(testParam)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getAllFormsInfo(testParam)); + console.log("FMS_fuzzTestFunction_1200_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestFunction_1200_promise Exception caught:" + e); + expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_1200_promise getAllFormsInfo end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_1200_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_1300 + * @tc.desc Check whether the form configuration information query interface of the specified package + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestFunction_1300_callback', 0, async function (done) { + console.log("FMS_fuzzTestFunction_1300_callback getFormsInfoByApp begin"); + + var bundleName = functionTest(); + console.log("FMS_fuzzTestFunction_1300_callback getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); + + try{ + formManager.getFormsInfo( + bundleName, + (err,data) => { + console.log("FMS_fuzzTestFunction_1300_callback async::callbak return!!!") + console.log("FMS_fuzzTestFunction_1300_callback async::sucess data:" + data); + console.log("FMS_fuzzTestFunction_1300_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestFunction_1300_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_1300_callback getFormsInfoByApp end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_1300_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_1300 + * @tc.desc Check whether the form configuration information query interface of the specified package + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestFunction_1300_promise', 0, async function (done) { + console.log("FMS_fuzzTestFunction_1300_promise getFormsInfoByApp begin"); + + var bundleName = functionTest(); + console.log("FMS_fuzzTestFunction_1300_promise getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName)); + console.log("FMS_fuzzTestFunction_1300_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestFunction_1300_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_1300_promise getFormsInfoByApp end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_1300_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestFunction_1400_param_01_callback', 0, async function (done) { + console.log("FMS_fuzzTestFunction_1400_param_01_callback getFormsInfoByModule begin"); + + var bundleName = functionTest(); + console.log("FMS_fuzzTestFunction_1400_param_01_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = arrayTest(); + console.log("FMS_fuzzTestFunction_1400_param_01_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestFunction_1400_param_01_callback async::callbak return!!!") + console.log("FMS_fuzzTestFunction_1400_param_01_callback async::sucess data:" + data); + console.log("FMS_fuzzTestFunction_1400_param_01_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestFunction_1400_param_01_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_1400_param_01_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_1400_param_01_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestFunction_1400_param_01_promise', 0, async function (done) { + console.log("FMS_fuzzTestFunction_1400_param_01_promise getFormsInfoByModule begin"); + + var bundleName = functionTest(); + console.log("FMS_fuzzTestFunction_1400_param_01_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = arrayTest(); + console.log("FMS_fuzzTestFunction_1400_param_01_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestFunction_1400_param_01_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestFunction_1400_param_01_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_1400_param_01_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_1400_param_01_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestFunction_1400_param_02_callback', 0, async function (done) { + console.log("FMS_fuzzTestFunction_1400_param_02_callback getFormsInfoByModule begin"); + + var bundleName = functionTest(); + console.log("FMS_fuzzTestFunction_1400_param_02_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = booleanTest(); + console.log("FMS_fuzzTestFunction_1400_param_02_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestFunction_1400_param_02_callback async::callbak return!!!") + console.log("FMS_fuzzTestFunction_1400_param_02_callback async::sucess data:" + data); + console.log("FMS_fuzzTestFunction_1400_param_02_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestFunction_1400_param_02_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_1400_param_02_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_1400_param_02_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestFunction_1400_param_02_promise', 0, async function (done) { + console.log("FMS_fuzzTestFunction_1400_param_02_promise getFormsInfoByModule begin"); + + var bundleName = functionTest(); + console.log("FMS_fuzzTestFunction_1400_param_02_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = booleanTest(); + console.log("FMS_fuzzTestFunction_1400_param_02_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestFunction_1400_param_02_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestFunction_1400_param_02_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_1400_param_02_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_1400_param_02_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestFunction_1400_param_03_callback', 0, async function (done) { + console.log("FMS_fuzzTestFunction_1400_param_03_callback getFormsInfoByModule begin"); + + var bundleName = functionTest(); + console.log("FMS_fuzzTestFunction_1400_param_03_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = functionTest(); + console.log("FMS_fuzzTestFunction_1400_param_03_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestFunction_1400_param_03_callback async::callbak return!!!") + console.log("FMS_fuzzTestFunction_1400_param_03_callback async::sucess data:" + data); + console.log("FMS_fuzzTestFunction_1400_param_03_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestFunction_1400_param_03_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_1400_param_03_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_1400_param_03_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestFunction_1400_param_03_promise', 0, async function (done) { + console.log("FMS_fuzzTestFunction_1400_param_03_promise getFormsInfoByModule begin"); + + var bundleName = functionTest(); + console.log("FMS_fuzzTestFunction_1400_param_03_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = functionTest(); + console.log("FMS_fuzzTestFunction_1400_param_03_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestFunction_1400_param_03_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestFunction_1400_param_03_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_1400_param_03_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_1400_param_03_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestFunction_1400_param_04_callback', 0, async function (done) { + console.log("FMS_fuzzTestFunction_1400_param_04_callback getFormsInfoByModule begin"); + + var bundleName = functionTest(); + console.log("FMS_fuzzTestFunction_1400_param_04_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = nullTest(); + console.log("FMS_fuzzTestFunction_1400_param_04_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestFunction_1400_param_04_callback async::callbak return!!!") + console.log("FMS_fuzzTestFunction_1400_param_04_callback async::sucess data:" + data); + console.log("FMS_fuzzTestFunction_1400_param_04_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestFunction_1400_param_04_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_1400_param_04_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_1400_param_04_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestFunction_1400_param_04_promise', 0, async function (done) { + console.log("FMS_fuzzTestFunction_1400_param_04_promise getFormsInfoByModule begin"); + + var bundleName = functionTest(); + console.log("FMS_fuzzTestFunction_1400_param_04_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = nullTest(); + console.log("FMS_fuzzTestFunction_1400_param_04_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestFunction_1400_param_04_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestFunction_1400_param_04_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_1400_param_04_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_1400_param_04_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestFunction_1400_param_05_callback', 0, async function (done) { + console.log("FMS_fuzzTestFunction_1400_param_05_callback getFormsInfoByModule begin"); + + var bundleName = functionTest(); + console.log("FMS_fuzzTestFunction_1400_param_05_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = numberTest(); + console.log("FMS_fuzzTestFunction_1400_param_05_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestFunction_1400_param_05_callback async::callbak return!!!") + console.log("FMS_fuzzTestFunction_1400_param_05_callback async::sucess data:" + data); + console.log("FMS_fuzzTestFunction_1400_param_05_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestFunction_1400_param_05_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_1400_param_05_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_1400_param_05_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestFunction_1400_param_05_promise', 0, async function (done) { + console.log("FMS_fuzzTestFunction_1400_param_05_promise getFormsInfoByModule begin"); + + var bundleName = functionTest(); + console.log("FMS_fuzzTestFunction_1400_param_05_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = numberTest(); + console.log("FMS_fuzzTestFunction_1400_param_05_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestFunction_1400_param_05_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestFunction_1400_param_05_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_1400_param_05_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_1400_param_05_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestFunction_1400_param_06_callback', 0, async function (done) { + console.log("FMS_fuzzTestFunction_1400_param_06_callback getFormsInfoByModule begin"); + + var bundleName = functionTest(); + console.log("FMS_fuzzTestFunction_1400_param_06_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = objectTest(); + console.log("FMS_fuzzTestFunction_1400_param_06_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestFunction_1400_param_06_callback async::callbak return!!!") + console.log("FMS_fuzzTestFunction_1400_param_06_callback async::sucess data:" + data); + console.log("FMS_fuzzTestFunction_1400_param_06_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestFunction_1400_param_06_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_1400_param_06_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_1400_param_06_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestFunction_1400_param_06_promise', 0, async function (done) { + console.log("FMS_fuzzTestFunction_1400_param_06_promise getFormsInfoByModule begin"); + + var bundleName = functionTest(); + console.log("FMS_fuzzTestFunction_1400_param_06_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = objectTest(); + console.log("FMS_fuzzTestFunction_1400_param_06_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestFunction_1400_param_06_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestFunction_1400_param_06_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_1400_param_06_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_1400_param_06_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestFunction_1400_param_07_callback', 0, async function (done) { + console.log("FMS_fuzzTestFunction_1400_param_07_callback getFormsInfoByModule begin"); + + var bundleName = functionTest(); + console.log("FMS_fuzzTestFunction_1400_param_07_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = stringTest(); + console.log("FMS_fuzzTestFunction_1400_param_07_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestFunction_1400_param_07_callback async::callbak return!!!") + console.log("FMS_fuzzTestFunction_1400_param_07_callback async::sucess data:" + data); + console.log("FMS_fuzzTestFunction_1400_param_07_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestFunction_1400_param_07_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_1400_param_07_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_1400_param_07_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestFunction_1400_param_07_promise', 0, async function (done) { + console.log("FMS_fuzzTestFunction_1400_param_07_promise getFormsInfoByModule begin"); + + var bundleName = functionTest(); + console.log("FMS_fuzzTestFunction_1400_param_07_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = stringTest(); + console.log("FMS_fuzzTestFunction_1400_param_07_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestFunction_1400_param_07_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestFunction_1400_param_07_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_1400_param_07_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_1400_param_07_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestFunction_1400_param_08_callback', 0, async function (done) { + console.log("FMS_fuzzTestFunction_1400_param_08_callback getFormsInfoByModule begin"); + + var bundleName = functionTest(); + console.log("FMS_fuzzTestFunction_1400_param_08_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = undefinedTest(); + console.log("FMS_fuzzTestFunction_1400_param_08_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestFunction_1400_param_08_callback async::callbak return!!!") + console.log("FMS_fuzzTestFunction_1400_param_08_callback async::sucess data:" + data); + console.log("FMS_fuzzTestFunction_1400_param_08_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestFunction_1400_param_08_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_1400_param_08_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_1400_param_08_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestFunction_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestFunction_1400_param_08_promise', 0, async function (done) { + console.log("FMS_fuzzTestFunction_1400_param_08_promise getFormsInfoByModule begin"); + + var bundleName = functionTest(); + console.log("FMS_fuzzTestFunction_1400_param_08_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = undefinedTest(); + console.log("FMS_fuzzTestFunction_1400_param_08_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestFunction_1400_param_08_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestFunction_1400_param_08_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestFunction_1400_param_08_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestFunction_1400_param_08_promise==================end'); + }, TIMEOUT) + }) +}) \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestNull.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestNull.test.js new file mode 100644 index 0000000000000000000000000000000000000000..ff7b74e81443f4b148573097cd4a1acc48a8bb07 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestNull.test.js @@ -0,0 +1,1465 @@ +/* + * 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 formManager from '@ohos.ability.formManager' +import {describe, it, expect} from 'deccjsunit/index' +import {stringTest, numberTest, booleanTest, nullTest, undefinedTest, + objectTest, arrayTest, functionTest} from './getParam.js' + +const TIMEOUT = 5000; +describe('FMS_fuzzTestNull', function () { + console.log("FMS_fuzzTestNull===start"); + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_0200 + * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNull_0200_callback', 0, async function (done) { + console.log("FMS_fuzzTestNull_0200_callback deleteForm begin"); + + var formId = nullTest(); + console.log("FMS_fuzzTestNull_0200_callback deleteForm formId typeof:" + typeof(formId)); + + try{ + formManager.deleteForm( + formId, + (err,data) => { + console.log("FMS_fuzzTestNull_0200_callback async::callbak return!!!") + console.log("FMS_fuzzTestNull_0200_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNull_0200_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNull_0200_callback Exception caught:" + e); + expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_0200_callback deleteForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_0200_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_0200 + * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNull_0200_promise', 0, async function (done) { + console.log("FMS_fuzzTestNull_0200_promise deleteForm begin"); + + var formId = nullTest(); + console.log("FMS_fuzzTestNull_0200_promise deleteForm formId typeof:" + typeof(formId)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.deleteForm(formId)); + console.log("FMS_fuzzTestNull_0200_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNull_0200_promise Exception caught:" + e); + expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_0200_promise deleteForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_0200_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNull_0300_param_01_callback', 0, async function (done) { + console.log("FMS_fuzzTestNull_0300_param_01_callback releaseForm begin"); + + var formId = nullTest(); + console.log("FMS_fuzzTestNull_0300_param_01_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = arrayTest(); + console.log("FMS_fuzzTestNull_0300_param_01_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestNull_0300_param_01_callback async::callbak return!!!") + console.log("FMS_fuzzTestNull_0300_param_01_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNull_0300_param_01_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNull_0300_param_01_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_0300_param_01_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_0300_param_01_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNull_0300_param_01_promise', 0, async function (done) { + console.log("FMS_fuzzTestNull_0300_param_01_promise releaseForm begin"); + + var formId = nullTest(); + console.log("FMS_fuzzTestNull_0300_param_01_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = arrayTest(); + console.log("FMS_fuzzTestNull_0300_param_01_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestNull_0300_param_01_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNull_0300_param_01_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_0300_param_01_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_0300_param_01_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNull_0300_param_02_callback', 0, async function (done) { + console.log("FMS_fuzzTestNull_0300_param_02_callback releaseForm begin"); + + var formId = nullTest(); + console.log("FMS_fuzzTestNull_0300_param_02_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = booleanTest(); + console.log("FMS_fuzzTestNull_0300_param_02_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestNull_0300_param_02_callback async::callbak return!!!") + console.log("FMS_fuzzTestNull_0300_param_02_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNull_0300_param_02_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNull_0300_param_02_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_0300_param_02_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_0300_param_02_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNull_0300_param_02_promise', 0, async function (done) { + console.log("FMS_fuzzTestNull_0300_param_02_promise releaseForm begin"); + + var formId = nullTest(); + console.log("FMS_fuzzTestNull_0300_param_02_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = booleanTest(); + console.log("FMS_fuzzTestNull_0300_param_02_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestNull_0300_param_02_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNull_0300_param_02_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_0300_param_02_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_0300_param_02_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNull_0300_param_03_callback', 0, async function (done) { + console.log("FMS_fuzzTestNull_0300_param_03_callback releaseForm begin"); + + var formId = nullTest(); + console.log("FMS_fuzzTestNull_0300_param_03_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = functionTest(); + console.log("FMS_fuzzTestNull_0300_param_03_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestNull_0300_param_03_callback async::callbak return!!!") + console.log("FMS_fuzzTestNull_0300_param_03_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNull_0300_param_03_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNull_0300_param_03_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_0300_param_03_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_0300_param_03_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNull_0300_param_03_promise', 0, async function (done) { + console.log("FMS_fuzzTestNull_0300_param_03_promise releaseForm begin"); + + var formId = nullTest(); + console.log("FMS_fuzzTestNull_0300_param_03_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = functionTest(); + console.log("FMS_fuzzTestNull_0300_param_03_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestNull_0300_param_03_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNull_0300_param_03_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_0300_param_03_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_0300_param_03_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNull_0300_param_04_callback', 0, async function (done) { + console.log("FMS_fuzzTestNull_0300_param_04_callback releaseForm begin"); + + var formId = nullTest(); + console.log("FMS_fuzzTestNull_0300_param_04_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = nullTest(); + console.log("FMS_fuzzTestNull_0300_param_04_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestNull_0300_param_04_callback async::callbak return!!!") + console.log("FMS_fuzzTestNull_0300_param_04_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNull_0300_param_04_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNull_0300_param_04_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_0300_param_04_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_0300_param_04_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNull_0300_param_04_promise', 0, async function (done) { + console.log("FMS_fuzzTestNull_0300_param_04_promise releaseForm begin"); + + var formId = nullTest(); + console.log("FMS_fuzzTestNull_0300_param_04_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = nullTest(); + console.log("FMS_fuzzTestNull_0300_param_04_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestNull_0300_param_04_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNull_0300_param_04_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_0300_param_04_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_0300_param_04_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNull_0300_param_05_callback', 0, async function (done) { + console.log("FMS_fuzzTestNull_0300_param_05_callback releaseForm begin"); + + var formId = nullTest(); + console.log("FMS_fuzzTestNull_0300_param_05_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = numberTest(); + console.log("FMS_fuzzTestNull_0300_param_05_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestNull_0300_param_05_callback async::callbak return!!!") + console.log("FMS_fuzzTestNull_0300_param_05_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNull_0300_param_05_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNull_0300_param_05_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_0300_param_05_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_0300_param_05_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNull_0300_param_05_promise', 0, async function (done) { + console.log("FMS_fuzzTestNull_0300_param_05_promise releaseForm begin"); + + var formId = nullTest(); + console.log("FMS_fuzzTestNull_0300_param_05_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = numberTest(); + console.log("FMS_fuzzTestNull_0300_param_05_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestNull_0300_param_05_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNull_0300_param_05_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_0300_param_05_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_0300_param_05_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNull_0300_param_06_callback', 0, async function (done) { + console.log("FMS_fuzzTestNull_0300_param_06_callback releaseForm begin"); + + var formId = nullTest(); + console.log("FMS_fuzzTestNull_0300_param_06_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = objectTest(); + console.log("FMS_fuzzTestNull_0300_param_06_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestNull_0300_param_06_callback async::callbak return!!!") + console.log("FMS_fuzzTestNull_0300_param_06_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNull_0300_param_06_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNull_0300_param_06_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_0300_param_06_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_0300_param_06_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNull_0300_param_06_promise', 0, async function (done) { + console.log("FMS_fuzzTestNull_0300_param_06_promise releaseForm begin"); + + var formId = nullTest(); + console.log("FMS_fuzzTestNull_0300_param_06_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = objectTest(); + console.log("FMS_fuzzTestNull_0300_param_06_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestNull_0300_param_06_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNull_0300_param_06_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_0300_param_06_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_0300_param_06_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNull_0300_param_07_callback', 0, async function (done) { + console.log("FMS_fuzzTestNull_0300_param_07_callback releaseForm begin"); + + var formId = nullTest(); + console.log("FMS_fuzzTestNull_0300_param_07_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = stringTest(); + console.log("FMS_fuzzTestNull_0300_param_07_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestNull_0300_param_07_callback async::callbak return!!!") + console.log("FMS_fuzzTestNull_0300_param_07_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNull_0300_param_07_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNull_0300_param_07_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_0300_param_07_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_0300_param_07_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNull_0300_param_07_promise', 0, async function (done) { + console.log("FMS_fuzzTestNull_0300_param_07_promise releaseForm begin"); + + var formId = nullTest(); + console.log("FMS_fuzzTestNull_0300_param_07_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = stringTest(); + console.log("FMS_fuzzTestNull_0300_param_07_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestNull_0300_param_07_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNull_0300_param_07_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_0300_param_07_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_0300_param_07_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNull_0300_param_08_callback', 0, async function (done) { + console.log("FMS_fuzzTestNull_0300_param_08_callback releaseForm begin"); + + var formId = nullTest(); + console.log("FMS_fuzzTestNull_0300_param_08_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = undefinedTest(); + console.log("FMS_fuzzTestNull_0300_param_08_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestNull_0300_param_08_callback async::callbak return!!!") + console.log("FMS_fuzzTestNull_0300_param_08_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNull_0300_param_08_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNull_0300_param_08_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_0300_param_08_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_0300_param_08_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNull_0300_param_08_promise', 0, async function (done) { + console.log("FMS_fuzzTestNull_0300_param_08_promise releaseForm begin"); + + var formId = nullTest(); + console.log("FMS_fuzzTestNull_0300_param_08_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = undefinedTest(); + console.log("FMS_fuzzTestNull_0300_param_08_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestNull_0300_param_08_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNull_0300_param_08_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_0300_param_08_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_0300_param_08_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNull_0300_param_09_callback', 0, async function (done) { + console.log("FMS_fuzzTestNull_0300_param_09_callback releaseForm begin"); + + var formId = nullTest(); + console.log("FMS_fuzzTestNull_0300_param_09_callback releaseForm formId typeof:" + + typeof(formId) + ",formId:" + formId); + + try{ + formManager.releaseForm( + formId, + (err,data) => { + console.log("FMS_fuzzTestNull_0300_param_09_callback async::callbak return!!!") + console.log("FMS_fuzzTestNull_0300_param_09_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNull_0300_param_09_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + + ); + } catch (e) { + console.log("FMS_fuzzTestNull_0300_param_09_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_0300_param_09_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_0300_param_09_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNull_0300_param_09_promise', 0, async function (done) { + console.log("FMS_fuzzTestNull_0300_param_09_promise releaseForm begin"); + + var formId = nullTest(); + console.log("FMS_fuzzTestNull_0300_param_09_promise releaseForm formId typeof:" + + typeof(formId) + ",formId:" + formId); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId)); + console.log("FMS_fuzzTestNull_0300_param_09_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNull_0300_param_09_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_0300_param_09_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_0300_param_09_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_1200 + * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNull_1200_callback', 0, async function (done) { + console.log("FMS_fuzzTestNull_1200_callback getAllFormsInfo begin"); + + var testParam = nullTest(); + console.log("FMS_fuzzTestNull_1200_callback getAllFormsInfo formIds typeof:" + typeof(testParam)); + + try{ + formManager.getAllFormsInfo( + testParam, + (err,data) => { + console.log("FMS_fuzzTestNull_1200_callback async::callbak return!!!") + console.log("FMS_fuzzTestNull_1200_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNull_1200_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNull_1200_callback Exception caught:" + e); + expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_1200_callback getAllFormsInfo end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_1200_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_1200 + * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNull_1200_promise', 0, async function (done) { + console.log("FMS_fuzzTestNull_1200_promise getAllFormsInfo begin"); + + var testParam = nullTest(); + console.log("FMS_fuzzTestNull_1200_promise getAllFormsInfo formIds typeof:" + typeof(testParam)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getAllFormsInfo(testParam)); + console.log("FMS_fuzzTestNull_1200_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNull_1200_promise Exception caught:" + e); + expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_1200_promise getAllFormsInfo end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_1200_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_1300 + * @tc.desc Check whether the form configuration information query interface of the specified package + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNull_1300_callback', 0, async function (done) { + console.log("FMS_fuzzTestNull_1300_callback getFormsInfoByApp begin"); + + var bundleName = nullTest(); + console.log("FMS_fuzzTestNull_1300_callback getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); + + try{ + formManager.getFormsInfo( + bundleName, + (err,data) => { + console.log("FMS_fuzzTestNull_1300_callback async::callbak return!!!") + console.log("FMS_fuzzTestNull_1300_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNull_1300_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNull_1300_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_1300_callback getFormsInfoByApp end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_1300_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_1300 + * @tc.desc Check whether the form configuration information query interface of the specified package + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNull_1300_promise', 0, async function (done) { + console.log("FMS_fuzzTestNull_1300_promise getFormsInfoByApp begin"); + + var bundleName = nullTest(); + console.log("FMS_fuzzTestNull_1300_promise getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName)); + console.log("FMS_fuzzTestNull_1300_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNull_1300_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_1300_promise getFormsInfoByApp end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_1300_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNull_1400_param_01_callback', 0, async function (done) { + console.log("FMS_fuzzTestNull_1400_param_01_callback getFormsInfoByModule begin"); + + var bundleName = nullTest(); + console.log("FMS_fuzzTestNull_1400_param_01_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = arrayTest(); + console.log("FMS_fuzzTestNull_1400_param_01_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestNull_1400_param_01_callback async::callbak return!!!") + console.log("FMS_fuzzTestNull_1400_param_01_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNull_1400_param_01_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNull_1400_param_01_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_1400_param_01_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_1400_param_01_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNull_1400_param_01_promise', 0, async function (done) { + console.log("FMS_fuzzTestNull_1400_param_01_promise getFormsInfoByModule begin"); + + var bundleName = nullTest(); + console.log("FMS_fuzzTestNull_1400_param_01_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = arrayTest(); + console.log("FMS_fuzzTestNull_1400_param_01_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestNull_1400_param_01_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNull_1400_param_01_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_1400_param_01_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_1400_param_01_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNull_1400_param_02_callback', 0, async function (done) { + console.log("FMS_fuzzTestNull_1400_param_02_callback getFormsInfoByModule begin"); + + var bundleName = nullTest(); + console.log("FMS_fuzzTestNull_1400_param_02_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = booleanTest(); + console.log("FMS_fuzzTestNull_1400_param_02_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestNull_1400_param_02_callback async::callbak return!!!") + console.log("FMS_fuzzTestNull_1400_param_02_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNull_1400_param_02_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNull_1400_param_02_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_1400_param_02_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_1400_param_02_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNull_1400_param_02_promise', 0, async function (done) { + console.log("FMS_fuzzTestNull_1400_param_02_promise getFormsInfoByModule begin"); + + var bundleName = nullTest(); + console.log("FMS_fuzzTestNull_1400_param_02_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = booleanTest(); + console.log("FMS_fuzzTestNull_1400_param_02_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestNull_1400_param_02_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNull_1400_param_02_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_1400_param_02_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_1400_param_02_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNull_1400_param_03_callback', 0, async function (done) { + console.log("FMS_fuzzTestNull_1400_param_03_callback getFormsInfoByModule begin"); + + var bundleName = nullTest(); + console.log("FMS_fuzzTestNull_1400_param_03_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = functionTest(); + console.log("FMS_fuzzTestNull_1400_param_03_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestNull_1400_param_03_callback async::callbak return!!!") + console.log("FMS_fuzzTestNull_1400_param_03_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNull_1400_param_03_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNull_1400_param_03_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_1400_param_03_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_1400_param_03_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNull_1400_param_03_promise', 0, async function (done) { + console.log("FMS_fuzzTestNull_1400_param_03_promise getFormsInfoByModule begin"); + + var bundleName = nullTest(); + console.log("FMS_fuzzTestNull_1400_param_03_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = functionTest(); + console.log("FMS_fuzzTestNull_1400_param_03_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestNull_1400_param_03_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNull_1400_param_03_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_1400_param_03_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_1400_param_03_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNull_1400_param_04_callback', 0, async function (done) { + console.log("FMS_fuzzTestNull_1400_param_04_callback getFormsInfoByModule begin"); + + var bundleName = nullTest(); + console.log("FMS_fuzzTestNull_1400_param_04_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = nullTest(); + console.log("FMS_fuzzTestNull_1400_param_04_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestNull_1400_param_04_callback async::callbak return!!!") + console.log("FMS_fuzzTestNull_1400_param_04_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNull_1400_param_04_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNull_1400_param_04_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_1400_param_04_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_1400_param_04_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNull_1400_param_04_promise', 0, async function (done) { + console.log("FMS_fuzzTestNull_1400_param_04_promise getFormsInfoByModule begin"); + + var bundleName = nullTest(); + console.log("FMS_fuzzTestNull_1400_param_04_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = nullTest(); + console.log("FMS_fuzzTestNull_1400_param_04_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestNull_1400_param_04_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNull_1400_param_04_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_1400_param_04_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_1400_param_04_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNull_1400_param_05_callback', 0, async function (done) { + console.log("FMS_fuzzTestNull_1400_param_05_callback getFormsInfoByModule begin"); + + var bundleName = nullTest(); + console.log("FMS_fuzzTestNull_1400_param_05_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = numberTest(); + console.log("FMS_fuzzTestNull_1400_param_05_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestNull_1400_param_05_callback async::callbak return!!!") + console.log("FMS_fuzzTestNull_1400_param_05_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNull_1400_param_05_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNull_1400_param_05_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_1400_param_05_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_1400_param_05_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNull_1400_param_05_promise', 0, async function (done) { + console.log("FMS_fuzzTestNull_1400_param_05_promise getFormsInfoByModule begin"); + + var bundleName = nullTest(); + console.log("FMS_fuzzTestNull_1400_param_05_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = numberTest(); + console.log("FMS_fuzzTestNull_1400_param_05_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestNull_1400_param_05_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNull_1400_param_05_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_1400_param_05_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_1400_param_05_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNull_1400_param_06_callback', 0, async function (done) { + console.log("FMS_fuzzTestNull_1400_param_06_callback getFormsInfoByModule begin"); + + var bundleName = nullTest(); + console.log("FMS_fuzzTestNull_1400_param_06_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = objectTest(); + console.log("FMS_fuzzTestNull_1400_param_06_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestNull_1400_param_06_callback async::callbak return!!!") + console.log("FMS_fuzzTestNull_1400_param_06_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNull_1400_param_06_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNull_1400_param_06_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_1400_param_06_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_1400_param_06_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNull_1400_param_06_promise', 0, async function (done) { + console.log("FMS_fuzzTestNull_1400_param_06_promise getFormsInfoByModule begin"); + + var bundleName = nullTest(); + console.log("FMS_fuzzTestNull_1400_param_06_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = objectTest(); + console.log("FMS_fuzzTestNull_1400_param_06_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestNull_1400_param_06_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNull_1400_param_06_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_1400_param_06_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_1400_param_06_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNull_1400_param_07_callback', 0, async function (done) { + console.log("FMS_fuzzTestNull_1400_param_07_callback getFormsInfoByModule begin"); + + var bundleName = nullTest(); + console.log("FMS_fuzzTestNull_1400_param_07_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = stringTest(); + console.log("FMS_fuzzTestNull_1400_param_07_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestNull_1400_param_07_callback async::callbak return!!!") + console.log("FMS_fuzzTestNull_1400_param_07_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNull_1400_param_07_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNull_1400_param_07_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_1400_param_07_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_1400_param_07_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNull_1400_param_07_promise', 0, async function (done) { + console.log("FMS_fuzzTestNull_1400_param_07_promise getFormsInfoByModule begin"); + + var bundleName = nullTest(); + console.log("FMS_fuzzTestNull_1400_param_07_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = stringTest(); + console.log("FMS_fuzzTestNull_1400_param_07_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestNull_1400_param_07_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNull_1400_param_07_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_1400_param_07_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_1400_param_07_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNull_1400_param_08_callback', 0, async function (done) { + console.log("FMS_fuzzTestNull_1400_param_08_callback getFormsInfoByModule begin"); + + var bundleName = nullTest(); + console.log("FMS_fuzzTestNull_1400_param_08_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = undefinedTest(); + console.log("FMS_fuzzTestNull_1400_param_08_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestNull_1400_param_08_callback async::callbak return!!!") + console.log("FMS_fuzzTestNull_1400_param_08_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNull_1400_param_08_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNull_1400_param_08_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_1400_param_08_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_1400_param_08_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNull_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNull_1400_param_08_promise', 0, async function (done) { + console.log("FMS_fuzzTestNull_1400_param_08_promise getFormsInfoByModule begin"); + + var bundleName = nullTest(); + console.log("FMS_fuzzTestNull_1400_param_08_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = undefinedTest(); + console.log("FMS_fuzzTestNull_1400_param_08_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestNull_1400_param_08_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNull_1400_param_08_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNull_1400_param_08_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNull_1400_param_08_promise==================end'); + }, TIMEOUT) + }) +}) \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestNum.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestNum.test.js new file mode 100644 index 0000000000000000000000000000000000000000..ed707b64e04c9b9c49e9f04b9768667a81ce4010 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestNum.test.js @@ -0,0 +1,1465 @@ +/* + * 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 formManager from '@ohos.ability.formManager' +import {describe, it, expect} from 'deccjsunit/index' +import {stringTest, numberTest, booleanTest, nullTest, undefinedTest, + objectTest, arrayTest, functionTest} from './getParam.js' + +const TIMEOUT = 5000; +describe('FMS_fuzzTestNum', function () { + console.log("FMS_fuzzTestNum===start"); + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_0200 + * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNum_0200_callback', 0, async function (done) { + console.log("FMS_fuzzTestNum_0200_callback deleteForm begin"); + + var formId = numberTest(); + console.log("FMS_fuzzTestNum_0200_callback deleteForm formId typeof:" + typeof(formId)); + + try{ + formManager.deleteForm( + formId, + (err,data) => { + console.log("FMS_fuzzTestNum_0200_callback async::callbak return!!!") + console.log("FMS_fuzzTestNum_0200_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNum_0200_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNum_0200_callback Exception caught:" + e); + expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_0200_callback deleteForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_0200_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_0200 + * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNum_0200_promise', 0, async function (done) { + console.log("FMS_fuzzTestNum_0200_promise deleteForm begin"); + + var formId = numberTest(); + console.log("FMS_fuzzTestNum_0200_promise deleteForm formId typeof:" + typeof(formId)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.deleteForm(formId)); + console.log("FMS_fuzzTestNum_0200_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNum_0200_promise Exception caught:" + e); + expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_0200_promise deleteForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_0200_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNum_0300_param_01_callback', 0, async function (done) { + console.log("FMS_fuzzTestNum_0300_param_01_callback releaseForm begin"); + + var formId = numberTest(); + console.log("FMS_fuzzTestNum_0300_param_01_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = arrayTest(); + console.log("FMS_fuzzTestNum_0300_param_01_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestNum_0300_param_01_callback async::callbak return!!!") + console.log("FMS_fuzzTestNum_0300_param_01_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNum_0300_param_01_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNum_0300_param_01_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_0300_param_01_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_0300_param_01_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNum_0300_param_01_promise', 0, async function (done) { + console.log("FMS_fuzzTestNum_0300_param_01_promise releaseForm begin"); + + var formId = numberTest(); + console.log("FMS_fuzzTestNum_0300_param_01_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = arrayTest(); + console.log("FMS_fuzzTestNum_0300_param_01_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestNum_0300_param_01_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNum_0300_param_01_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_0300_param_01_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_0300_param_01_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNum_0300_param_02_callback', 0, async function (done) { + console.log("FMS_fuzzTestNum_0300_param_02_callback releaseForm begin"); + + var formId = numberTest(); + console.log("FMS_fuzzTestNum_0300_param_02_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = booleanTest(); + console.log("FMS_fuzzTestNum_0300_param_02_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestNum_0300_param_02_callback async::callbak return!!!") + console.log("FMS_fuzzTestNum_0300_param_02_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNum_0300_param_02_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNum_0300_param_02_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_0300_param_02_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_0300_param_02_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNum_0300_param_02_promise', 0, async function (done) { + console.log("FMS_fuzzTestNum_0300_param_02_promise releaseForm begin"); + + var formId = numberTest(); + console.log("FMS_fuzzTestNum_0300_param_02_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = booleanTest(); + console.log("FMS_fuzzTestNum_0300_param_02_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestNum_0300_param_02_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNum_0300_param_02_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_0300_param_02_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_0300_param_02_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNum_0300_param_03_callback', 0, async function (done) { + console.log("FMS_fuzzTestNum_0300_param_03_callback releaseForm begin"); + + var formId = numberTest(); + console.log("FMS_fuzzTestNum_0300_param_03_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = functionTest(); + console.log("FMS_fuzzTestNum_0300_param_03_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestNum_0300_param_03_callback async::callbak return!!!") + console.log("FMS_fuzzTestNum_0300_param_03_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNum_0300_param_03_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNum_0300_param_03_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_0300_param_03_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_0300_param_03_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNum_0300_param_03_promise', 0, async function (done) { + console.log("FMS_fuzzTestNum_0300_param_03_promise releaseForm begin"); + + var formId = numberTest(); + console.log("FMS_fuzzTestNum_0300_param_03_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = functionTest(); + console.log("FMS_fuzzTestNum_0300_param_03_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestNum_0300_param_03_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNum_0300_param_03_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_0300_param_03_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_0300_param_03_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNum_0300_param_04_callback', 0, async function (done) { + console.log("FMS_fuzzTestNum_0300_param_04_callback releaseForm begin"); + + var formId = numberTest(); + console.log("FMS_fuzzTestNum_0300_param_04_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = nullTest(); + console.log("FMS_fuzzTestNum_0300_param_04_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestNum_0300_param_04_callback async::callbak return!!!") + console.log("FMS_fuzzTestNum_0300_param_04_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNum_0300_param_04_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNum_0300_param_04_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_0300_param_04_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_0300_param_04_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNum_0300_param_04_promise', 0, async function (done) { + console.log("FMS_fuzzTestNum_0300_param_04_promise releaseForm begin"); + + var formId = numberTest(); + console.log("FMS_fuzzTestNum_0300_param_04_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = nullTest(); + console.log("FMS_fuzzTestNum_0300_param_04_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestNum_0300_param_04_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNum_0300_param_04_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_0300_param_04_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_0300_param_04_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNum_0300_param_05_callback', 0, async function (done) { + console.log("FMS_fuzzTestNum_0300_param_05_callback releaseForm begin"); + + var formId = numberTest(); + console.log("FMS_fuzzTestNum_0300_param_05_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = numberTest(); + console.log("FMS_fuzzTestNum_0300_param_05_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestNum_0300_param_05_callback async::callbak return!!!") + console.log("FMS_fuzzTestNum_0300_param_05_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNum_0300_param_05_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNum_0300_param_05_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_0300_param_05_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_0300_param_05_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNum_0300_param_05_promise', 0, async function (done) { + console.log("FMS_fuzzTestNum_0300_param_05_promise releaseForm begin"); + + var formId = numberTest(); + console.log("FMS_fuzzTestNum_0300_param_05_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = numberTest(); + console.log("FMS_fuzzTestNum_0300_param_05_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestNum_0300_param_05_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNum_0300_param_05_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_0300_param_05_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_0300_param_05_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNum_0300_param_06_callback', 0, async function (done) { + console.log("FMS_fuzzTestNum_0300_param_06_callback releaseForm begin"); + + var formId = numberTest(); + console.log("FMS_fuzzTestNum_0300_param_06_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = objectTest(); + console.log("FMS_fuzzTestNum_0300_param_06_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestNum_0300_param_06_callback async::callbak return!!!") + console.log("FMS_fuzzTestNum_0300_param_06_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNum_0300_param_06_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNum_0300_param_06_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_0300_param_06_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_0300_param_06_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNum_0300_param_06_promise', 0, async function (done) { + console.log("FMS_fuzzTestNum_0300_param_06_promise releaseForm begin"); + + var formId = numberTest(); + console.log("FMS_fuzzTestNum_0300_param_06_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = objectTest(); + console.log("FMS_fuzzTestNum_0300_param_06_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestNum_0300_param_06_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNum_0300_param_06_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_0300_param_06_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_0300_param_06_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNum_0300_param_07_callback', 0, async function (done) { + console.log("FMS_fuzzTestNum_0300_param_07_callback releaseForm begin"); + + var formId = numberTest(); + console.log("FMS_fuzzTestNum_0300_param_07_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = stringTest(); + console.log("FMS_fuzzTestNum_0300_param_07_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestNum_0300_param_07_callback async::callbak return!!!") + console.log("FMS_fuzzTestNum_0300_param_07_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNum_0300_param_07_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNum_0300_param_07_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_0300_param_07_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_0300_param_07_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNum_0300_param_07_promise', 0, async function (done) { + console.log("FMS_fuzzTestNum_0300_param_07_promise releaseForm begin"); + + var formId = numberTest(); + console.log("FMS_fuzzTestNum_0300_param_07_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = stringTest(); + console.log("FMS_fuzzTestNum_0300_param_07_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestNum_0300_param_07_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNum_0300_param_07_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_0300_param_07_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_0300_param_07_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNum_0300_param_08_callback', 0, async function (done) { + console.log("FMS_fuzzTestNum_0300_param_08_callback releaseForm begin"); + + var formId = numberTest(); + console.log("FMS_fuzzTestNum_0300_param_08_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = undefinedTest(); + console.log("FMS_fuzzTestNum_0300_param_08_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestNum_0300_param_08_callback async::callbak return!!!") + console.log("FMS_fuzzTestNum_0300_param_08_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNum_0300_param_08_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNum_0300_param_08_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_0300_param_08_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_0300_param_08_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNum_0300_param_08_promise', 0, async function (done) { + console.log("FMS_fuzzTestNum_0300_param_08_promise releaseForm begin"); + + var formId = numberTest(); + console.log("FMS_fuzzTestNum_0300_param_08_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = undefinedTest(); + console.log("FMS_fuzzTestNum_0300_param_08_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestNum_0300_param_08_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNum_0300_param_08_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_0300_param_08_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_0300_param_08_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNum_0300_param_09_callback', 0, async function (done) { + console.log("FMS_fuzzTestNum_0300_param_09_callback releaseForm begin"); + + var formId = numberTest(); + console.log("FMS_fuzzTestNum_0300_param_09_callback releaseForm formId typeof:" + + typeof(formId) + ",formId:" + formId); + + try{ + formManager.releaseForm( + formId, + (err,data) => { + console.log("FMS_fuzzTestNum_0300_param_09_callback async::callbak return!!!") + console.log("FMS_fuzzTestNum_0300_param_09_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNum_0300_param_09_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + + ); + } catch (e) { + console.log("FMS_fuzzTestNum_0300_param_09_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_0300_param_09_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_0300_param_09_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNum_0300_param_09_promise', 0, async function (done) { + console.log("FMS_fuzzTestNum_0300_param_09_promise releaseForm begin"); + + var formId = numberTest(); + console.log("FMS_fuzzTestNum_0300_param_09_promise releaseForm formId typeof:" + + typeof(formId) + ",formId:" + formId); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId)); + console.log("FMS_fuzzTestNum_0300_param_09_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNum_0300_param_09_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_0300_param_09_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_0300_param_09_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_1200 + * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNum_1200_callback', 0, async function (done) { + console.log("FMS_fuzzTestNum_1200_callback getAllFormsInfo begin"); + + var testParam = numberTest(); + console.log("FMS_fuzzTestNum_1200_callback getAllFormsInfo formIds typeof:" + typeof(testParam)); + + try{ + formManager.getAllFormsInfo( + testParam, + (err,data) => { + console.log("FMS_fuzzTestNum_1200_callback async::callbak return!!!") + console.log("FMS_fuzzTestNum_1200_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNum_1200_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNum_1200_callback Exception caught:" + e); + expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_1200_callback getAllFormsInfo end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_1200_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_1200 + * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNum_1200_promise', 0, async function (done) { + console.log("FMS_fuzzTestNum_1200_promise getAllFormsInfo begin"); + + var testParam = numberTest(); + console.log("FMS_fuzzTestNum_1200_promise getAllFormsInfo formIds typeof:" + typeof(testParam)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getAllFormsInfo(testParam)); + console.log("FMS_fuzzTestNum_1200_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNum_1200_promise Exception caught:" + e); + expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_1200_promise getAllFormsInfo end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_1200_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_1300 + * @tc.desc Check whether the form configuration information query interface of the specified package + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNum_1300_callback', 0, async function (done) { + console.log("FMS_fuzzTestNum_1300_callback getFormsInfoByApp begin"); + + var bundleName = numberTest(); + console.log("FMS_fuzzTestNum_1300_callback getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); + + try{ + formManager.getFormsInfo( + bundleName, + (err,data) => { + console.log("FMS_fuzzTestNum_1300_callback async::callbak return!!!") + console.log("FMS_fuzzTestNum_1300_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNum_1300_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNum_1300_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_1300_callback getFormsInfoByApp end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_1300_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_1300 + * @tc.desc Check whether the form configuration information query interface of the specified package + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNum_1300_promise', 0, async function (done) { + console.log("FMS_fuzzTestNum_1300_promise getFormsInfoByApp begin"); + + var bundleName = numberTest(); + console.log("FMS_fuzzTestNum_1300_promise getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName)); + console.log("FMS_fuzzTestNum_1300_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNum_1300_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_1300_promise getFormsInfoByApp end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_1300_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNum_1400_param_01_callback', 0, async function (done) { + console.log("FMS_fuzzTestNum_1400_param_01_callback getFormsInfoByModule begin"); + + var bundleName = numberTest(); + console.log("FMS_fuzzTestNum_1400_param_01_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = arrayTest(); + console.log("FMS_fuzzTestNum_1400_param_01_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestNum_1400_param_01_callback async::callbak return!!!") + console.log("FMS_fuzzTestNum_1400_param_01_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNum_1400_param_01_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNum_1400_param_01_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_1400_param_01_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_1400_param_01_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNum_1400_param_01_promise', 0, async function (done) { + console.log("FMS_fuzzTestNum_1400_param_01_promise getFormsInfoByModule begin"); + + var bundleName = numberTest(); + console.log("FMS_fuzzTestNum_1400_param_01_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = arrayTest(); + console.log("FMS_fuzzTestNum_1400_param_01_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestNum_1400_param_01_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNum_1400_param_01_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_1400_param_01_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_1400_param_01_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNum_1400_param_02_callback', 0, async function (done) { + console.log("FMS_fuzzTestNum_1400_param_02_callback getFormsInfoByModule begin"); + + var bundleName = numberTest(); + console.log("FMS_fuzzTestNum_1400_param_02_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = booleanTest(); + console.log("FMS_fuzzTestNum_1400_param_02_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestNum_1400_param_02_callback async::callbak return!!!") + console.log("FMS_fuzzTestNum_1400_param_02_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNum_1400_param_02_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNum_1400_param_02_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_1400_param_02_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_1400_param_02_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNum_1400_param_02_promise', 0, async function (done) { + console.log("FMS_fuzzTestNum_1400_param_02_promise getFormsInfoByModule begin"); + + var bundleName = numberTest(); + console.log("FMS_fuzzTestNum_1400_param_02_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = booleanTest(); + console.log("FMS_fuzzTestNum_1400_param_02_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestNum_1400_param_02_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNum_1400_param_02_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_1400_param_02_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_1400_param_02_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNum_1400_param_03_callback', 0, async function (done) { + console.log("FMS_fuzzTestNum_1400_param_03_callback getFormsInfoByModule begin"); + + var bundleName = numberTest(); + console.log("FMS_fuzzTestNum_1400_param_03_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = functionTest(); + console.log("FMS_fuzzTestNum_1400_param_03_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestNum_1400_param_03_callback async::callbak return!!!") + console.log("FMS_fuzzTestNum_1400_param_03_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNum_1400_param_03_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNum_1400_param_03_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_1400_param_03_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_1400_param_03_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNum_1400_param_03_promise', 0, async function (done) { + console.log("FMS_fuzzTestNum_1400_param_03_promise getFormsInfoByModule begin"); + + var bundleName = numberTest(); + console.log("FMS_fuzzTestNum_1400_param_03_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = functionTest(); + console.log("FMS_fuzzTestNum_1400_param_03_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestNum_1400_param_03_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNum_1400_param_03_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_1400_param_03_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_1400_param_03_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNum_1400_param_04_callback', 0, async function (done) { + console.log("FMS_fuzzTestNum_1400_param_04_callback getFormsInfoByModule begin"); + + var bundleName = numberTest(); + console.log("FMS_fuzzTestNum_1400_param_04_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = nullTest(); + console.log("FMS_fuzzTestNum_1400_param_04_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestNum_1400_param_04_callback async::callbak return!!!") + console.log("FMS_fuzzTestNum_1400_param_04_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNum_1400_param_04_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNum_1400_param_04_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_1400_param_04_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_1400_param_04_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNum_1400_param_04_promise', 0, async function (done) { + console.log("FMS_fuzzTestNum_1400_param_04_promise getFormsInfoByModule begin"); + + var bundleName = numberTest(); + console.log("FMS_fuzzTestNum_1400_param_04_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = nullTest(); + console.log("FMS_fuzzTestNum_1400_param_04_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestNum_1400_param_04_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNum_1400_param_04_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_1400_param_04_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_1400_param_04_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNum_1400_param_05_callback', 0, async function (done) { + console.log("FMS_fuzzTestNum_1400_param_05_callback getFormsInfoByModule begin"); + + var bundleName = numberTest(); + console.log("FMS_fuzzTestNum_1400_param_05_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = numberTest(); + console.log("FMS_fuzzTestNum_1400_param_05_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestNum_1400_param_05_callback async::callbak return!!!") + console.log("FMS_fuzzTestNum_1400_param_05_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNum_1400_param_05_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNum_1400_param_05_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_1400_param_05_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_1400_param_05_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNum_1400_param_05_promise', 0, async function (done) { + console.log("FMS_fuzzTestNum_1400_param_05_promise getFormsInfoByModule begin"); + + var bundleName = numberTest(); + console.log("FMS_fuzzTestNum_1400_param_05_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = numberTest(); + console.log("FMS_fuzzTestNum_1400_param_05_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestNum_1400_param_05_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNum_1400_param_05_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_1400_param_05_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_1400_param_05_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNum_1400_param_06_callback', 0, async function (done) { + console.log("FMS_fuzzTestNum_1400_param_06_callback getFormsInfoByModule begin"); + + var bundleName = numberTest(); + console.log("FMS_fuzzTestNum_1400_param_06_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = objectTest(); + console.log("FMS_fuzzTestNum_1400_param_06_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestNum_1400_param_06_callback async::callbak return!!!") + console.log("FMS_fuzzTestNum_1400_param_06_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNum_1400_param_06_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNum_1400_param_06_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_1400_param_06_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_1400_param_06_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNum_1400_param_06_promise', 0, async function (done) { + console.log("FMS_fuzzTestNum_1400_param_06_promise getFormsInfoByModule begin"); + + var bundleName = numberTest(); + console.log("FMS_fuzzTestNum_1400_param_06_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = objectTest(); + console.log("FMS_fuzzTestNum_1400_param_06_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestNum_1400_param_06_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNum_1400_param_06_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_1400_param_06_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_1400_param_06_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNum_1400_param_07_callback', 0, async function (done) { + console.log("FMS_fuzzTestNum_1400_param_07_callback getFormsInfoByModule begin"); + + var bundleName = numberTest(); + console.log("FMS_fuzzTestNum_1400_param_07_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = stringTest(); + console.log("FMS_fuzzTestNum_1400_param_07_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestNum_1400_param_07_callback async::callbak return!!!") + console.log("FMS_fuzzTestNum_1400_param_07_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNum_1400_param_07_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNum_1400_param_07_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_1400_param_07_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_1400_param_07_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNum_1400_param_07_promise', 0, async function (done) { + console.log("FMS_fuzzTestNum_1400_param_07_promise getFormsInfoByModule begin"); + + var bundleName = numberTest(); + console.log("FMS_fuzzTestNum_1400_param_07_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = stringTest(); + console.log("FMS_fuzzTestNum_1400_param_07_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestNum_1400_param_07_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNum_1400_param_07_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_1400_param_07_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_1400_param_07_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestNum_1400_param_08_callback', 0, async function (done) { + console.log("FMS_fuzzTestNum_1400_param_08_callback getFormsInfoByModule begin"); + + var bundleName = numberTest(); + console.log("FMS_fuzzTestNum_1400_param_08_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = undefinedTest(); + console.log("FMS_fuzzTestNum_1400_param_08_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestNum_1400_param_08_callback async::callbak return!!!") + console.log("FMS_fuzzTestNum_1400_param_08_callback async::sucess data:" + data); + console.log("FMS_fuzzTestNum_1400_param_08_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestNum_1400_param_08_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_1400_param_08_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_1400_param_08_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestNum_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestNum_1400_param_08_promise', 0, async function (done) { + console.log("FMS_fuzzTestNum_1400_param_08_promise getFormsInfoByModule begin"); + + var bundleName = numberTest(); + console.log("FMS_fuzzTestNum_1400_param_08_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = undefinedTest(); + console.log("FMS_fuzzTestNum_1400_param_08_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestNum_1400_param_08_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestNum_1400_param_08_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestNum_1400_param_08_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestNum_1400_param_08_promise==================end'); + }, TIMEOUT) + }) +}) \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestObject.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestObject.test.js new file mode 100644 index 0000000000000000000000000000000000000000..572ed4d4ea5be692da80c3322748f925f93688c9 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestObject.test.js @@ -0,0 +1,1465 @@ +/* + * 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 formManager from '@ohos.ability.formManager' +import {describe, it, expect} from 'deccjsunit/index' +import {stringTest, numberTest, booleanTest, nullTest, undefinedTest, + objectTest, arrayTest, functionTest} from './getParam.js' + +const TIMEOUT = 5000; +describe('FMS_fuzzTestObject', function () { + console.log("FMS_fuzzTestObject===start"); + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_0200 + * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestObject_0200_callback', 0, async function (done) { + console.log("FMS_fuzzTestObject_0200_callback deleteForm begin"); + + var formId = objectTest(); + console.log("FMS_fuzzTestObject_0200_callback deleteForm formId typeof:" + typeof(formId)); + + try{ + formManager.deleteForm( + formId, + (err,data) => { + console.log("FMS_fuzzTestObject_0200_callback async::callbak return!!!") + console.log("FMS_fuzzTestObject_0200_callback async::sucess data:" + data); + console.log("FMS_fuzzTestObject_0200_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestObject_0200_callback Exception caught:" + e); + expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_0200_callback deleteForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_0200_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_0200 + * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestObject_0200_promise', 0, async function (done) { + console.log("FMS_fuzzTestObject_0200_promise deleteForm begin"); + + var formId = objectTest(); + console.log("FMS_fuzzTestObject_0200_promise deleteForm formId typeof:" + typeof(formId)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.deleteForm(formId)); + console.log("FMS_fuzzTestObject_0200_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestObject_0200_promise Exception caught:" + e); + expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_0200_promise deleteForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_0200_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestObject_0300_param_01_callback', 0, async function (done) { + console.log("FMS_fuzzTestObject_0300_param_01_callback releaseForm begin"); + + var formId = objectTest(); + console.log("FMS_fuzzTestObject_0300_param_01_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = arrayTest(); + console.log("FMS_fuzzTestObject_0300_param_01_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestObject_0300_param_01_callback async::callbak return!!!") + console.log("FMS_fuzzTestObject_0300_param_01_callback async::sucess data:" + data); + console.log("FMS_fuzzTestObject_0300_param_01_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestObject_0300_param_01_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_0300_param_01_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_0300_param_01_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestObject_0300_param_01_promise', 0, async function (done) { + console.log("FMS_fuzzTestObject_0300_param_01_promise releaseForm begin"); + + var formId = objectTest(); + console.log("FMS_fuzzTestObject_0300_param_01_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = arrayTest(); + console.log("FMS_fuzzTestObject_0300_param_01_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestObject_0300_param_01_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestObject_0300_param_01_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_0300_param_01_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_0300_param_01_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestObject_0300_param_02_callback', 0, async function (done) { + console.log("FMS_fuzzTestObject_0300_param_02_callback releaseForm begin"); + + var formId = objectTest(); + console.log("FMS_fuzzTestObject_0300_param_02_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = booleanTest(); + console.log("FMS_fuzzTestObject_0300_param_02_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestObject_0300_param_02_callback async::callbak return!!!") + console.log("FMS_fuzzTestObject_0300_param_02_callback async::sucess data:" + data); + console.log("FMS_fuzzTestObject_0300_param_02_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestObject_0300_param_02_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_0300_param_02_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_0300_param_02_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestObject_0300_param_02_promise', 0, async function (done) { + console.log("FMS_fuzzTestObject_0300_param_02_promise releaseForm begin"); + + var formId = objectTest(); + console.log("FMS_fuzzTestObject_0300_param_02_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = booleanTest(); + console.log("FMS_fuzzTestObject_0300_param_02_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestObject_0300_param_02_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestObject_0300_param_02_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_0300_param_02_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_0300_param_02_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestObject_0300_param_03_callback', 0, async function (done) { + console.log("FMS_fuzzTestObject_0300_param_03_callback releaseForm begin"); + + var formId = objectTest(); + console.log("FMS_fuzzTestObject_0300_param_03_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = functionTest(); + console.log("FMS_fuzzTestObject_0300_param_03_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestObject_0300_param_03_callback async::callbak return!!!") + console.log("FMS_fuzzTestObject_0300_param_03_callback async::sucess data:" + data); + console.log("FMS_fuzzTestObject_0300_param_03_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestObject_0300_param_03_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_0300_param_03_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_0300_param_03_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestObject_0300_param_03_promise', 0, async function (done) { + console.log("FMS_fuzzTestObject_0300_param_03_promise releaseForm begin"); + + var formId = objectTest(); + console.log("FMS_fuzzTestObject_0300_param_03_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = functionTest(); + console.log("FMS_fuzzTestObject_0300_param_03_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestObject_0300_param_03_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestObject_0300_param_03_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_0300_param_03_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_0300_param_03_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestObject_0300_param_04_callback', 0, async function (done) { + console.log("FMS_fuzzTestObject_0300_param_04_callback releaseForm begin"); + + var formId = objectTest(); + console.log("FMS_fuzzTestObject_0300_param_04_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = nullTest(); + console.log("FMS_fuzzTestObject_0300_param_04_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestObject_0300_param_04_callback async::callbak return!!!") + console.log("FMS_fuzzTestObject_0300_param_04_callback async::sucess data:" + data); + console.log("FMS_fuzzTestObject_0300_param_04_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestObject_0300_param_04_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_0300_param_04_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_0300_param_04_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestObject_0300_param_04_promise', 0, async function (done) { + console.log("FMS_fuzzTestObject_0300_param_04_promise releaseForm begin"); + + var formId = objectTest(); + console.log("FMS_fuzzTestObject_0300_param_04_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = nullTest(); + console.log("FMS_fuzzTestObject_0300_param_04_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestObject_0300_param_04_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestObject_0300_param_04_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_0300_param_04_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_0300_param_04_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestObject_0300_param_05_callback', 0, async function (done) { + console.log("FMS_fuzzTestObject_0300_param_05_callback releaseForm begin"); + + var formId = objectTest(); + console.log("FMS_fuzzTestObject_0300_param_05_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = numberTest(); + console.log("FMS_fuzzTestObject_0300_param_05_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestObject_0300_param_05_callback async::callbak return!!!") + console.log("FMS_fuzzTestObject_0300_param_05_callback async::sucess data:" + data); + console.log("FMS_fuzzTestObject_0300_param_05_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestObject_0300_param_05_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_0300_param_05_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_0300_param_05_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestObject_0300_param_05_promise', 0, async function (done) { + console.log("FMS_fuzzTestObject_0300_param_05_promise releaseForm begin"); + + var formId = objectTest(); + console.log("FMS_fuzzTestObject_0300_param_05_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = numberTest(); + console.log("FMS_fuzzTestObject_0300_param_05_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestObject_0300_param_05_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestObject_0300_param_05_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_0300_param_05_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_0300_param_05_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestObject_0300_param_06_callback', 0, async function (done) { + console.log("FMS_fuzzTestObject_0300_param_06_callback releaseForm begin"); + + var formId = objectTest(); + console.log("FMS_fuzzTestObject_0300_param_06_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = objectTest(); + console.log("FMS_fuzzTestObject_0300_param_06_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestObject_0300_param_06_callback async::callbak return!!!") + console.log("FMS_fuzzTestObject_0300_param_06_callback async::sucess data:" + data); + console.log("FMS_fuzzTestObject_0300_param_06_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestObject_0300_param_06_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_0300_param_06_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_0300_param_06_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestObject_0300_param_06_promise', 0, async function (done) { + console.log("FMS_fuzzTestObject_0300_param_06_promise releaseForm begin"); + + var formId = objectTest(); + console.log("FMS_fuzzTestObject_0300_param_06_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = objectTest(); + console.log("FMS_fuzzTestObject_0300_param_06_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestObject_0300_param_06_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestObject_0300_param_06_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_0300_param_06_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_0300_param_06_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestObject_0300_param_07_callback', 0, async function (done) { + console.log("FMS_fuzzTestObject_0300_param_07_callback releaseForm begin"); + + var formId = objectTest(); + console.log("FMS_fuzzTestObject_0300_param_07_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = stringTest(); + console.log("FMS_fuzzTestObject_0300_param_07_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestObject_0300_param_07_callback async::callbak return!!!") + console.log("FMS_fuzzTestObject_0300_param_07_callback async::sucess data:" + data); + console.log("FMS_fuzzTestObject_0300_param_07_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestObject_0300_param_07_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_0300_param_07_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_0300_param_07_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestObject_0300_param_07_promise', 0, async function (done) { + console.log("FMS_fuzzTestObject_0300_param_07_promise releaseForm begin"); + + var formId = objectTest(); + console.log("FMS_fuzzTestObject_0300_param_07_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = stringTest(); + console.log("FMS_fuzzTestObject_0300_param_07_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestObject_0300_param_07_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestObject_0300_param_07_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_0300_param_07_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_0300_param_07_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestObject_0300_param_08_callback', 0, async function (done) { + console.log("FMS_fuzzTestObject_0300_param_08_callback releaseForm begin"); + + var formId = objectTest(); + console.log("FMS_fuzzTestObject_0300_param_08_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = undefinedTest(); + console.log("FMS_fuzzTestObject_0300_param_08_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestObject_0300_param_08_callback async::callbak return!!!") + console.log("FMS_fuzzTestObject_0300_param_08_callback async::sucess data:" + data); + console.log("FMS_fuzzTestObject_0300_param_08_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestObject_0300_param_08_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_0300_param_08_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_0300_param_08_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestObject_0300_param_08_promise', 0, async function (done) { + console.log("FMS_fuzzTestObject_0300_param_08_promise releaseForm begin"); + + var formId = objectTest(); + console.log("FMS_fuzzTestObject_0300_param_08_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = undefinedTest(); + console.log("FMS_fuzzTestObject_0300_param_08_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestObject_0300_param_08_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestObject_0300_param_08_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_0300_param_08_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_0300_param_08_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestObject_0300_param_09_callback', 0, async function (done) { + console.log("FMS_fuzzTestObject_0300_param_09_callback releaseForm begin"); + + var formId = objectTest(); + console.log("FMS_fuzzTestObject_0300_param_09_callback releaseForm formId typeof:" + + typeof(formId) + ",formId:" + formId); + + try{ + formManager.releaseForm( + formId, + (err,data) => { + console.log("FMS_fuzzTestObject_0300_param_09_callback async::callbak return!!!") + console.log("FMS_fuzzTestObject_0300_param_09_callback async::sucess data:" + data); + console.log("FMS_fuzzTestObject_0300_param_09_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + + ); + } catch (e) { + console.log("FMS_fuzzTestObject_0300_param_09_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_0300_param_09_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_0300_param_09_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestObject_0300_param_09_promise', 0, async function (done) { + console.log("FMS_fuzzTestObject_0300_param_09_promise releaseForm begin"); + + var formId = objectTest(); + console.log("FMS_fuzzTestObject_0300_param_09_promise releaseForm formId typeof:" + + typeof(formId) + ",formId:" + formId); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId)); + console.log("FMS_fuzzTestObject_0300_param_09_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestObject_0300_param_09_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_0300_param_09_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_0300_param_09_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_1200 + * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestObject_1200_callback', 0, async function (done) { + console.log("FMS_fuzzTestObject_1200_callback getAllFormsInfo begin"); + + var testParam = objectTest(); + console.log("FMS_fuzzTestObject_1200_callback getAllFormsInfo formIds typeof:" + typeof(testParam)); + + try{ + formManager.getAllFormsInfo( + testParam, + (err,data) => { + console.log("FMS_fuzzTestObject_1200_callback async::callbak return!!!") + console.log("FMS_fuzzTestObject_1200_callback async::sucess data:" + data); + console.log("FMS_fuzzTestObject_1200_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestObject_1200_callback Exception caught:" + e); + expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_1200_callback getAllFormsInfo end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_1200_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_1200 + * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestObject_1200_promise', 0, async function (done) { + console.log("FMS_fuzzTestObject_1200_promise getAllFormsInfo begin"); + + var testParam = objectTest(); + console.log("FMS_fuzzTestObject_1200_promise getAllFormsInfo formIds typeof:" + typeof(testParam)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getAllFormsInfo(testParam)); + console.log("FMS_fuzzTestObject_1200_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestObject_1200_promise Exception caught:" + e); + expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_1200_promise getAllFormsInfo end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_1200_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_1300 + * @tc.desc Check whether the form configuration information query interface of the specified package + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestObject_1300_callback', 0, async function (done) { + console.log("FMS_fuzzTestObject_1300_callback getFormsInfoByApp begin"); + + var bundleName = objectTest(); + console.log("FMS_fuzzTestObject_1300_callback getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); + + try{ + formManager.getFormsInfo( + bundleName, + (err,data) => { + console.log("FMS_fuzzTestObject_1300_callback async::callbak return!!!") + console.log("FMS_fuzzTestObject_1300_callback async::sucess data:" + data); + console.log("FMS_fuzzTestObject_1300_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestObject_1300_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_1300_callback getFormsInfoByApp end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_1300_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_1300 + * @tc.desc Check whether the form configuration information query interface of the specified package + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestObject_1300_promise', 0, async function (done) { + console.log("FMS_fuzzTestObject_1300_promise getFormsInfoByApp begin"); + + var bundleName = objectTest(); + console.log("FMS_fuzzTestObject_1300_promise getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName)); + console.log("FMS_fuzzTestObject_1300_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestObject_1300_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_1300_promise getFormsInfoByApp end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_1300_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestObject_1400_param_01_callback', 0, async function (done) { + console.log("FMS_fuzzTestObject_1400_param_01_callback getFormsInfoByModule begin"); + + var bundleName = objectTest(); + console.log("FMS_fuzzTestObject_1400_param_01_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = arrayTest(); + console.log("FMS_fuzzTestObject_1400_param_01_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestObject_1400_param_01_callback async::callbak return!!!") + console.log("FMS_fuzzTestObject_1400_param_01_callback async::sucess data:" + data); + console.log("FMS_fuzzTestObject_1400_param_01_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestObject_1400_param_01_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_1400_param_01_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_1400_param_01_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestObject_1400_param_01_promise', 0, async function (done) { + console.log("FMS_fuzzTestObject_1400_param_01_promise getFormsInfoByModule begin"); + + var bundleName = objectTest(); + console.log("FMS_fuzzTestObject_1400_param_01_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = arrayTest(); + console.log("FMS_fuzzTestObject_1400_param_01_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestObject_1400_param_01_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestObject_1400_param_01_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_1400_param_01_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_1400_param_01_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestObject_1400_param_02_callback', 0, async function (done) { + console.log("FMS_fuzzTestObject_1400_param_02_callback getFormsInfoByModule begin"); + + var bundleName = objectTest(); + console.log("FMS_fuzzTestObject_1400_param_02_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = booleanTest(); + console.log("FMS_fuzzTestObject_1400_param_02_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestObject_1400_param_02_callback async::callbak return!!!") + console.log("FMS_fuzzTestObject_1400_param_02_callback async::sucess data:" + data); + console.log("FMS_fuzzTestObject_1400_param_02_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestObject_1400_param_02_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_1400_param_02_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_1400_param_02_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestObject_1400_param_02_promise', 0, async function (done) { + console.log("FMS_fuzzTestObject_1400_param_02_promise getFormsInfoByModule begin"); + + var bundleName = objectTest(); + console.log("FMS_fuzzTestObject_1400_param_02_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = booleanTest(); + console.log("FMS_fuzzTestObject_1400_param_02_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestObject_1400_param_02_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestObject_1400_param_02_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_1400_param_02_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_1400_param_02_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestObject_1400_param_03_callback', 0, async function (done) { + console.log("FMS_fuzzTestObject_1400_param_03_callback getFormsInfoByModule begin"); + + var bundleName = objectTest(); + console.log("FMS_fuzzTestObject_1400_param_03_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = functionTest(); + console.log("FMS_fuzzTestObject_1400_param_03_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestObject_1400_param_03_callback async::callbak return!!!") + console.log("FMS_fuzzTestObject_1400_param_03_callback async::sucess data:" + data); + console.log("FMS_fuzzTestObject_1400_param_03_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestObject_1400_param_03_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_1400_param_03_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_1400_param_03_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestObject_1400_param_03_promise', 0, async function (done) { + console.log("FMS_fuzzTestObject_1400_param_03_promise getFormsInfoByModule begin"); + + var bundleName = objectTest(); + console.log("FMS_fuzzTestObject_1400_param_03_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = functionTest(); + console.log("FMS_fuzzTestObject_1400_param_03_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestObject_1400_param_03_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestObject_1400_param_03_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_1400_param_03_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_1400_param_03_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestObject_1400_param_04_callback', 0, async function (done) { + console.log("FMS_fuzzTestObject_1400_param_04_callback getFormsInfoByModule begin"); + + var bundleName = objectTest(); + console.log("FMS_fuzzTestObject_1400_param_04_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = nullTest(); + console.log("FMS_fuzzTestObject_1400_param_04_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestObject_1400_param_04_callback async::callbak return!!!") + console.log("FMS_fuzzTestObject_1400_param_04_callback async::sucess data:" + data); + console.log("FMS_fuzzTestObject_1400_param_04_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestObject_1400_param_04_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_1400_param_04_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_1400_param_04_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestObject_1400_param_04_promise', 0, async function (done) { + console.log("FMS_fuzzTestObject_1400_param_04_promise getFormsInfoByModule begin"); + + var bundleName = objectTest(); + console.log("FMS_fuzzTestObject_1400_param_04_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = nullTest(); + console.log("FMS_fuzzTestObject_1400_param_04_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestObject_1400_param_04_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestObject_1400_param_04_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_1400_param_04_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_1400_param_04_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestObject_1400_param_05_callback', 0, async function (done) { + console.log("FMS_fuzzTestObject_1400_param_05_callback getFormsInfoByModule begin"); + + var bundleName = objectTest(); + console.log("FMS_fuzzTestObject_1400_param_05_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = numberTest(); + console.log("FMS_fuzzTestObject_1400_param_05_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestObject_1400_param_05_callback async::callbak return!!!") + console.log("FMS_fuzzTestObject_1400_param_05_callback async::sucess data:" + data); + console.log("FMS_fuzzTestObject_1400_param_05_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestObject_1400_param_05_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_1400_param_05_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_1400_param_05_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestObject_1400_param_05_promise', 0, async function (done) { + console.log("FMS_fuzzTestObject_1400_param_05_promise getFormsInfoByModule begin"); + + var bundleName = objectTest(); + console.log("FMS_fuzzTestObject_1400_param_05_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = numberTest(); + console.log("FMS_fuzzTestObject_1400_param_05_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestObject_1400_param_05_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestObject_1400_param_05_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_1400_param_05_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_1400_param_05_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestObject_1400_param_06_callback', 0, async function (done) { + console.log("FMS_fuzzTestObject_1400_param_06_callback getFormsInfoByModule begin"); + + var bundleName = objectTest(); + console.log("FMS_fuzzTestObject_1400_param_06_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = objectTest(); + console.log("FMS_fuzzTestObject_1400_param_06_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestObject_1400_param_06_callback async::callbak return!!!") + console.log("FMS_fuzzTestObject_1400_param_06_callback async::sucess data:" + data); + console.log("FMS_fuzzTestObject_1400_param_06_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestObject_1400_param_06_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_1400_param_06_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_1400_param_06_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestObject_1400_param_06_promise', 0, async function (done) { + console.log("FMS_fuzzTestObject_1400_param_06_promise getFormsInfoByModule begin"); + + var bundleName = objectTest(); + console.log("FMS_fuzzTestObject_1400_param_06_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = objectTest(); + console.log("FMS_fuzzTestObject_1400_param_06_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestObject_1400_param_06_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestObject_1400_param_06_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_1400_param_06_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_1400_param_06_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestObject_1400_param_07_callback', 0, async function (done) { + console.log("FMS_fuzzTestObject_1400_param_07_callback getFormsInfoByModule begin"); + + var bundleName = objectTest(); + console.log("FMS_fuzzTestObject_1400_param_07_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = stringTest(); + console.log("FMS_fuzzTestObject_1400_param_07_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestObject_1400_param_07_callback async::callbak return!!!") + console.log("FMS_fuzzTestObject_1400_param_07_callback async::sucess data:" + data); + console.log("FMS_fuzzTestObject_1400_param_07_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestObject_1400_param_07_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_1400_param_07_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_1400_param_07_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestObject_1400_param_07_promise', 0, async function (done) { + console.log("FMS_fuzzTestObject_1400_param_07_promise getFormsInfoByModule begin"); + + var bundleName = objectTest(); + console.log("FMS_fuzzTestObject_1400_param_07_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = stringTest(); + console.log("FMS_fuzzTestObject_1400_param_07_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestObject_1400_param_07_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestObject_1400_param_07_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_1400_param_07_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_1400_param_07_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestObject_1400_param_08_callback', 0, async function (done) { + console.log("FMS_fuzzTestObject_1400_param_08_callback getFormsInfoByModule begin"); + + var bundleName = objectTest(); + console.log("FMS_fuzzTestObject_1400_param_08_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = undefinedTest(); + console.log("FMS_fuzzTestObject_1400_param_08_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestObject_1400_param_08_callback async::callbak return!!!") + console.log("FMS_fuzzTestObject_1400_param_08_callback async::sucess data:" + data); + console.log("FMS_fuzzTestObject_1400_param_08_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestObject_1400_param_08_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_1400_param_08_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_1400_param_08_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestObject_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestObject_1400_param_08_promise', 0, async function (done) { + console.log("FMS_fuzzTestObject_1400_param_08_promise getFormsInfoByModule begin"); + + var bundleName = objectTest(); + console.log("FMS_fuzzTestObject_1400_param_08_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = undefinedTest(); + console.log("FMS_fuzzTestObject_1400_param_08_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestObject_1400_param_08_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestObject_1400_param_08_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestObject_1400_param_08_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestObject_1400_param_08_promise==================end'); + }, TIMEOUT) + }) +}) \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestString.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestString.test.js new file mode 100644 index 0000000000000000000000000000000000000000..1bc192746f1755068d8faa34f047748167f4cce2 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestString.test.js @@ -0,0 +1,1625 @@ +/* + * 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 formManager from '@ohos.ability.formManager' +import {describe, it, expect} from 'deccjsunit/index' +import {stringTest, numberTest, booleanTest, nullTest, undefinedTest, + objectTest, arrayTest, functionTest} from './getParam.js' + +const TIMEOUT = 5000; +describe('FMS_FuzzTest', function () { + console.log("FMS_FuzzTest===start"); + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0200 + * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestString_0200_param_01_callback', 0, async function (done) { + console.log("FMS_fuzzTestString_0200_param_01_callback deleteForm begin"); + + var formId = stringTest(); + console.log("FMS_fuzzTestString_0200_param_01_callback deleteForm formId typeof:" + typeof(formId)); + + try{ + formManager.deleteForm( + formId, + (err,data) => { + console.log("FMS_fuzzTestString_0200_param_01_callback async::callbak return!!!") + console.log("FMS_fuzzTestString_0200_param_01_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_0200_param_01_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestString_0200_param_01_callback Exception caught:" + e); + expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_0200_param_01_callback deleteForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0200_param_01_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0200 + * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestString_0200_param_01_promise', 0, async function (done) { + console.log("FMS_fuzzTestString_0200_param_01_promise deleteForm begin"); + + var formId = stringTest(); + console.log("FMS_fuzzTestString_0200_param_01_promise deleteForm formId typeof:" + typeof(formId)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.deleteForm(formId)); + console.log("FMS_fuzzTestString_0200_param_01_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestString_0200_param_01_promise Exception caught:" + e); + expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_0200_param_01_promise deleteForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0200_param_01_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0200 + * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestString_0200_param_02_callback', 0, async function (done) { + console.log("FMS_fuzzTestString_0200_param_02_callback deleteForm begin"); + + var formId = numberTest() + ""; + console.log("FMS_fuzzTestString_0200_param_02_callback deleteForm formId typeof:" + + typeof(formId) + ",formId:" + formId); + + formManager.deleteForm( + formId, + (err,data) => { + console.log("FMS_fuzzTestString_0200_param_02_callback async::callbak return!!!") + console.log("FMS_fuzzTestString_0200_param_02_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_0200_param_02_callback async::error err:" + err); + expect(err).assertEqual(0); + done(); + } + ); + + console.log("FMS_fuzzTestString_0200_param_02_callback deleteForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0200_param_02_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0200 + * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestString_0200_param_02_promise', 0, async function (done) { + console.log("FMS_fuzzTestString_0200_param_02_promise deleteForm begin"); + + var formId = numberTest() + ""; + console.log("FMS_fuzzTestString_0200_param_02_promise deleteForm formId typeof:" + + typeof(formId) + ",formId:" + formId); + + formManager.deleteForm(formId).then((err) => { + console.log("FMS_fuzzTestString_0200_param_02_promise async::sucess err:" + err); + expect(err).assertEqual(0); + console.log("FMS_fuzzTestString_0200_param_02_promise deleteForm end"); + done(); + }); + + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0200_param_02_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestString_0300_param_01_callback', 0, async function (done) { + console.log("FMS_fuzzTestString_0300_param_01_callback releaseForm begin"); + + var formId = stringTest(); + console.log("FMS_fuzzTestString_0300_param_01_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = arrayTest(); + console.log("FMS_fuzzTestString_0300_param_01_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestString_0300_param_01_callback async::callbak return!!!") + console.log("FMS_fuzzTestString_0300_param_01_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_0300_param_01_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestString_0300_param_01_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_0300_param_01_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0300_param_01_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestString_0300_param_01_promise', 0, async function (done) { + console.log("FMS_fuzzTestString_0300_param_01_promise releaseForm begin"); + + var formId = stringTest(); + console.log("FMS_fuzzTestString_0300_param_01_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = arrayTest(); + console.log("FMS_fuzzTestString_0300_param_01_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestString_0300_param_01_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestString_0300_param_01_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_0300_param_01_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0300_param_01_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestString_0300_param_02_callback', 0, async function (done) { + console.log("FMS_fuzzTestString_0300_param_02_callback releaseForm begin"); + + var formId = stringTest(); + console.log("FMS_fuzzTestString_0300_param_02_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = booleanTest(); + console.log("FMS_fuzzTestString_0300_param_02_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestString_0300_param_02_callback async::callbak return!!!") + console.log("FMS_fuzzTestString_0300_param_02_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_0300_param_02_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestString_0300_param_02_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_0300_param_02_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0300_param_02_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestString_0300_param_02_promise', 0, async function (done) { + console.log("FMS_fuzzTestString_0300_param_02_promise releaseForm begin"); + + var formId = stringTest(); + console.log("FMS_fuzzTestString_0300_param_02_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = booleanTest(); + console.log("FMS_fuzzTestString_0300_param_02_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestString_0300_param_02_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestString_0300_param_02_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_0300_param_02_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0300_param_02_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestString_0300_param_03_callback', 0, async function (done) { + console.log("FMS_fuzzTestString_0300_param_03_callback releaseForm begin"); + + var formId = stringTest(); + console.log("FMS_fuzzTestString_0300_param_03_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = functionTest(); + console.log("FMS_fuzzTestString_0300_param_03_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestString_0300_param_03_callback async::callbak return!!!") + console.log("FMS_fuzzTestString_0300_param_03_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_0300_param_03_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestString_0300_param_03_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_0300_param_03_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0300_param_03_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestString_0300_param_03_promise', 0, async function (done) { + console.log("FMS_fuzzTestString_0300_param_03_promise releaseForm begin"); + + var formId = stringTest(); + console.log("FMS_fuzzTestString_0300_param_03_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = functionTest(); + console.log("FMS_fuzzTestString_0300_param_03_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestString_0300_param_03_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestString_0300_param_03_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_0300_param_03_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0300_param_03_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestString_0300_param_04_callback', 0, async function (done) { + console.log("FMS_fuzzTestString_0300_param_04_callback releaseForm begin"); + + var formId = stringTest(); + console.log("FMS_fuzzTestString_0300_param_04_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = nullTest(); + console.log("FMS_fuzzTestString_0300_param_04_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestString_0300_param_04_callback async::callbak return!!!") + console.log("FMS_fuzzTestString_0300_param_04_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_0300_param_04_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestString_0300_param_04_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_0300_param_04_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0300_param_04_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestString_0300_param_04_promise', 0, async function (done) { + console.log("FMS_fuzzTestString_0300_param_04_promise releaseForm begin"); + + var formId = stringTest(); + console.log("FMS_fuzzTestString_0300_param_04_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = nullTest(); + console.log("FMS_fuzzTestString_0300_param_04_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestString_0300_param_04_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestString_0300_param_04_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_0300_param_04_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0300_param_04_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestString_0300_param_05_callback', 0, async function (done) { + console.log("FMS_fuzzTestString_0300_param_05_callback releaseForm begin"); + + var formId = stringTest(); + console.log("FMS_fuzzTestString_0300_param_05_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = numberTest(); + console.log("FMS_fuzzTestString_0300_param_05_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestString_0300_param_05_callback async::callbak return!!!") + console.log("FMS_fuzzTestString_0300_param_05_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_0300_param_05_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestString_0300_param_05_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_0300_param_05_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0300_param_05_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestString_0300_param_05_promise', 0, async function (done) { + console.log("FMS_fuzzTestString_0300_param_05_promise releaseForm begin"); + + var formId = stringTest(); + console.log("FMS_fuzzTestString_0300_param_05_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = numberTest(); + console.log("FMS_fuzzTestString_0300_param_05_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestString_0300_param_05_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestString_0300_param_05_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_0300_param_05_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0300_param_05_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestString_0300_param_06_callback', 0, async function (done) { + console.log("FMS_fuzzTestString_0300_param_06_callback releaseForm begin"); + + var formId = stringTest(); + console.log("FMS_fuzzTestString_0300_param_06_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = objectTest(); + console.log("FMS_fuzzTestString_0300_param_06_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestString_0300_param_06_callback async::callbak return!!!") + console.log("FMS_fuzzTestString_0300_param_06_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_0300_param_06_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestString_0300_param_06_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_0300_param_06_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0300_param_06_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestString_0300_param_06_promise', 0, async function (done) { + console.log("FMS_fuzzTestString_0300_param_06_promise releaseForm begin"); + + var formId = stringTest(); + console.log("FMS_fuzzTestString_0300_param_06_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = objectTest(); + console.log("FMS_fuzzTestString_0300_param_06_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestString_0300_param_06_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestString_0300_param_06_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_0300_param_06_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0300_param_06_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestString_0300_param_07_callback', 0, async function (done) { + console.log("FMS_fuzzTestString_0300_param_07_callback releaseForm begin"); + + var formId = stringTest(); + console.log("FMS_fuzzTestString_0300_param_07_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = stringTest(); + console.log("FMS_fuzzTestString_0300_param_07_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestString_0300_param_07_callback async::callbak return!!!") + console.log("FMS_fuzzTestString_0300_param_07_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_0300_param_07_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestString_0300_param_07_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_0300_param_07_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0300_param_07_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestString_0300_param_07_promise', 0, async function (done) { + console.log("FMS_fuzzTestString_0300_param_07_promise releaseForm begin"); + + var formId = stringTest(); + console.log("FMS_fuzzTestString_0300_param_07_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = stringTest(); + console.log("FMS_fuzzTestString_0300_param_07_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestString_0300_param_07_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestString_0300_param_07_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_0300_param_07_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0300_param_07_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestString_0300_param_08_callback', 0, async function (done) { + console.log("FMS_fuzzTestString_0300_param_08_callback releaseForm begin"); + + var formId = stringTest(); + console.log("FMS_fuzzTestString_0300_param_08_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = undefinedTest(); + console.log("FMS_fuzzTestString_0300_param_08_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestString_0300_param_08_callback async::callbak return!!!") + console.log("FMS_fuzzTestString_0300_param_08_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_0300_param_08_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestString_0300_param_08_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_0300_param_08_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0300_param_08_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestString_0300_param_08_promise', 0, async function (done) { + console.log("FMS_fuzzTestString_0300_param_08_promise releaseForm begin"); + + var formId = stringTest(); + console.log("FMS_fuzzTestString_0300_param_08_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = undefinedTest(); + console.log("FMS_fuzzTestString_0300_param_08_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestString_0300_param_08_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestString_0300_param_08_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_0300_param_08_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0300_param_08_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestString_0300_param_09_callback', 0, async function (done) { + console.log("FMS_fuzzTestString_0300_param_09_callback releaseForm begin"); + + var formId = stringTest(); + console.log("FMS_fuzzTestString_0300_param_09_callback releaseForm formId typeof:" + + typeof(formId) + ",formId:" + formId); + + try{ + formManager.releaseForm( + formId, + (err,data) => { + console.log("FMS_fuzzTestString_0300_param_09_callback async::callbak return!!!") + console.log("FMS_fuzzTestString_0300_param_09_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_0300_param_09_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + + ); + } catch (e) { + console.log("FMS_fuzzTestString_0300_param_09_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_0300_param_09_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0300_param_09_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestString_0300_param_09_promise', 0, async function (done) { + console.log("FMS_fuzzTestString_0300_param_09_promise releaseForm begin"); + + var formId = stringTest(); + console.log("FMS_fuzzTestString_0300_param_09_promise releaseForm formId typeof:" + + typeof(formId) + ",formId:" + formId); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId)); + console.log("FMS_fuzzTestString_0300_param_09_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestString_0300_param_09_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_0300_param_09_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0300_param_09_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestString_0300_param_10_callback', 0, async function (done) { + console.log("FMS_fuzzTestString_0300_param_10_callback releaseForm begin"); + + var formId = numberTest() + ""; + console.log("FMS_fuzzTestString_0300_param_10_callback releaseForm formId typeof:" + + typeof(formId) + ",formId:" + formId); + + formManager.releaseForm( + formId, + (err,data) => { + console.log("FMS_fuzzTestString_0300_param_10_callback async::callbak return!!!") + console.log("FMS_fuzzTestString_0300_param_10_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_0300_param_10_callback async::error err:" + err); + expect(err).assertEqual(0); + done(); + } + ); + + console.log("FMS_fuzzTestString_0300_param_10_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0300_param_10_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestString_0300_param_10_promise', 0, async function (done) { + console.log("FMS_fuzzTestString_0300_param_10_promise releaseForm begin"); + + var formId = numberTest() + ""; + console.log("FMS_fuzzTestString_0300_param_10_promise releaseForm formId typeof:" + + typeof(formId) + ",formId:" + formId); + + formManager.releaseForm(formId).then((err) => { + console.log("FMS_fuzzTestString_0300_param_10_promise async::sucess err:" + err); + expect(err).assertEqual(0); + console.log("FMS_fuzzTestString_0300_param_10_promise deleteForm end"); + done(); + }); + + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0300_param_10_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestString_0300_param_11_callback', 0, async function (done) { + console.log("FMS_fuzzTestString_0300_param_11_callback releaseForm begin"); + + var formId = numberTest() + ""; + console.log("FMS_fuzzTestString_0300_param_11_callback releaseForm formId typeof:" + + typeof(formId) + ",formId:" + formId); + + var isReleaseCache = booleanTest(); + console.log("FMS_fuzzTestString_0300_param_011_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestString_0300_param_011_callback async::callbak return!!!") + console.log("FMS_fuzzTestString_0300_param_011_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_0300_param_011_callback async::error err:" + err); + expect(err).assertEqual(0); + done(); + } + ); + + console.log("FMS_fuzzTestString_0300_param_011_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0300_param_011_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestString_0300_param_11_promise', 0, async function (done) { + console.log("FMS_fuzzTestString_0300_param_11_promise releaseForm begin"); + + var formId = numberTest() + ""; + console.log("FMS_fuzzTestString_0300_param_11_promise releaseForm formId typeof:" + + typeof(formId) + ",formId:" + formId); + + var isReleaseCache = booleanTest(); + console.log("FMS_fuzzTestString_0300_param_11_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + formManager.releaseForm(formId, isReleaseCache).then((err) => { + console.log("FMS_fuzzTestString_0300_param_11_promise async::sucess err:" + err); + expect(err).assertEqual(0); + console.log("FMS_fuzzTestString_0300_param_11_promise deleteForm end"); + done(); + }); + + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_0300_param_11_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_1200 + * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestString_1200_callback', 0, async function (done) { + console.log("FMS_fuzzTestString_1200_callback getAllFormsInfo begin"); + + var testParam = stringTest(); + console.log("FMS_fuzzTestString_1200_callback getAllFormsInfo formIds typeof:" + typeof(testParam)); + + try{ + formManager.getAllFormsInfo( + testParam, + (err,data) => { + console.log("FMS_fuzzTestString_1200_callback async::callbak return!!!") + console.log("FMS_fuzzTestString_1200_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_1200_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestString_1200_callback Exception caught:" + e); + expect(0).assertEqual(0); + } + + console.log("FMS_fuzzTestString_1200_callback getAllFormsInfo end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_1200_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_1200 + * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestString_1200_promise', 0, async function (done) { + console.log("FMS_fuzzTestString_1200_promise getAllFormsInfo begin"); + + var testParam = stringTest(); + console.log("FMS_fuzzTestString_1200_promise getAllFormsInfo formIds typeof:" + typeof(testParam)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getAllFormsInfo(testParam)); + console.log("FMS_fuzzTestString_1200_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestString_1200_promise Exception caught:" + e); + expect(0).assertEqual(0); + } + + console.log("FMS_fuzzTestString_1200_promise getAllFormsInfo end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_1200_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_1300 + * @tc.desc Check whether the form configuration information query interface of the specified package + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestString_1300_callback', 0, async function (done) { + console.log("FMS_fuzzTestString_1300_callback getFormsInfoByApp begin"); + + var bundleName = stringTest(); + console.log("FMS_fuzzTestString_1300_callback getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); + + try{ + formManager.getFormsInfo( + bundleName, + (err,data) => { + console.log("FMS_fuzzTestString_1300_callback async::callbak return!!!") + console.log("FMS_fuzzTestString_1300_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_1300_callback async::error err:" + err); + expect(err).assertEqual(0); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestString_1300_callback Exception caught:" + e); + expect(0).assertEqual(0); + } + + console.log("FMS_fuzzTestString_1300_callback getFormsInfoByApp end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_1300_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_1300 + * @tc.desc Check whether the form configuration information query interface of the specified package + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestString_1300_promise', 0, async function (done) { + console.log("FMS_fuzzTestString_1300_promise getFormsInfoByApp begin"); + + var bundleName = stringTest(); + console.log("FMS_fuzzTestString_1300_promise getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName)); + console.log("FMS_fuzzTestString_1300_promise async::sucess retResult:" + retResult); + expect(retResult).assertEqual(0); + done(); + } catch (e) { + console.log("FMS_fuzzTestString_1300_promise Exception caught:" + e); + expect(0).assertEqual(0); + } + + console.log("FMS_fuzzTestString_1300_promise getFormsInfoByApp end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_1300_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestString_1400_param_01_callback', 0, async function (done) { + console.log("FMS_fuzzTestString_1400_param_01_callback getFormsInfoByModule begin"); + + var bundleName = stringTest(); + console.log("FMS_fuzzTestString_1400_param_01_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = arrayTest(); + console.log("FMS_fuzzTestString_1400_param_01_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestString_1400_param_01_callback async::callbak return!!!") + console.log("FMS_fuzzTestString_1400_param_01_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_1400_param_01_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestString_1400_param_01_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_1400_param_01_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_1400_param_01_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestString_1400_param_01_promise', 0, async function (done) { + console.log("FMS_fuzzTestString_1400_param_01_promise getFormsInfoByModule begin"); + + var bundleName = stringTest(); + console.log("FMS_fuzzTestString_1400_param_01_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = arrayTest(); + console.log("FMS_fuzzTestString_1400_param_01_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestString_1400_param_01_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestString_1400_param_01_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_1400_param_01_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_1400_param_01_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestString_1400_param_02_callback', 0, async function (done) { + console.log("FMS_fuzzTestString_1400_param_02_callback getFormsInfoByModule begin"); + + var bundleName = stringTest(); + console.log("FMS_fuzzTestString_1400_param_02_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = booleanTest(); + console.log("FMS_fuzzTestString_1400_param_02_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestString_1400_param_02_callback async::callbak return!!!") + console.log("FMS_fuzzTestString_1400_param_02_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_1400_param_02_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestString_1400_param_02_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_1400_param_02_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_1400_param_02_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestString_1400_param_02_promise', 0, async function (done) { + console.log("FMS_fuzzTestString_1400_param_02_promise getFormsInfoByModule begin"); + + var bundleName = stringTest(); + console.log("FMS_fuzzTestString_1400_param_02_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = booleanTest(); + console.log("FMS_fuzzTestString_1400_param_02_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestString_1400_param_02_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestString_1400_param_02_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_1400_param_02_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_1400_param_02_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestString_1400_param_03_callback', 0, async function (done) { + console.log("FMS_fuzzTestString_1400_param_03_callback getFormsInfoByModule begin"); + + var bundleName = stringTest(); + console.log("FMS_fuzzTestString_1400_param_03_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = functionTest(); + console.log("FMS_fuzzTestString_1400_param_03_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestString_1400_param_03_callback async::callbak return!!!") + console.log("FMS_fuzzTestString_1400_param_03_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_1400_param_03_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestString_1400_param_03_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_1400_param_03_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_1400_param_03_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestString_1400_param_03_promise', 0, async function (done) { + console.log("FMS_fuzzTestString_1400_param_03_promise getFormsInfoByModule begin"); + + var bundleName = stringTest(); + console.log("FMS_fuzzTestString_1400_param_03_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = functionTest(); + console.log("FMS_fuzzTestString_1400_param_03_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestString_1400_param_03_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestString_1400_param_03_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_1400_param_03_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_1400_param_03_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestString_1400_param_04_callback', 0, async function (done) { + console.log("FMS_fuzzTestString_1400_param_04_callback getFormsInfoByModule begin"); + + var bundleName = stringTest(); + console.log("FMS_fuzzTestString_1400_param_04_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = nullTest(); + console.log("FMS_fuzzTestString_1400_param_04_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestString_1400_param_04_callback async::callbak return!!!") + console.log("FMS_fuzzTestString_1400_param_04_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_1400_param_04_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestString_1400_param_04_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_1400_param_04_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_1400_param_04_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestString_1400_param_04_promise', 0, async function (done) { + console.log("FMS_fuzzTestString_1400_param_04_promise getFormsInfoByModule begin"); + + var bundleName = stringTest(); + console.log("FMS_fuzzTestString_1400_param_04_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = nullTest(); + console.log("FMS_fuzzTestString_1400_param_04_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestString_1400_param_04_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestString_1400_param_04_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_1400_param_04_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_1400_param_04_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestString_1400_param_05_callback', 0, async function (done) { + console.log("FMS_fuzzTestString_1400_param_05_callback getFormsInfoByModule begin"); + + var bundleName = stringTest(); + console.log("FMS_fuzzTestString_1400_param_05_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = numberTest(); + console.log("FMS_fuzzTestString_1400_param_05_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestString_1400_param_05_callback async::callbak return!!!") + console.log("FMS_fuzzTestString_1400_param_05_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_1400_param_05_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestString_1400_param_05_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_1400_param_05_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_1400_param_05_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestString_1400_param_05_promise', 0, async function (done) { + console.log("FMS_fuzzTestString_1400_param_05_promise getFormsInfoByModule begin"); + + var bundleName = stringTest(); + console.log("FMS_fuzzTestString_1400_param_05_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = numberTest(); + console.log("FMS_fuzzTestString_1400_param_05_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestString_1400_param_05_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestString_1400_param_05_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_1400_param_05_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_1400_param_05_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestString_1400_param_06_callback', 0, async function (done) { + console.log("FMS_fuzzTestString_1400_param_06_callback getFormsInfoByModule begin"); + + var bundleName = stringTest(); + console.log("FMS_fuzzTestString_1400_param_06_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = objectTest(); + console.log("FMS_fuzzTestString_1400_param_06_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestString_1400_param_06_callback async::callbak return!!!") + console.log("FMS_fuzzTestString_1400_param_06_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_1400_param_06_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestString_1400_param_06_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_1400_param_06_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_1400_param_06_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestString_1400_param_06_promise', 0, async function (done) { + console.log("FMS_fuzzTestString_1400_param_06_promise getFormsInfoByModule begin"); + + var bundleName = stringTest(); + console.log("FMS_fuzzTestString_1400_param_06_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = objectTest(); + console.log("FMS_fuzzTestString_1400_param_06_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestString_1400_param_06_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestString_1400_param_06_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_1400_param_06_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_1400_param_06_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestString_1400_param_07_callback', 0, async function (done) { + console.log("FMS_fuzzTestString_1400_param_07_callback getFormsInfoByModule begin"); + + var bundleName = stringTest(); + console.log("FMS_fuzzTestString_1400_param_07_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = stringTest(); + console.log("FMS_fuzzTestString_1400_param_07_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestString_1400_param_07_callback async::callbak return!!!") + console.log("FMS_fuzzTestString_1400_param_07_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_1400_param_07_callback async::error err:" + err); + expect(retResult).assertEqual(0); + done(); + } + ); + + console.log("FMS_fuzzTestString_1400_param_07_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_1400_param_07_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestString_1400_param_07_promise', 0, async function (done) { + console.log("FMS_fuzzTestString_1400_param_07_promise getFormsInfoByModule begin"); + + var bundleName = stringTest(); + console.log("FMS_fuzzTestString_1400_param_07_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = stringTest(); + console.log("FMS_fuzzTestString_1400_param_07_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + formManager.getFormsInfo(bundleName, moduleName).then((err) => { + console.log("FMS_fuzzTestString_1400_param_07_promise async::sucess err:" + err); + expect(err).assertEqual(0); + console.log("FMS_fuzzTestString_1400_param_07_promise getFormsInfo end"); + done(); + }); + + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_1400_param_07_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestString_1400_param_08_callback', 0, async function (done) { + console.log("FMS_fuzzTestString_1400_param_08_callback getFormsInfoByModule begin"); + + var bundleName = stringTest(); + console.log("FMS_fuzzTestString_1400_param_08_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = undefinedTest(); + console.log("FMS_fuzzTestString_1400_param_08_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestString_1400_param_08_callback async::callbak return!!!") + console.log("FMS_fuzzTestString_1400_param_08_callback async::sucess data:" + data); + console.log("FMS_fuzzTestString_1400_param_08_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestString_1400_param_08_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_1400_param_08_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_1400_param_08_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestString_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestString_1400_param_08_promise', 0, async function (done) { + console.log("FMS_fuzzTestString_1400_param_08_promise getFormsInfoByModule begin"); + + var bundleName = stringTest(); + console.log("FMS_fuzzTestString_1400_param_08_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = undefinedTest(); + console.log("FMS_fuzzTestString_1400_param_08_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestString_1400_param_08_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestString_1400_param_08_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestString_1400_param_08_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestString_1400_param_08_promise==================end'); + }, TIMEOUT) + }) +}) \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestUndefined.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestUndefined.test.js new file mode 100644 index 0000000000000000000000000000000000000000..847e6a792217ca0bdbb1be57cbdd420f41678e12 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestUndefined.test.js @@ -0,0 +1,1465 @@ +/* + * 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 formManager from '@ohos.ability.formManager' +import {describe, it, expect} from 'deccjsunit/index' +import {stringTest, numberTest, booleanTest, nullTest, undefinedTest, + objectTest, arrayTest, functionTest} from './getParam.js' + +const TIMEOUT = 5000; +describe('FMS_fuzzTestUndefined', function () { + console.log("FMS_fuzzTestUndefined===start"); + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_0200 + * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestUndefined_0200_callback', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_0200_callback deleteForm begin"); + + var formId = undefinedTest(); + console.log("FMS_fuzzTestUndefined_0200_callback deleteForm formId typeof:" + typeof(formId)); + + try{ + formManager.deleteForm( + formId, + (err,data) => { + console.log("FMS_fuzzTestUndefined_0200_callback async::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_0200_callback async::sucess data:" + data); + console.log("FMS_fuzzTestUndefined_0200_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestUndefined_0200_callback Exception caught:" + e); + expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_0200_callback deleteForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_0200_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_0200 + * @tc.desc Check whether the deleteForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestUndefined_0200_promise', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_0200_promise deleteForm begin"); + + var formId = undefinedTest(); + console.log("FMS_fuzzTestUndefined_0200_promise deleteForm formId typeof:" + typeof(formId)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.deleteForm(formId)); + console.log("FMS_fuzzTestUndefined_0200_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestUndefined_0200_promise Exception caught:" + e); + expect(e.message.indexOf("type of deleteForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_0200_promise deleteForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_0200_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestUndefined_0300_param_01_callback', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_0300_param_01_callback releaseForm begin"); + + var formId = undefinedTest(); + console.log("FMS_fuzzTestUndefined_0300_param_01_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = arrayTest(); + console.log("FMS_fuzzTestUndefined_0300_param_01_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestUndefined_0300_param_01_callback async::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_0300_param_01_callback async::sucess data:" + data); + console.log("FMS_fuzzTestUndefined_0300_param_01_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestUndefined_0300_param_01_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_0300_param_01_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_0300_param_01_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestUndefined_0300_param_01_promise', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_0300_param_01_promise releaseForm begin"); + + var formId = undefinedTest(); + console.log("FMS_fuzzTestUndefined_0300_param_01_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = arrayTest(); + console.log("FMS_fuzzTestUndefined_0300_param_01_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestUndefined_0300_param_01_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestUndefined_0300_param_01_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_0300_param_01_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_0300_param_01_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestUndefined_0300_param_02_callback', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_0300_param_02_callback releaseForm begin"); + + var formId = undefinedTest(); + console.log("FMS_fuzzTestUndefined_0300_param_02_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = booleanTest(); + console.log("FMS_fuzzTestUndefined_0300_param_02_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestUndefined_0300_param_02_callback async::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_0300_param_02_callback async::sucess data:" + data); + console.log("FMS_fuzzTestUndefined_0300_param_02_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestUndefined_0300_param_02_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_0300_param_02_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_0300_param_02_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestUndefined_0300_param_02_promise', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_0300_param_02_promise releaseForm begin"); + + var formId = undefinedTest(); + console.log("FMS_fuzzTestUndefined_0300_param_02_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = booleanTest(); + console.log("FMS_fuzzTestUndefined_0300_param_02_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestUndefined_0300_param_02_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestUndefined_0300_param_02_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_0300_param_02_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_0300_param_02_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestUndefined_0300_param_03_callback', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_0300_param_03_callback releaseForm begin"); + + var formId = undefinedTest(); + console.log("FMS_fuzzTestUndefined_0300_param_03_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = functionTest(); + console.log("FMS_fuzzTestUndefined_0300_param_03_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestUndefined_0300_param_03_callback async::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_0300_param_03_callback async::sucess data:" + data); + console.log("FMS_fuzzTestUndefined_0300_param_03_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestUndefined_0300_param_03_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_0300_param_03_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_0300_param_03_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestUndefined_0300_param_03_promise', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_0300_param_03_promise releaseForm begin"); + + var formId = undefinedTest(); + console.log("FMS_fuzzTestUndefined_0300_param_03_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = functionTest(); + console.log("FMS_fuzzTestUndefined_0300_param_03_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestUndefined_0300_param_03_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestUndefined_0300_param_03_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_0300_param_03_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_0300_param_03_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestUndefined_0300_param_04_callback', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_0300_param_04_callback releaseForm begin"); + + var formId = undefinedTest(); + console.log("FMS_fuzzTestUndefined_0300_param_04_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = nullTest(); + console.log("FMS_fuzzTestUndefined_0300_param_04_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestUndefined_0300_param_04_callback async::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_0300_param_04_callback async::sucess data:" + data); + console.log("FMS_fuzzTestUndefined_0300_param_04_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestUndefined_0300_param_04_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_0300_param_04_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_0300_param_04_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestUndefined_0300_param_04_promise', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_0300_param_04_promise releaseForm begin"); + + var formId = undefinedTest(); + console.log("FMS_fuzzTestUndefined_0300_param_04_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = nullTest(); + console.log("FMS_fuzzTestUndefined_0300_param_04_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestUndefined_0300_param_04_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestUndefined_0300_param_04_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_0300_param_04_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_0300_param_04_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestUndefined_0300_param_05_callback', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_0300_param_05_callback releaseForm begin"); + + var formId = undefinedTest(); + console.log("FMS_fuzzTestUndefined_0300_param_05_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = numberTest(); + console.log("FMS_fuzzTestUndefined_0300_param_05_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestUndefined_0300_param_05_callback async::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_0300_param_05_callback async::sucess data:" + data); + console.log("FMS_fuzzTestUndefined_0300_param_05_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestUndefined_0300_param_05_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_0300_param_05_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_0300_param_05_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestUndefined_0300_param_05_promise', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_0300_param_05_promise releaseForm begin"); + + var formId = undefinedTest(); + console.log("FMS_fuzzTestUndefined_0300_param_05_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = numberTest(); + console.log("FMS_fuzzTestUndefined_0300_param_05_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestUndefined_0300_param_05_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestUndefined_0300_param_05_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_0300_param_05_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_0300_param_05_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestUndefined_0300_param_06_callback', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_0300_param_06_callback releaseForm begin"); + + var formId = undefinedTest(); + console.log("FMS_fuzzTestUndefined_0300_param_06_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = objectTest(); + console.log("FMS_fuzzTestUndefined_0300_param_06_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestUndefined_0300_param_06_callback async::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_0300_param_06_callback async::sucess data:" + data); + console.log("FMS_fuzzTestUndefined_0300_param_06_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestUndefined_0300_param_06_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_0300_param_06_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_0300_param_06_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestUndefined_0300_param_06_promise', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_0300_param_06_promise releaseForm begin"); + + var formId = undefinedTest(); + console.log("FMS_fuzzTestUndefined_0300_param_06_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = objectTest(); + console.log("FMS_fuzzTestUndefined_0300_param_06_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestUndefined_0300_param_06_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestUndefined_0300_param_06_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_0300_param_06_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_0300_param_06_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestUndefined_0300_param_07_callback', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_0300_param_07_callback releaseForm begin"); + + var formId = undefinedTest(); + console.log("FMS_fuzzTestUndefined_0300_param_07_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = stringTest(); + console.log("FMS_fuzzTestUndefined_0300_param_07_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestUndefined_0300_param_07_callback async::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_0300_param_07_callback async::sucess data:" + data); + console.log("FMS_fuzzTestUndefined_0300_param_07_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestUndefined_0300_param_07_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_0300_param_07_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_0300_param_07_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestUndefined_0300_param_07_promise', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_0300_param_07_promise releaseForm begin"); + + var formId = undefinedTest(); + console.log("FMS_fuzzTestUndefined_0300_param_07_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = stringTest(); + console.log("FMS_fuzzTestUndefined_0300_param_07_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestUndefined_0300_param_07_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestUndefined_0300_param_07_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_0300_param_07_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_0300_param_07_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestUndefined_0300_param_08_callback', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_0300_param_08_callback releaseForm begin"); + + var formId = undefinedTest(); + console.log("FMS_fuzzTestUndefined_0300_param_08_callback releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = undefinedTest(); + console.log("FMS_fuzzTestUndefined_0300_param_08_callback releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + try{ + formManager.releaseForm( + formId, + isReleaseCache, + (err,data) => { + console.log("FMS_fuzzTestUndefined_0300_param_08_callback async::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_0300_param_08_callback async::sucess data:" + data); + console.log("FMS_fuzzTestUndefined_0300_param_08_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestUndefined_0300_param_08_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_0300_param_08_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_0300_param_08_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestUndefined_0300_param_08_promise', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_0300_param_08_promise releaseForm begin"); + + var formId = undefinedTest(); + console.log("FMS_fuzzTestUndefined_0300_param_08_promise releaseForm formId typeof:" + typeof(formId)); + + var isReleaseCache = undefinedTest(); + console.log("FMS_fuzzTestUndefined_0300_param_08_promise releaseForm isReleaseCache typeof:" + + typeof(isReleaseCache)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId, isReleaseCache)); + console.log("FMS_fuzzTestUndefined_0300_param_08_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestUndefined_0300_param_08_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_0300_param_08_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_0300_param_08_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestUndefined_0300_param_09_callback', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_0300_param_09_callback releaseForm begin"); + + var formId = undefinedTest(); + console.log("FMS_fuzzTestUndefined_0300_param_09_callback releaseForm formId typeof:" + + typeof(formId) + ",formId:" + formId); + + try{ + formManager.releaseForm( + formId, + (err,data) => { + console.log("FMS_fuzzTestUndefined_0300_param_09_callback async::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_0300_param_09_callback async::sucess data:" + data); + console.log("FMS_fuzzTestUndefined_0300_param_09_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + + ); + } catch (e) { + console.log("FMS_fuzzTestUndefined_0300_param_09_callback Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_0300_param_09_callback releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_0300_param_09_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_0300 + * @tc.desc Check whether the releaseForm interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestUndefined_0300_param_09_promise', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_0300_param_09_promise releaseForm begin"); + + var formId = undefinedTest(); + console.log("FMS_fuzzTestUndefined_0300_param_09_promise releaseForm formId typeof:" + + typeof(formId) + ",formId:" + formId); + + var retResult; + try{ + retResult = await Promise.all(await formManager.releaseForm(formId)); // formId: number>0 ok + console.log("FMS_fuzzTestUndefined_0300_param_09_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestUndefined_0300_param_09_promise Exception caught:" + e); + expect(e.message.indexOf("type of releaseForm is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_0300_param_09_promise releaseForm end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_0300_param_09_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_1200 + * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestUndefined_1200_callback', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_1200_callback getAllFormsInfo begin"); + + var testParam = undefinedTest(); + console.log("FMS_fuzzTestUndefined_1200_callback getAllFormsInfo formIds typeof:" + typeof(testParam)); + + try{ + formManager.getAllFormsInfo( + testParam, + (err,data) => { + console.log("FMS_fuzzTestUndefined_1200_callback async::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_1200_callback async::sucess data:" + data); + console.log("FMS_fuzzTestUndefined_1200_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestUndefined_1200_callback Exception caught:" + e); + expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_1200_callback getAllFormsInfo end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_1200_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_1200 + * @tc.desc Check whether the getAllFormsInfo interface can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestUndefined_1200_promise', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_1200_promise getAllFormsInfo begin"); + + var testParam = undefinedTest(); + console.log("FMS_fuzzTestUndefined_1200_promise getAllFormsInfo formIds typeof:" + typeof(testParam)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getAllFormsInfo(testParam)); + console.log("FMS_fuzzTestUndefined_1200_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestUndefined_1200_promise Exception caught:" + e); + expect(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_1200_promise getAllFormsInfo end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_1200_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_1300 + * @tc.desc Check whether the form configuration information query interface of the specified package + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestUndefined_1300_callback', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_1300_callback getFormsInfoByApp begin"); + + var bundleName = undefinedTest(); + console.log("FMS_fuzzTestUndefined_1300_callback getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); + + try{ + formManager.getFormsInfo( + bundleName, + (err,data) => { + console.log("FMS_fuzzTestUndefined_1300_callback async::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_1300_callback async::sucess data:" + data); + console.log("FMS_fuzzTestUndefined_1300_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestUndefined_1300_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_1300_callback getFormsInfoByApp end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_1300_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_1300 + * @tc.desc Check whether the form configuration information query interface of the specified package + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestUndefined_1300_promise', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_1300_promise getFormsInfoByApp begin"); + + var bundleName = undefinedTest(); + console.log("FMS_fuzzTestUndefined_1300_promise getFormsInfoByApp bundleName typeof:" + typeof(bundleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName)); + console.log("FMS_fuzzTestUndefined_1300_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestUndefined_1300_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_1300_promise getFormsInfoByApp end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_1300_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestUndefined_1400_param_01_callback', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_1400_param_01_callback getFormsInfoByModule begin"); + + var bundleName = undefinedTest(); + console.log("FMS_fuzzTestUndefined_1400_param_01_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = arrayTest(); + console.log("FMS_fuzzTestUndefined_1400_param_01_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestUndefined_1400_param_01_callback async::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_1400_param_01_callback async::sucess data:" + data); + console.log("FMS_fuzzTestUndefined_1400_param_01_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestUndefined_1400_param_01_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_1400_param_01_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_1400_param_01_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestUndefined_1400_param_01_promise', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_1400_param_01_promise getFormsInfoByModule begin"); + + var bundleName = undefinedTest(); + console.log("FMS_fuzzTestUndefined_1400_param_01_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = arrayTest(); + console.log("FMS_fuzzTestUndefined_1400_param_01_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestUndefined_1400_param_01_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestUndefined_1400_param_01_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_1400_param_01_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_1400_param_01_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestUndefined_1400_param_02_callback', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_1400_param_02_callback getFormsInfoByModule begin"); + + var bundleName = undefinedTest(); + console.log("FMS_fuzzTestUndefined_1400_param_02_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = booleanTest(); + console.log("FMS_fuzzTestUndefined_1400_param_02_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestUndefined_1400_param_02_callback async::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_1400_param_02_callback async::sucess data:" + data); + console.log("FMS_fuzzTestUndefined_1400_param_02_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestUndefined_1400_param_02_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_1400_param_02_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_1400_param_02_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestUndefined_1400_param_02_promise', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_1400_param_02_promise getFormsInfoByModule begin"); + + var bundleName = undefinedTest(); + console.log("FMS_fuzzTestUndefined_1400_param_02_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = booleanTest(); + console.log("FMS_fuzzTestUndefined_1400_param_02_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestUndefined_1400_param_02_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestUndefined_1400_param_02_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_1400_param_02_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_1400_param_02_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestUndefined_1400_param_03_callback', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_1400_param_03_callback getFormsInfoByModule begin"); + + var bundleName = undefinedTest(); + console.log("FMS_fuzzTestUndefined_1400_param_03_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = functionTest(); + console.log("FMS_fuzzTestUndefined_1400_param_03_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestUndefined_1400_param_03_callback async::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_1400_param_03_callback async::sucess data:" + data); + console.log("FMS_fuzzTestUndefined_1400_param_03_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestUndefined_1400_param_03_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_1400_param_03_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_1400_param_03_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestUndefined_1400_param_03_promise', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_1400_param_03_promise getFormsInfoByModule begin"); + + var bundleName = undefinedTest(); + console.log("FMS_fuzzTestUndefined_1400_param_03_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = functionTest(); + console.log("FMS_fuzzTestUndefined_1400_param_03_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestUndefined_1400_param_03_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestUndefined_1400_param_03_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_1400_param_03_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_1400_param_03_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestUndefined_1400_param_04_callback', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_1400_param_04_callback getFormsInfoByModule begin"); + + var bundleName = undefinedTest(); + console.log("FMS_fuzzTestUndefined_1400_param_04_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = nullTest(); + console.log("FMS_fuzzTestUndefined_1400_param_04_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestUndefined_1400_param_04_callback async::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_1400_param_04_callback async::sucess data:" + data); + console.log("FMS_fuzzTestUndefined_1400_param_04_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestUndefined_1400_param_04_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_1400_param_04_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_1400_param_04_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestUndefined_1400_param_04_promise', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_1400_param_04_promise getFormsInfoByModule begin"); + + var bundleName = undefinedTest(); + console.log("FMS_fuzzTestUndefined_1400_param_04_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = nullTest(); + console.log("FMS_fuzzTestUndefined_1400_param_04_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestUndefined_1400_param_04_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestUndefined_1400_param_04_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_1400_param_04_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_1400_param_04_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestUndefined_1400_param_05_callback', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_1400_param_05_callback getFormsInfoByModule begin"); + + var bundleName = undefinedTest(); + console.log("FMS_fuzzTestUndefined_1400_param_05_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = numberTest(); + console.log("FMS_fuzzTestUndefined_1400_param_05_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestUndefined_1400_param_05_callback async::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_1400_param_05_callback async::sucess data:" + data); + console.log("FMS_fuzzTestUndefined_1400_param_05_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestUndefined_1400_param_05_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_1400_param_05_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_1400_param_05_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestUndefined_1400_param_05_promise', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_1400_param_05_promise getFormsInfoByModule begin"); + + var bundleName = undefinedTest(); + console.log("FMS_fuzzTestUndefined_1400_param_05_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = numberTest(); + console.log("FMS_fuzzTestUndefined_1400_param_05_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestUndefined_1400_param_05_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestUndefined_1400_param_05_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_1400_param_05_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_1400_param_05_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestUndefined_1400_param_06_callback', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_1400_param_06_callback getFormsInfoByModule begin"); + + var bundleName = undefinedTest(); + console.log("FMS_fuzzTestUndefined_1400_param_06_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = objectTest(); + console.log("FMS_fuzzTestUndefined_1400_param_06_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestUndefined_1400_param_06_callback async::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_1400_param_06_callback async::sucess data:" + data); + console.log("FMS_fuzzTestUndefined_1400_param_06_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestUndefined_1400_param_06_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_1400_param_06_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_1400_param_06_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestUndefined_1400_param_06_promise', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_1400_param_06_promise getFormsInfoByModule begin"); + + var bundleName = undefinedTest(); + console.log("FMS_fuzzTestUndefined_1400_param_06_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = objectTest(); + console.log("FMS_fuzzTestUndefined_1400_param_06_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestUndefined_1400_param_06_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestUndefined_1400_param_06_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_1400_param_06_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_1400_param_06_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestUndefined_1400_param_07_callback', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_1400_param_07_callback getFormsInfoByModule begin"); + + var bundleName = undefinedTest(); + console.log("FMS_fuzzTestUndefined_1400_param_07_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = stringTest(); + console.log("FMS_fuzzTestUndefined_1400_param_07_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestUndefined_1400_param_07_callback async::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_1400_param_07_callback async::sucess data:" + data); + console.log("FMS_fuzzTestUndefined_1400_param_07_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestUndefined_1400_param_07_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_1400_param_07_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_1400_param_07_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestUndefined_1400_param_07_promise', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_1400_param_07_promise getFormsInfoByModule begin"); + + var bundleName = undefinedTest(); + console.log("FMS_fuzzTestUndefined_1400_param_07_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = stringTest(); + console.log("FMS_fuzzTestUndefined_1400_param_07_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestUndefined_1400_param_07_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestUndefined_1400_param_07_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_1400_param_07_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_1400_param_07_promise==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by AsyncCallback) + */ + it('FMS_fuzzTestUndefined_1400_param_08_callback', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_1400_param_08_callback getFormsInfoByModule begin"); + + var bundleName = undefinedTest(); + console.log("FMS_fuzzTestUndefined_1400_param_08_callback getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = undefinedTest(); + console.log("FMS_fuzzTestUndefined_1400_param_08_callback getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + try{ + formManager.getFormsInfo( + bundleName, + moduleName, + (err,data) => { + console.log("FMS_fuzzTestUndefined_1400_param_08_callback async::callbak return!!!"); + console.log("FMS_fuzzTestUndefined_1400_param_08_callback async::sucess data:" + data); + console.log("FMS_fuzzTestUndefined_1400_param_08_callback async::error err:" + err); + fail("should not reach here"); + done(); + } + ); + } catch (e) { + console.log("FMS_fuzzTestUndefined_1400_param_08_callback Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_1400_param_08_callback getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_1400_param_08_callback==================end'); + }, TIMEOUT) + }) + + /** + * @tc.name fuzzTest + * @tc.number FMS_fuzzTestUndefined_1400 + * @tc.desc Check whether the form configuration information query interface of the specified module + * can pass the fuzzy test (by Promise) + */ + it('FMS_fuzzTestUndefined_1400_param_08_promise', 0, async function (done) { + console.log("FMS_fuzzTestUndefined_1400_param_08_promise getFormsInfoByModule begin"); + + var bundleName = undefinedTest(); + console.log("FMS_fuzzTestUndefined_1400_param_08_promise getFormsInfoByModule bundleName typeof:" + + typeof(bundleName)); + + var moduleName = undefinedTest(); + console.log("FMS_fuzzTestUndefined_1400_param_08_promise getFormsInfoByModule moduleName typeof:" + + typeof(moduleName)); + + var retResult; + try{ + retResult = await Promise.all(await formManager.getFormsInfo(bundleName, moduleName)); + console.log("FMS_fuzzTestUndefined_1400_param_08_promise async::sucess retResult:" + retResult); + fail("should not reach here"); + done(); + } catch (e) { + console.log("FMS_fuzzTestUndefined_1400_param_08_promise Exception caught:" + e); + expect(e.message.indexOf("type of getFormsInfo is incorrect") > -1).assertTrue(); + } + + console.log("FMS_fuzzTestUndefined_1400_param_08_promise getFormsInfoByModule end"); + done(); + setTimeout(function () { + console.info('=====================FMS_fuzzTestUndefined_1400_param_08_promise==================end'); + }, TIMEOUT) + }) +}) \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/List.test.js old mode 100755 new mode 100644 index ae0ba3f5175a63778a30fa9d3f6076cfe55bd8bf..182052736120a5dfaf18861e188b00c76b942975 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/List.test.js +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/List.test.js @@ -13,4 +13,11 @@ * limitations under the License. */ -require('./FormFuzzTest.test.js') \ No newline at end of file +require('./FormFuzzTestArray.test.js') +require('./FormFuzzTestBool.test.js') +require('./FormFuzzTestFunction.test.js') +require('./FormFuzzTestNull.test.js') +require('./FormFuzzTestNum.test.js') +require('./FormFuzzTestObject.test.js') +require('./FormFuzzTestString.test.js') +require('./FormFuzzTestUndefined.test.js') \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/getParam.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/getParam.js old mode 100755 new mode 100644 index 69e4f8396b7f802361a5199e37a6a07a2933492f..b14cc4ff54a51e034877169451e1398d11d9548f --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/getParam.js +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/getParam.js @@ -15,7 +15,6 @@ var RANDOM_BEGIN_POSITION = 0; var RANDOM_BEGIN_POSITION_A = 2; var STRING_RANDOM_LENGTH = 2064; -var ASCII_RANDOM_LENGTH = 256; var BOOLEAN_RANDOM_LENGTH = 2; var ARRAY_RANDOM_LENGTH = 10; var ARRAY_RANDOM_TYPE_LENGTH = 3; @@ -67,26 +66,31 @@ const stringTest = function() { var asciiToChar = String.fromCharCode(iNumber); res += asciiToChar; } + console.log("The stringTest of this fuzzTest random:" + res); return res; } // return number random, the number length is: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER] const numberTest = function() { + console.log("The numberTest of this fuzzTest random" ); return getIntegerRandom(Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER + 1); } // return boolean random, the boolean value is: 0->(false), 1->(true) const booleanTest = function() { - return getIntegerRandom(RANDOM_BEGIN_POSITION, BOOLEAN_RANDOM_LENGTH); + console.log("The booleanTest of this fuzzTest random" ); + return Boolean(getIntegerRandom(RANDOM_BEGIN_POSITION, BOOLEAN_RANDOM_LENGTH)); } // null const nullTest = function() { + console.log("The nullTest of this fuzzTest random" ); return null; } -// undefinedTest +// undefined const undefinedTest = function() { + console.log("The undefinedTest of this fuzzTest random" ); return undefined; } @@ -114,14 +118,17 @@ const arrayTest = function() { arrValue[iArrNumber] = ''; } } + console.log("The arrayTest of this fuzzTest random:" + arrValue); return arrValue; } // return objectTest random, the objectTest value is: null, not null const objectTest = function() { - var objectA = Object.create(null); - var objectB = Object.create("objectTest"); + var objectA = {}; + var objectb = {id : 'objectTest'}; + var objectB = Object.create(objectb); + console.log("The objectTest of this fuzzTest random" ); return getIntegerRandom(RANDOM_BEGIN_POSITION, OBJECT_RANDOM_LENGTH) ? objectA: objectB; } @@ -130,67 +137,10 @@ const functionTest = function() { var functionA = {}; var functionB = {id:"functionTest"}; + console.log("The functionTest of this fuzzTest random" ); return getIntegerRandom(RANDOM_BEGIN_POSITION, FUNCTION_RANDOM_LENGTH) ? functionA: functionB; } -// get parameter value from: string, number, bool, null, undefined, object, array, function -const parameterValue = function() { - - var fuzzConfigData = [ - {"name":"string", "paramWeight":25},{"name":"number", "paramWeight":45},{"name":"boolean", "paramWeight":50}, - {"name":"null", "paramWeight":52},{"name":"undefined", "paramWeight":54},{"name":"object", "paramWeight":62}, - {"name":"array", "paramWeight":92},{"name":"function", "paramWeight":100}, - ] - - var weightSum = fuzzConfigData[fuzzConfigData.length - 1].paramWeight; - console.log("The weight sum of this fuzzTest:" + weightSum); - - var paramValue = ''; - var iNumber = getIntegerRandom(RANDOM_BEGIN_POSITION, weightSum); - console.log("The iNumber of this fuzzTest random:" + iNumber); - - for(var iFuzzDataNumber = 0; iFuzzDataNumber < fuzzConfigData.length; iFuzzDataNumber ++) { - - if((iFuzzDataNumber == 0 && iNumber < fuzzConfigData[iFuzzDataNumber].paramWeight) || - (iNumber < fuzzConfigData[iFuzzDataNumber].paramWeight && - iNumber > fuzzConfigData[iFuzzDataNumber - 1].paramWeight) ) { - console.log("The name of this fuzzTest random:" + fuzzConfigData[iFuzzDataNumber].name); - switch(fuzzConfigData[iFuzzDataNumber].name) { - case "string": - paramValue = stringTest(); - break; - case "number": - paramValue = numberTest(); - break; - case "boolean": - paramValue = booleanTest(); - break; - case "null": - paramValue = nullTest(); - break; - case "undefined": - paramValue = undefinedTest(); - break; - case "object": - paramValue = objectTest(); - break; - case "array": - paramValue = arrayTest(); - break; - case "function": - paramValue = functionTest(); - break; - default: - paramValue = ''; - break; - } - } - } - - console.log("The paramValue of this fuzzTest random:" + paramValue); - return paramValue; -} - export { - parameterValue, stringTest, numberTest, booleanTest, nullTest, undefinedTest, objectTest, arrayTest, functionTest + stringTest, numberTest, booleanTest, nullTest, undefinedTest, objectTest, arrayTest, functionTest } \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/BUILD.gn b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/BUILD.gn similarity index 93% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/BUILD.gn rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/BUILD.gn index ac4cced06c7b5f7df9c62f464b3af330e24285d7..e17ccc9a1a4267e40e3e84d52758caeb39634409 100644 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/BUILD.gn +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/BUILD.gn @@ -13,14 +13,14 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("GetAllFormsInfo") { +ohos_js_hap_suite("GetAllFormsInfo10") { hap_profile = "./entry/src/main/config.json" deps = [ ":hjs_demo_js_assets", ":hjs_demo_resources", ] certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "GetAllFormsInfo" + hap_name = "GetAllFormsInfo10" } ohos_js_assets("hjs_demo_js_assets") { source_dir = "./entry/src/main/js/default" diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/Test.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/Test.json new file mode 100644 index 0000000000000000000000000000000000000000..71dbba6d6c214707612f5a7322ff98af48ff9f5f --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/Test.json @@ -0,0 +1,38 @@ +{ + "description": "Configuration for hjunit demo Tests", + "driver": { + "type": "JSUnitTest", + "test-timeout": "60000", + "package": "com.example.getallformsinfo10", + "shell-timeout": "60000" + }, + "kits": [ + { + "test-file-name": [ + "GetAllFormsInfo10.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + }, + { + "type": "ShellKit", + "run-command": [ + "remount", + "mkdir /system/vendor" + ] + }, + { + "type": "PushKit", + "push": [ + "GetAllFormsInfo10.hap->/data/GetAllFormsInfo10.hap" + ] + + }, + { + "type": "ShellKit", + "run-command": [ + "chmod 644 /system/vendor/*.hap" + ] + } + ] +} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/config.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/config.json new file mode 100644 index 0000000000000000000000000000000000000000..c55339fa42a8f33a0951fc4eaf51404d24239472 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/config.json @@ -0,0 +1,63 @@ +{ + "app": { + "bundleName": "com.example.getallformsinfo10", + "vendor": "example", + "version": { + "code": 1, + "name": "1.0" + }, + "apiVersion": { + "compatible": 5, + "target": 5, + "releaseType": "Beta1" + } + }, + "deviceConfig": {}, + "module": { + "package": "com.example.getallformsinfo10", + "name": ".MyApplication", + "mainAbility": "com.example.getallformsinfo10.MainAbility", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry", + "installationFree": false + }, + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "visible": true, + "name": "com.example.getallformsinfo10.MainAbility", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:entry_MainAbility", + "type": "page", + "launchType": "standard" + } + ], + "js": [ + { + "pages": [ + "pages/index/index" + ], + "name": "default", + "window": { + "designWidth": 720, + "autoDesignWidth": true + } + } + ] + } +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/default/app.js similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/app.js rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/default/app.js diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/default/i18n/en-US.json similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/i18n/en-US.json rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/default/i18n/en-US.json diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/default/i18n/zh-CN.json similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/i18n/zh-CN.json rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/default/i18n/zh-CN.json diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/default/pages/index/index.css similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/pages/index/index.css rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/default/pages/index/index.css diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/default/pages/index/index.hml similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/pages/index/index.hml rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/default/pages/index/index.hml diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/default/pages/index/index.js similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/pages/index/index.js rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/default/pages/index/index.js diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/test/GetAllFormsInfo10Jsunit.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/test/GetAllFormsInfo10Jsunit.test.js new file mode 100644 index 0000000000000000000000000000000000000000..3ad6411abc6ddfd0f4a08861b05c0a570e925d79 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/test/GetAllFormsInfo10Jsunit.test.js @@ -0,0 +1,70 @@ +/* + * 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 formManager from '@ohos.ability.formManager' +import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' + +const TIMEOUT = 3000; +describe('getAllFormsInfoTest', function () { + console.log("system application and has permissions Test"); + + /** + * @tc.name getAllFormsInfo test + * @tc.number FMS_getFormsInfo_0300 + * @tc.desc All form configuration information is empty (by AsyncCallback) + */ + it('FMS_getFormsInfo_0300_callback', 0, async function (done) { + console.log("FMS_getFormsInfo_0300_callback begin"); + + var ret = formManager.getAllFormsInfo( + (result, data) => { + console.log("FMS_getFormsInfo_0300_callback async::sucess, data json:" + + JSON.stringify(data)); + console.log("FMS_getFormsInfo_0300_callback async::result, result:" + result); + expect(result).assertEqual(0); + console.log("FMS_getFormsInfo_0300_callback result end"); + done(); + } + ); + + setTimeout(function () { + console.info('=====================FMS_getFormsInfo_0300_callback==================end'); + }, TIMEOUT) + console.log("FMS_getFormsInfo_0300_callback end, ret:"+ret); + }) + + /** + * @tc.name getAllFormsInfo test + * @tc.number FMS_getFormsInfo_0300 + * @tc.desc All form configuration information is empty (by Promise) + */ + it('FMS_getFormsInfo_0300_promise', 0, async function (done) { + console.log("FMS_getFormsInfo_0300_promise begin"); + + var promise = formManager.getAllFormsInfo(); + promise.then((result) => { + console.log("FMS_getFormsInfo_0300_promise result:" + result); + expect(result).assertEqual(0); + console.log("FMS_getFormsInfo_0300_promise result end"); + done(); + } + ); + + setTimeout(function () { + console.info('=====================FMS_getFormsInfo_0300_promise==================end'); + }, TIMEOUT) + }) + +}) diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/test/List.test.js similarity index 93% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/test/List.test.js rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/test/List.test.js index 439e7f920efce3a5ad2d365d85045cdc0ac8cc02..0bf02e9ef3590c596c20b20e3b1e4bb530751673 100644 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/test/List.test.js +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/js/test/List.test.js @@ -13,4 +13,4 @@ * limitations under the License. */ -require('./GetAllFormsInfoJsunit.test.js') \ No newline at end of file +require('./GetAllFormsInfo10Jsunit.test.js') \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..a8c86be4485c29333ca2222093de261bca558568 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "entry_MainAbility", + "value": "GetAllFormsInfo10" + }, + { + "name": "mainability_description", + "value": "JS_Empty Ability" + } + ] +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/resources/base/media/icon.png b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/resources/base/media/icon.png similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/resources/base/media/icon.png rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/entry/src/main/resources/base/media/icon.png diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/signature/openharmony_sx.p7b similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/signature/openharmony_sx.p7b rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo10/signature/openharmony_sx.p7b diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/BUILD.gn b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..98b371b18c214af7581767ea2c5622596519224f --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/BUILD.gn @@ -0,0 +1,31 @@ +# 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("GetAllFormsInfo201") { + hap_profile = "./entry/src/main/config.json" + deps = [ + ":hjs_demo_js_assets", + ":hjs_demo_resources", + ] + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "GetAllFormsInfo201" +} +ohos_js_assets("hjs_demo_js_assets") { + source_dir = "./entry/src/main/js/default" +} +ohos_resources("hjs_demo_resources") { + sources = [ "./entry/src/main/resources" ] + hap_profile = "./entry/src/main/config.json" +} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/Test.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/Test.json new file mode 100644 index 0000000000000000000000000000000000000000..5ec5cdd14f1284b0dc23943361ac05e186fb339d --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/Test.json @@ -0,0 +1,38 @@ +{ + "description": "Configuration for hjunit demo Tests", + "driver": { + "type": "JSUnitTest", + "test-timeout": "60000", + "package": "com.example.getallformsinfo201", + "shell-timeout": "60000" + }, + "kits": [ + { + "test-file-name": [ + "GetAllFormsInfo201.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + }, + { + "type": "ShellKit", + "run-command": [ + "remount", + "mkdir /system/vendor" + ] + }, + { + "type": "PushKit", + "push": [ + "GetAllFormsInfo201.hap->/data/GetAllFormsInfo201.hap" + ] + + }, + { + "type": "ShellKit", + "run-command": [ + "chmod 644 /system/vendor/*.hap" + ] + } + ] +} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/config.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/config.json new file mode 100644 index 0000000000000000000000000000000000000000..833d96877b8208b9a892524a5fe4eac28aabeb9e --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/config.json @@ -0,0 +1,63 @@ +{ + "app": { + "bundleName": "com.example.getallformsinfo201", + "vendor": "example", + "version": { + "code": 1, + "name": "1.0" + }, + "apiVersion": { + "compatible": 5, + "target": 5, + "releaseType": "Beta1" + } + }, + "deviceConfig": {}, + "module": { + "package": "com.example.getallformsinfo201", + "name": ".MyApplication", + "mainAbility": "com.example.getallformsinfo201.MainAbility", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry", + "installationFree": false + }, + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "visible": true, + "name": "com.example.getallformsinfo201.MainAbility", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:entry_MainAbility", + "type": "page", + "launchType": "standard" + } + ], + "js": [ + { + "pages": [ + "pages/index/index" + ], + "name": "default", + "window": { + "designWidth": 720, + "autoDesignWidth": true + } + } + ] + } +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/app.js new file mode 100644 index 0000000000000000000000000000000000000000..e423f4bce4698ec1d7dc86c3eea3990a5e7b1085 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/app.js @@ -0,0 +1,23 @@ +/* + * 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. + */ + +export default { + onCreate() { + console.info('AceApplication onCreate'); + }, + onDestroy() { + console.info('AceApplication onDestroy'); + } +}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/i18n/en-US.json similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/i18n/en-US.json rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/i18n/en-US.json diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/i18n/zh-CN.json similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/i18n/zh-CN.json rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/i18n/zh-CN.json diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/pages/index/index.css new file mode 100644 index 0000000000000000000000000000000000000000..0a66102a6f5e70198f774f5fbf658e36c25cc235 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/pages/index/index.css @@ -0,0 +1,44 @@ +.container { + flex-direction: column; + justify-content: center; + align-items: center; +} + +.title { + font-size: 40px; + color: #000000; + opacity: 0.9; +} + +@media screen and (device-type: tablet) and (orientation: landscape) { + .title { + font-size: 100px; + } +} + +@media screen and (device-type: wearable) { + .title { + font-size: 28px; + color: #FFFFFF; + } +} + +@media screen and (device-type: tv) { + .container { + background-image: url("/common/images/Wallpaper.png"); + background-size: cover; + background-repeat: no-repeat; + background-position: center; + } + + .title { + font-size: 100px; + color: #FFFFFF; + } +} + +@media screen and (device-type: phone) and (orientation: landscape) { + .title { + font-size: 60px; + } +} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/pages/index/index.hml similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/pages/index/index.hml rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/pages/index/index.hml diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/pages/index/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e4832498bfe3f34bb29573e181ce1b298fb7f617 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/default/pages/index/index.js @@ -0,0 +1,51 @@ +/* + * 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 app from '@system.app' +import file from '@system.file' +import router from '@system.router' +import device from '@system.device' +import {Core, ExpectExtend, ReportExtend} from 'deccjsunit/index' + +const injectRef = Object.getPrototypeOf(global) || global +injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') + +export default { + data: { + title: "" + }, + onInit() { + this.title = "卡片配置信息查询 \n有权限、是系统应用"; + }, + onShow() { + console.info('onShow finish') + const core = Core.getInstance() + const expectExtend = new ExpectExtend({ + 'id': 'extend' + }) + const reportExtend = new ReportExtend(file) + core.addService('expect', expectExtend) + core.addService('report', reportExtend) + core.init() + const configService = core.getDefaultService('config') + configService.setConfig(this) + + require('../../../test/List.test') + core.execute() + console.info('onShow end') + }, + onReady() { + }, +} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/test/GetAllFormsInfo201Jsunit.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/test/GetAllFormsInfo201Jsunit.test.js new file mode 100644 index 0000000000000000000000000000000000000000..a0eea8c99d428fa69b3068461cf594c6c792e28b --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/test/GetAllFormsInfo201Jsunit.test.js @@ -0,0 +1,103 @@ +/* + * 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 formManager from '@ohos.ability.formManager' +import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' + +const TIMEOUT = 3000; +describe('getAllFormsInfoTest', function () { + console.log("system application and has permissions Test"); + + /** + * @tc.name getAllFormsInfo test + * @tc.number FMS_getFormsInfo_0400 + * @tc.desc All form configuration information is queried successfully (by AsyncCallback) + */ + it('FMS_getFormsInfo_0400_callback', 0, async function (done) { + console.log("FMS_getFormsInfo_0400_callback begin"); + + var ret = formManager.getAllFormsInfo( + (result, data) => { + console.log("FMS_getFormsInfo_0400_callback async::sucess, data json:" + + JSON.stringify(data)); + console.log("FMS_getFormsInfo_0400_callback async::result, result:" + result); + expect(result).assertEqual(1); + + expect(data[0].description).assertEqual("form_description"); + expect(data[0].type).assertEqual(1); + expect(data[0].colorMode).assertEqual(-1); + expect(data[0].jsComponentName).assertEqual("card"); + expect(data[0].isDefault).assertEqual(1); + expect(data[0].updateEnabled).assertEqual(1); + expect(data[0].updateDuration).assertEqual(1); + expect(data[0].scheduledUpdateTime).assertEqual("10:30"); + expect(data[0].formVisibleNotify).assertEqual(1); + expect(data[0].defaultDimension).assertEqual(1); + expect(data[0].supportDimensions[0]).assertEqual(1); + expect(data[0].supportDimensions[1]).assertEqual(2); + expect(data[0].metaData.customizeData[0].name).assertEqual("originWidgetName"); + expect(data[0].metaData.customizeData[0].value).assertEqual("myTest"); + + expect(data[0].name).assertEqual("FormB_Js001"); + console.log("FMS_getFormsInfo_0400_callback result end"); + done(); + } + ); + + setTimeout(function () { + console.info('=====================FMS_getFormsInfo_0400_callback==================end'); + }, TIMEOUT) + console.log("FMS_getFormsInfo_0400_callback end, ret:"+ret); + }) + + /** + * @tc.name getAllFormsInfo test + * @tc.number FMS_getFormsInfo_0400 + * @tc.desc All form configuration information is queried successfully (by Promise) + */ + it('FMS_getFormsInfo_0400_promise', 0, async function (done) { + console.log("FMS_getFormsInfo_0400_promise begin--------111"); + + var promise = formManager.getAllFormsInfo(); + promise.then((data) => { + console.log("FMS_getFormsInfo_0400_promise async::sucess, data json:" + JSON.stringify(data)); + + expect(data[0].description).assertEqual("form_description"); + expect(data[0].type).assertEqual(1); + expect(data[0].colorMode).assertEqual(-1); + expect(data[0].jsComponentName).assertEqual("card"); + expect(data[0].isDefault).assertEqual(1); + expect(data[0].updateEnabled).assertEqual(1); + expect(data[0].updateDuration).assertEqual(1); + expect(data[0].scheduledUpdateTime).assertEqual("10:30"); + expect(data[0].formVisibleNotify).assertEqual(1); + expect(data[0].defaultDimension).assertEqual(1); + expect(data[0].supportDimensions[0]).assertEqual(1); + expect(data[0].supportDimensions[1]).assertEqual(2); + expect(data[0].metaData.customizeData[0].name).assertEqual("originWidgetName"); + expect(data[0].metaData.customizeData[0].value).assertEqual("myTest"); + + expect(data[0].name).assertEqual("FormB_Js001"); + console.log("FMS_getFormsInfo_0400_promise result end"); + done(); + } + ); + + setTimeout(function () { + console.info('=====================FMS_getFormsInfo_0400_promise==================end'); + }, TIMEOUT) + }) + +}) diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/test/List.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/test/List.test.js new file mode 100644 index 0000000000000000000000000000000000000000..995113fd45988ecdeb156700f703a2c048121472 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/js/test/List.test.js @@ -0,0 +1,16 @@ +/* + * 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. + */ + +require('./GetAllFormsInfo201Jsunit.test.js') \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..5627ae9763c36bcd7a1d0de5660d9ae8004e54ed --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "entry_MainAbility", + "value": "GetAllFormsInfo201" + }, + { + "name": "mainability_description", + "value": "JS_Empty Ability" + } + ] +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/resources/base/media/icon.png b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/resources/base/media/icon.png similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/resources/base/media/icon.png rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/entry/src/main/resources/base/media/icon.png diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/signature/openharmony_sx.p7b new file mode 100644 index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5 Binary files /dev/null and b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo201/signature/openharmony_sx.p7b differ diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/BUILD.gn b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..a28e366b3de9c133294195a2fb8f8d59e6076748 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/BUILD.gn @@ -0,0 +1,31 @@ +# 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("GetAllFormsInfo211") { + hap_profile = "./entry/src/main/config.json" + deps = [ + ":hjs_demo_js_assets", + ":hjs_demo_resources", + ] + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "GetAllFormsInfo211" +} +ohos_js_assets("hjs_demo_js_assets") { + source_dir = "./entry/src/main/js/default" +} +ohos_resources("hjs_demo_resources") { + sources = [ "./entry/src/main/resources" ] + hap_profile = "./entry/src/main/config.json" +} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/Test.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/Test.json new file mode 100644 index 0000000000000000000000000000000000000000..7e578c36e0dffb1396fa7b65f510917771385058 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/Test.json @@ -0,0 +1,38 @@ +{ + "description": "Configuration for hjunit demo Tests", + "driver": { + "type": "JSUnitTest", + "test-timeout": "60000", + "package": "com.example.getallformsinfo211", + "shell-timeout": "60000" + }, + "kits": [ + { + "test-file-name": [ + "GetAllFormsInfo211.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + }, + { + "type": "ShellKit", + "run-command": [ + "remount", + "mkdir /system/vendor" + ] + }, + { + "type": "PushKit", + "push": [ + "GetAllFormsInfo211.hap->/data/GetAllFormsInfo211.hap" + ] + + }, + { + "type": "ShellKit", + "run-command": [ + "chmod 644 /system/vendor/*.hap" + ] + } + ] +} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/config.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/config.json new file mode 100644 index 0000000000000000000000000000000000000000..70c190cc56d9a8f453a01d4f0244a95b53844321 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/config.json @@ -0,0 +1,63 @@ +{ + "app": { + "bundleName": "com.example.getallformsinfo211", + "vendor": "example", + "version": { + "code": 1, + "name": "1.0" + }, + "apiVersion": { + "compatible": 5, + "target": 5, + "releaseType": "Beta1" + } + }, + "deviceConfig": {}, + "module": { + "package": "com.example.getallformsinfo211", + "name": ".MyApplication", + "mainAbility": "com.example.getallformsinfo211.MainAbility", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry", + "installationFree": false + }, + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "visible": true, + "name": "com.example.getallformsinfo211.MainAbility", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:entry_MainAbility", + "type": "page", + "launchType": "standard" + } + ], + "js": [ + { + "pages": [ + "pages/index/index" + ], + "name": "default", + "window": { + "designWidth": 720, + "autoDesignWidth": true + } + } + ] + } +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/app.js new file mode 100644 index 0000000000000000000000000000000000000000..e423f4bce4698ec1d7dc86c3eea3990a5e7b1085 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/app.js @@ -0,0 +1,23 @@ +/* + * 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. + */ + +export default { + onCreate() { + console.info('AceApplication onCreate'); + }, + onDestroy() { + console.info('AceApplication onDestroy'); + } +}; diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/i18n/en-US.json new file mode 100644 index 0000000000000000000000000000000000000000..e63c70d978a3a53be988388c87182f81785e170c --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/i18n/en-US.json @@ -0,0 +1,6 @@ +{ + "strings": { + "hello": "Hello", + "world": "World" + } +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/i18n/zh-CN.json new file mode 100644 index 0000000000000000000000000000000000000000..de6ee5748322f44942c1b003319d8e66c837675f --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/i18n/zh-CN.json @@ -0,0 +1,6 @@ +{ + "strings": { + "hello": "您好", + "world": "世界" + } +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/pages/index/index.css new file mode 100644 index 0000000000000000000000000000000000000000..0a66102a6f5e70198f774f5fbf658e36c25cc235 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/pages/index/index.css @@ -0,0 +1,44 @@ +.container { + flex-direction: column; + justify-content: center; + align-items: center; +} + +.title { + font-size: 40px; + color: #000000; + opacity: 0.9; +} + +@media screen and (device-type: tablet) and (orientation: landscape) { + .title { + font-size: 100px; + } +} + +@media screen and (device-type: wearable) { + .title { + font-size: 28px; + color: #FFFFFF; + } +} + +@media screen and (device-type: tv) { + .container { + background-image: url("/common/images/Wallpaper.png"); + background-size: cover; + background-repeat: no-repeat; + background-position: center; + } + + .title { + font-size: 100px; + color: #FFFFFF; + } +} + +@media screen and (device-type: phone) and (orientation: landscape) { + .title { + font-size: 60px; + } +} diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/pages/index/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..f64b040a5ae394dbaa5e185e1ecd4f4556b92184 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo211/entry/src/main/js/default/pages/index/index.hml @@ -0,0 +1,5 @@ +