From 8356779836da70dc4f5e1a9ad70b7d2557d511de Mon Sep 17 00:00:00 2001 From: "zhaoyuan17@huawei.com" Date: Mon, 29 Nov 2021 19:54:39 +0800 Subject: [PATCH] xts Signed-off-by: zhaoyuan17@huawei.com --- aafwk/aafwk_standard/formmanager/BUILD.gn | 6 +- .../main/js/test/FormFuzzTestArray.test.js | 1465 --------------- .../src/main/js/test/FormFuzzTestBool.test.js | 1465 --------------- .../main/js/test/FormFuzzTestFunction.test.js | 1465 --------------- .../src/main/js/test/FormFuzzTestNull.test.js | 1465 --------------- .../src/main/js/test/FormFuzzTestNum.test.js | 1465 --------------- .../main/js/test/FormFuzzTestObject.test.js | 1465 --------------- .../main/js/test/FormFuzzTestString.test.js | 1562 ---------------- .../js/test/FormFuzzTestUndefined.test.js | 1465 --------------- .../BUILD.gn | 4 +- .../Test.json | 4 +- .../entry/src/main/config.json | 0 .../entry/src/main/js/default/app.js | 0 .../js/default/common/images/Wallpaper.png | Bin .../main/js/default/common/images/bg-tv.jpg | Bin .../entry/src/main/js/default/i18n/en-US.json | 0 .../entry/src/main/js/default/i18n/zh-CN.json | 0 .../src/main/js/default/pages/index/index.css | 0 .../src/main/js/default/pages/index/index.hml | 0 .../src/main/js/default/pages/index/index.js | 0 .../src/main/js/test/FormFuzzArray.test.js | 1470 +++++++++++++++ .../src/main/js/test/FormFuzzBool.test.js | 1468 +++++++++++++++ .../src/main/js/test/FormFuzzFunction.test.js | 1468 +++++++++++++++ .../src/main/js/test/FormFuzzNull.test.js | 1468 +++++++++++++++ .../src/main/js/test/FormFuzzNum.test.js | 1468 +++++++++++++++ .../src/main/js/test/FormFuzzObject.test.js | 1468 +++++++++++++++ .../src/main/js/test/FormFuzzString.test.js | 1570 +++++++++++++++++ .../main/js/test/FormFuzzUndefined.test.js | 1468 +++++++++++++++ .../entry/src/main/js/test/List.test.js | 16 +- .../entry/src/main/js/test/getParam.js | 19 +- .../main/resources/base/element/string.json | 0 .../src/main/resources/base/media/icon.png | Bin .../signature/openharmony_sx.p7b | Bin .../src/main/config.json | 22 - 34 files changed, 11874 insertions(+), 11862 deletions(-) delete mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestArray.test.js delete mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestBool.test.js delete mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestFunction.test.js delete mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestNull.test.js delete mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestNum.test.js delete mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestObject.test.js delete mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestString.test.js delete mode 100644 aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestUndefined.test.js rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{FormFuzzTest => actsformfuzztest}/BUILD.gn (93%) mode change 100644 => 100755 rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{FormFuzzTest => actsformfuzztest}/Test.json (82%) mode change 100644 => 100755 rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{FormFuzzTest => actsformfuzztest}/entry/src/main/config.json (100%) mode change 100644 => 100755 rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{FormFuzzTest => actsformfuzztest}/entry/src/main/js/default/app.js (100%) mode change 100644 => 100755 rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{FormFuzzTest => actsformfuzztest}/entry/src/main/js/default/common/images/Wallpaper.png (100%) mode change 100644 => 100755 rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{FormFuzzTest => actsformfuzztest}/entry/src/main/js/default/common/images/bg-tv.jpg (100%) mode change 100644 => 100755 rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{FormFuzzTest => actsformfuzztest}/entry/src/main/js/default/i18n/en-US.json (100%) mode change 100644 => 100755 rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{FormFuzzTest => actsformfuzztest}/entry/src/main/js/default/i18n/zh-CN.json (100%) mode change 100644 => 100755 rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{FormFuzzTest => actsformfuzztest}/entry/src/main/js/default/pages/index/index.css (100%) mode change 100644 => 100755 rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{FormFuzzTest => actsformfuzztest}/entry/src/main/js/default/pages/index/index.hml (100%) mode change 100644 => 100755 rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{FormFuzzTest => actsformfuzztest}/entry/src/main/js/default/pages/index/index.js (100%) mode change 100644 => 100755 create mode 100755 aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzArray.test.js create mode 100755 aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzBool.test.js create mode 100755 aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzFunction.test.js create mode 100755 aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzNull.test.js create mode 100755 aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzNum.test.js create mode 100755 aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzObject.test.js create mode 100755 aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzString.test.js create mode 100755 aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzUndefined.test.js rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{FormFuzzTest => actsformfuzztest}/entry/src/main/js/test/List.test.js (65%) mode change 100644 => 100755 rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{FormFuzzTest => actsformfuzztest}/entry/src/main/js/test/getParam.js (98%) mode change 100644 => 100755 rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{FormFuzzTest => actsformfuzztest}/entry/src/main/resources/base/element/string.json (100%) mode change 100644 => 100755 rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{FormFuzzTest => actsformfuzztest}/entry/src/main/resources/base/media/icon.png (100%) mode change 100644 => 100755 rename aafwk/aafwk_standard/formmanager/formsystemtesthost/{FormFuzzTest => actsformfuzztest}/signature/openharmony_sx.p7b (100%) mode change 100644 => 100755 mode change 100644 => 100755 aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/config.json diff --git a/aafwk/aafwk_standard/formmanager/BUILD.gn b/aafwk/aafwk_standard/formmanager/BUILD.gn index 93b87102d..a3b290adf 100755 --- a/aafwk/aafwk_standard/formmanager/BUILD.gn +++ b/aafwk/aafwk_standard/formmanager/BUILD.gn @@ -17,11 +17,11 @@ group("formmanager") { testonly = true if (is_standard_system) { deps = [ - "formsystemtesthost/FormFuzzTest:FormFuzzTest", + "formsystemtesthost/actsformfuzztest:ActsFormFuzzTest", + "formsystemtesthost/actsformszerotest:ActsFormsZeroTest", + "formsystemtesthost/actsformszeroandonetest:ActsFormsZeroAndOneTest", "formsystemtesthost/actsformsoneandonetest:ActsFormsOneAndOneTest", "formsystemtesthost/actsformsoneandtwotest:ActsFormsOneAndTwoTest", - "formsystemtesthost/actsformszeroandonetest:ActsFormsZeroAndOneTest", - "formsystemtesthost/actsformszerotest:ActsFormsZeroTest", "formsystemtestservice/formsystemtestservicea:ActsFormSystemTestServiceA", "formsystemtestservice/formsystemtestserviceb:ActsFormSystemTestServiceB", "formsystemtestservice/formsystemtestservicec:ActsFormSystemTestServiceC", 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 deleted file mode 100644 index b8adcabc7..000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestArray.test.js +++ /dev/null @@ -1,1465 +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, 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 deleted file mode 100644 index 15d25f6fa..000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestBool.test.js +++ /dev/null @@ -1,1465 +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, 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 deleted file mode 100644 index 329134e71..000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestFunction.test.js +++ /dev/null @@ -1,1465 +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, 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 deleted file mode 100644 index ff7b74e81..000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestNull.test.js +++ /dev/null @@ -1,1465 +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, 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 deleted file mode 100644 index ed707b64e..000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestNum.test.js +++ /dev/null @@ -1,1465 +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, 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 deleted file mode 100644 index 572ed4d4e..000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestObject.test.js +++ /dev/null @@ -1,1465 +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, 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 deleted file mode 100644 index 52c967cfb..000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestString.test.js +++ /dev/null @@ -1,1562 +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, 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 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_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(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); - } - - 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(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); - } - - 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)); - - 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(); - } - ); - - 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)); - - formManager.getFormsInfo(bundleName).then((err) => { - console.log("FMS_fuzzTestString_1300_promise async::sucess err:" + err); - expect(err).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 deleted file mode 100644 index 847e6a792..000000000 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/FormFuzzTestUndefined.test.js +++ /dev/null @@ -1,1465 +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, 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/BUILD.gn b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/BUILD.gn old mode 100644 new mode 100755 similarity index 93% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/BUILD.gn rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/BUILD.gn index c90113119..16ff726ad --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/BUILD.gn +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/BUILD.gn @@ -13,14 +13,14 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("FormFuzzTest") { +ohos_js_hap_suite("ActsFormFuzzTest") { hap_profile = "./entry/src/main/config.json" deps = [ ":hjs_demo_js_assets", ":hjs_demo_resources", ] certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "FormFuzzTest" + hap_name = "ActsFormFuzzTest" } ohos_js_assets("hjs_demo_js_assets") { source_dir = "./entry/src/main/js/default" diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/Test.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/Test.json old mode 100644 new mode 100755 similarity index 82% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/Test.json rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/Test.json index f10467230..190131ef9 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/Test.json +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/Test.json @@ -2,14 +2,14 @@ "description": "Configuration for hjunit demo Tests", "driver": { "type": "JSUnitTest", - "test-timeout": "360000", + "test-timeout": "420000", "package": "com.example.formfuzztest", "shell-timeout": "60000" }, "kits": [ { "test-file-name": [ - "FormFuzzTest.hap" + "ActsFormFuzzTest.hap" ], "type": "AppInstallKit", "cleanup-apps": true diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/config.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/config.json old mode 100644 new mode 100755 similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/config.json rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/config.json diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/default/app.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/app.js old mode 100644 new mode 100755 similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/default/app.js rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/app.js diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/default/common/images/Wallpaper.png b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/common/images/Wallpaper.png old mode 100644 new mode 100755 similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/default/common/images/Wallpaper.png rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/common/images/Wallpaper.png diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/default/common/images/bg-tv.jpg b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/common/images/bg-tv.jpg old mode 100644 new mode 100755 similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/default/common/images/bg-tv.jpg rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/common/images/bg-tv.jpg diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/default/i18n/en-US.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/i18n/en-US.json old mode 100644 new mode 100755 similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/default/i18n/en-US.json rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/i18n/en-US.json diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/default/i18n/zh-CN.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/i18n/zh-CN.json old mode 100644 new mode 100755 similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/default/i18n/zh-CN.json rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/i18n/zh-CN.json diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/default/pages/index/index.css b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/pages/index/index.css old mode 100644 new mode 100755 similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/default/pages/index/index.css rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/pages/index/index.css diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/default/pages/index/index.hml b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/pages/index/index.hml old mode 100644 new mode 100755 similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/default/pages/index/index.hml rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/pages/index/index.hml diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/pages/index/index.js old mode 100644 new mode 100755 similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/default/pages/index/index.js rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/default/pages/index/index.js diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzArray.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzArray.test.js new file mode 100755 index 000000000..1f03a9907 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzArray.test.js @@ -0,0 +1,1470 @@ +/* + * 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, REPEAT_COUNT} from './getParam.js' + +const TIMEOUT = 8000; +describe('ActsFormFuzzArrayTest', function () { + console.log("ActsFormFuzzArrayTest===start"); + for (var i = 0; i < REPEAT_COUNT; i++) { + + /** + * @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/actsformfuzztest/entry/src/main/js/test/FormFuzzBool.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzBool.test.js new file mode 100755 index 000000000..cda0d642a --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzBool.test.js @@ -0,0 +1,1468 @@ +/* + * 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, REPEAT_COUNT} from './getParam.js' + +const TIMEOUT = 8000; +describe('ActsFormFuzzBoolTest', function () { + console.log("ActsFormFuzzBoolTest===start"); + for (var i = 0; i < REPEAT_COUNT; i++) { + + /** + * @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/actsformfuzztest/entry/src/main/js/test/FormFuzzFunction.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzFunction.test.js new file mode 100755 index 000000000..e17902883 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzFunction.test.js @@ -0,0 +1,1468 @@ +/* + * 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, REPEAT_COUNT} from './getParam.js' + +const TIMEOUT = 8000; +describe('ActsFormFuzzFunctionTest', function () { + console.log("ActsFormFuzzFunctionTest===start"); + for (var i = 0; i < REPEAT_COUNT; i++) { + + /** + * @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/actsformfuzztest/entry/src/main/js/test/FormFuzzNull.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzNull.test.js new file mode 100755 index 000000000..11f7c3cb1 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzNull.test.js @@ -0,0 +1,1468 @@ +/* + * 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, REPEAT_COUNT} from './getParam.js' + +const TIMEOUT = 8000; +describe('ActsFormFuzzNullTest', function () { + console.log("ActsFormFuzzNullTest===start"); + for (var i = 0; i < REPEAT_COUNT; i++) { + + /** + * @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/actsformfuzztest/entry/src/main/js/test/FormFuzzNum.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzNum.test.js new file mode 100755 index 000000000..7a30945aa --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzNum.test.js @@ -0,0 +1,1468 @@ +/* + * 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, REPEAT_COUNT} from './getParam.js' + +const TIMEOUT = 8000; +describe('ActsFormFuzzNumTest', function () { + console.log("ActsFormFuzzNumTest===start"); + for (var i = 0; i < REPEAT_COUNT; i++) { + + /** + * @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/actsformfuzztest/entry/src/main/js/test/FormFuzzObject.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzObject.test.js new file mode 100755 index 000000000..82b157175 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzObject.test.js @@ -0,0 +1,1468 @@ +/* + * 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, REPEAT_COUNT} from './getParam.js' + +const TIMEOUT = 8000; +describe('ActsFormFuzzObjectTest', function () { + console.log("ActsFormFuzzObjectTest===start"); + for (var i = 0; i < REPEAT_COUNT; i++) { + + /** + * @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/actsformfuzztest/entry/src/main/js/test/FormFuzzString.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzString.test.js new file mode 100755 index 000000000..7a236db92 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzString.test.js @@ -0,0 +1,1570 @@ +/* + * 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, REPEAT_COUNT} from './getParam.js' + +const TIMEOUT = 8000; +describe('ActsFormFuzzStringTest', function () { + console.log("ActsFormFuzzStringTest===start"); + for (var i = 0; i < REPEAT_COUNT; i++) { + + /** + * @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 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_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(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); + } + + 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(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); + } + + 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(e.message.indexOf("type of getAllFormsInfo is incorrect") > -1).assertTrue(); + } + + 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)); + + formManager.getFormsInfo(bundleName).then((err) => { + console.log("FMS_fuzzTestString_1300_promise async::sucess err:" + err); + expect(err).assertEqual(0); + console.log("FMS_fuzzTestString_1300_promise deleteForm 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/actsformfuzztest/entry/src/main/js/test/FormFuzzUndefined.test.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzUndefined.test.js new file mode 100755 index 000000000..fa780d409 --- /dev/null +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/FormFuzzUndefined.test.js @@ -0,0 +1,1468 @@ +/* + * 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, REPEAT_COUNT} from './getParam.js' + +const TIMEOUT = 8000; +describe('ActsFormFuzzUndefinedTest', function () { + console.log("ActsFormFuzzUndefinedTest===start"); + for (var i = 0; i < REPEAT_COUNT; i++) { + + /** + * @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/actsformfuzztest/entry/src/main/js/test/List.test.js old mode 100644 new mode 100755 similarity index 65% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/List.test.js rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/List.test.js index 182052736..3ac51cdb4 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/List.test.js +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/List.test.js @@ -13,11 +13,11 @@ * limitations under the License. */ -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 +require('./FormFuzzArray.test.js') +require('./FormFuzzBool.test.js') +require('./FormFuzzFunction.test.js') +require('./FormFuzzNull.test.js') +require('./FormFuzzNum.test.js') +require('./FormFuzzObject.test.js') +require('./FormFuzzString.test.js') +require('./FormFuzzUndefined.test.js') diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/getParam.js b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/getParam.js old mode 100644 new mode 100755 similarity index 98% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/getParam.js rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/getParam.js index b14cc4ff5..e2a71cd90 --- a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/js/test/getParam.js +++ b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/js/test/getParam.js @@ -12,6 +12,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +export const REPEAT_COUNT = 2; + var RANDOM_BEGIN_POSITION = 0; var RANDOM_BEGIN_POSITION_A = 2; var STRING_RANDOM_LENGTH = 2064; @@ -68,31 +71,31 @@ const stringTest = function() { } 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() { 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; -} +}; // undefined const undefinedTest = function() { console.log("The undefinedTest of this fuzzTest random" ); return undefined; -} +}; // return array random, the array value is: string,number,bool const arrayTest = function() { @@ -120,7 +123,7 @@ const arrayTest = function() { } console.log("The arrayTest of this fuzzTest random:" + arrValue); return arrValue; -} +}; // return objectTest random, the objectTest value is: null, not null const objectTest = function() { @@ -130,7 +133,7 @@ const objectTest = function() { console.log("The objectTest of this fuzzTest random" ); return getIntegerRandom(RANDOM_BEGIN_POSITION, OBJECT_RANDOM_LENGTH) ? objectA: objectB; -} +}; // return functionTest random, the functionTest value is: null, not null const functionTest = function() { @@ -139,7 +142,7 @@ const functionTest = function() { console.log("The functionTest of this fuzzTest random" ); return getIntegerRandom(RANDOM_BEGIN_POSITION, FUNCTION_RANDOM_LENGTH) ? functionA: functionB; -} +}; export { stringTest, numberTest, booleanTest, nullTest, undefinedTest, objectTest, arrayTest, functionTest diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/resources/base/element/string.json old mode 100644 new mode 100755 similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/resources/base/element/string.json rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/resources/base/element/string.json diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/resources/base/media/icon.png b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/resources/base/media/icon.png old mode 100644 new mode 100755 similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/entry/src/main/resources/base/media/icon.png rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/entry/src/main/resources/base/media/icon.png diff --git a/aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/signature/openharmony_sx.p7b old mode 100644 new mode 100755 similarity index 100% rename from aafwk/aafwk_standard/formmanager/formsystemtesthost/FormFuzzTest/signature/openharmony_sx.p7b rename to aafwk/aafwk_standard/formmanager/formsystemtesthost/actsformfuzztest/signature/openharmony_sx.p7b diff --git a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/config.json b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/config.json old mode 100644 new mode 100755 index 2d4552a93..39e71e7fe --- a/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/config.json +++ b/aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicec/src/main/config.json @@ -66,28 +66,6 @@ } ] } - }, - { - "name": "FormC_Js002", - "description": "form_description", - "isDefault": true, - "type": "JS", - "colorMode": "auto", - "supportDimensions":[ "1*2", "2*2" ], - "defaultDimension": "1*2", - "updateEnabled": true, - "updateDuration": 1, - "scheduledUpdateTime": "10:30", - "jsComponentName": "card", - "formVisibleNotify" : true, - "metaData": { - "customizeData": [ - { - "name": "originWidgetName", - "value": "myTest" - } - ] - } } ] } -- GitLab