From 06f51cd6a10a9494795404ae1dea7137c5e22840 Mon Sep 17 00:00:00 2001 From: qth2hi Date: Wed, 4 Oct 2023 17:43:16 +0200 Subject: [PATCH 1/7] Added self test cases JPP_0507 , JPP_0508, JPP_0509 based on latest issues Caution: Self test does not run until the issues are not solved! https://github.com/test-fullautomation/robotframework-testsuitesmanagement/issues/223 https://github.com/test-fullautomation/robotframework-testsuitesmanagement/issues/224 https://github.com/test-fullautomation/robotframework-testsuitesmanagement/issues/225 --- test/JPP_TestUsecases.csv | 3 + test/JPP_TestUsecases.html | 121 ++++++++++++++++-- test/JPP_TestUsecases.rst | 32 ++++- test/JPP_TestUsecases.txt | 14 +- test/component_test.py | 4 +- .../test_07_COMPOSITE_EXPRESSIONS_GOODCASE.py | 26 +++- test/testconfig/TestConfig.py | 57 ++++++++- test/testfiles/jpp-test_config_0507.jsonp | 22 ++++ test/testfiles/jpp-test_config_0508.jsonp | 20 +++ test/testfiles/jpp-test_config_0509.jsonp | 23 ++++ 10 files changed, 302 insertions(+), 20 deletions(-) create mode 100644 test/testfiles/jpp-test_config_0507.jsonp create mode 100644 test/testfiles/jpp-test_config_0508.jsonp create mode 100644 test/testfiles/jpp-test_config_0509.jsonp diff --git a/test/JPP_TestUsecases.csv b/test/JPP_TestUsecases.csv index 0ffcf96b..1be07bd2 100644 --- a/test/JPP_TestUsecases.csv +++ b/test/JPP_TestUsecases.csv @@ -41,6 +41,9 @@ JPP_0501|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file with composite data structure JPP_0502|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file with composite data structure (nested lists and dictionaries 3 / some key names with dots inside) JPP_0505|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file with composite strings containing several times a colon and a comma (JSON syntax elements) JPP_0506|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file with composite strings containing several combinations of curly brackets and special characters before +JPP_0507|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file containing several string concatenations in separate lines (1) +JPP_0508|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file containing several string concatenations in separate lines (2) +JPP_0509|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file containing several parameter assignments in separate lines (different syntax) JPP_0550|COMPOSITE_EXPRESSIONS|BADCASE|JSON file with composite data structure (nested lists and dictionaries / some key names with dots inside) JPP_0900|COMMON_SYNTAX_VIOLATIONS|GOODCASE|JSON file with syntax error, that is commented out JPP_0950|COMMON_SYNTAX_VIOLATIONS|BADCASE|JSON file with syntax error (1) diff --git a/test/JPP_TestUsecases.html b/test/JPP_TestUsecases.html index 42e3616d..0aef25be 100644 --- a/test/JPP_TestUsecases.html +++ b/test/JPP_TestUsecases.html @@ -1407,6 +1407,105 @@ 42 + + + +JPP_0507 + + + + +COMPOSITE_EXPRESSIONS + + + + +GOODCASE + + + + +JSON file containing several string concatenations in separate lines (1)
+Expected: JsonPreprocessor returns expected value + + +
+ + + + + + + +43 + + + + + +JPP_0508 + + + + +COMPOSITE_EXPRESSIONS + + + + +GOODCASE + + + + +JSON file containing several string concatenations in separate lines (2)
+Expected: JsonPreprocessor returns expected value + + +
+ + + + + + + +44 + + + + + +JPP_0509 + + + + +COMPOSITE_EXPRESSIONS + + + + +GOODCASE + + + + +JSON file containing several parameter assignments in separate lines (different syntax)
+Expected: JsonPreprocessor returns expected value + + +
+ + + + + + + +45 + + @@ -1438,7 +1537,7 @@ -43 +46 @@ -1471,7 +1570,7 @@ -44 +47 @@ -1504,7 +1603,7 @@ -45 +48 @@ -1537,7 +1636,7 @@ -46 +49 @@ -1570,7 +1669,7 @@ -47 +50 @@ -1603,7 +1702,7 @@ -48 +51 @@ -1636,7 +1735,7 @@ -49 +52 @@ -1669,7 +1768,7 @@ -50 +53 @@ -1702,7 +1801,7 @@ -51 +54 @@ -1735,7 +1834,7 @@ -52 +55 @@ -1769,7 +1868,7 @@
 

-
Generated: 29.09.2023 - 15:06:38
+
Generated: 04.10.2023 - 17:39:40
 
diff --git a/test/JPP_TestUsecases.rst b/test/JPP_TestUsecases.rst index 2ee51968..728307cc 100644 --- a/test/JPP_TestUsecases.rst +++ b/test/JPP_TestUsecases.rst @@ -465,6 +465,36 @@ Test Use Cases ---- +* **Test JPP_0507** + + [COMPOSITE_EXPRESSIONS / GOODCASE] + + **JSON file containing several string concatenations in separate lines (1)** + + Expected: JsonPreprocessor returns expected value + +---- + +* **Test JPP_0508** + + [COMPOSITE_EXPRESSIONS / GOODCASE] + + **JSON file containing several string concatenations in separate lines (2)** + + Expected: JsonPreprocessor returns expected value + +---- + +* **Test JPP_0509** + + [COMPOSITE_EXPRESSIONS / GOODCASE] + + **JSON file containing several parameter assignments in separate lines (different syntax)** + + Expected: JsonPreprocessor returns expected value + +---- + * **Test JPP_0550** [COMPOSITE_EXPRESSIONS / BADCASE] @@ -579,5 +609,5 @@ Test Use Cases ---- -Generated: 29.09.2023 - 15:06:38 +Generated: 04.10.2023 - 17:39:40 diff --git a/test/JPP_TestUsecases.txt b/test/JPP_TestUsecases.txt index 55c3f693..c75bd690 100644 --- a/test/JPP_TestUsecases.txt +++ b/test/JPP_TestUsecases.txt @@ -199,6 +199,18 @@ Test JPP_0506 / COMPOSITE_EXPRESSIONS / GOODCASE Description: JSON file with composite strings containing several combinations of curly brackets and special characters before Expectation: JsonPreprocessor returns expected value ------------------------------------------------------------------------------------------------------------------------ +Test JPP_0507 / COMPOSITE_EXPRESSIONS / GOODCASE +Description: JSON file containing several string concatenations in separate lines (1) +Expectation: JsonPreprocessor returns expected value +------------------------------------------------------------------------------------------------------------------------ +Test JPP_0508 / COMPOSITE_EXPRESSIONS / GOODCASE +Description: JSON file containing several string concatenations in separate lines (2) +Expectation: JsonPreprocessor returns expected value +------------------------------------------------------------------------------------------------------------------------ +Test JPP_0509 / COMPOSITE_EXPRESSIONS / GOODCASE +Description: JSON file containing several parameter assignments in separate lines (different syntax) +Expectation: JsonPreprocessor returns expected value +------------------------------------------------------------------------------------------------------------------------ Test JPP_0550 / COMPOSITE_EXPRESSIONS / BADCASE Description: JSON file with composite data structure (nested lists and dictionaries / some key names with dots inside) Expectation: No values are returned, and JsonPreprocessor throws an exception @@ -245,5 +257,5 @@ Description: Relative path to JSON file Expectation: JsonPreprocessor resolves the relative path and returns values from JSON file Hint.......: Works with raw path to JSON file (path not normalized internally) ------------------------------------------------------------------------------------------------------------------------ -Generated: 29.09.2023 - 15:06:38 +Generated: 04.10.2023 - 17:39:40 diff --git a/test/component_test.py b/test/component_test.py index fcc66d8d..9966a4e6 100644 --- a/test/component_test.py +++ b/test/component_test.py @@ -22,8 +22,8 @@ # # -------------------------------------------------------------------------------------------------------------- # -VERSION = "0.12.0" -VERSION_DATE = "29.09.2023" +VERSION = "0.13.0" +VERSION_DATE = "04.10.2023" # # -------------------------------------------------------------------------------------------------------------- #TM*** diff --git a/test/pytest/pytestfiles/test_07_COMPOSITE_EXPRESSIONS_GOODCASE.py b/test/pytest/pytestfiles/test_07_COMPOSITE_EXPRESSIONS_GOODCASE.py index 10c293ce..1c77f1d2 100644 --- a/test/pytest/pytestfiles/test_07_COMPOSITE_EXPRESSIONS_GOODCASE.py +++ b/test/pytest/pytestfiles/test_07_COMPOSITE_EXPRESSIONS_GOODCASE.py @@ -18,7 +18,7 @@ # # XC-CT/ECA3-Queckenstedt # -# 28.09.2023 - 11:51:44 +# 04.10.2023 - 17:39:40 # # -------------------------------------------------------------------------------------------------------------- @@ -69,4 +69,28 @@ def test_JPP_0505(self, Description): def test_JPP_0506(self, Description): nReturn = CExecute.Execute("JPP_0506") assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns expected value + @pytest.mark.parametrize( + "Description", ["JSON file containing several string concatenations in separate lines (1)",] + ) + def test_JPP_0507(self, Description): + nReturn = CExecute.Execute("JPP_0507") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns expected value + @pytest.mark.parametrize( + "Description", ["JSON file containing several string concatenations in separate lines (2)",] + ) + def test_JPP_0508(self, Description): + nReturn = CExecute.Execute("JPP_0508") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns expected value + @pytest.mark.parametrize( + "Description", ["JSON file containing several parameter assignments in separate lines (different syntax)",] + ) + def test_JPP_0509(self, Description): + nReturn = CExecute.Execute("JPP_0509") + assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- diff --git a/test/testconfig/TestConfig.py b/test/testconfig/TestConfig.py index 814d1b00..697e96d8 100644 --- a/test/testconfig/TestConfig.py +++ b/test/testconfig/TestConfig.py @@ -22,7 +22,7 @@ # # -------------------------------------------------------------------------------------------------------------- # -# 29.09.2023 +# 04.10.2023 # # !!! Temporarily tests are deactivated by the following line commented out: # # # listofdictUsecases.append(dictUsecase) @@ -1861,6 +1861,55 @@ listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0507" +dictUsecase['DESCRIPTION'] = "JSON file containing several string concatenations in separate lines (1)" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['SECTION'] = "COMPOSITE_EXPRESSIONS" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0507.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DICT] (1/1) > {teststring_1} [STR] : 'prefix.teststring_1.value.suffix-1.suffix-2.suffix-3' +""" +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0508" +dictUsecase['DESCRIPTION'] = "JSON file containing several string concatenations in separate lines (2)" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['SECTION'] = "COMPOSITE_EXPRESSIONS" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0508.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DICT] (1/1) > {teststring_1} [STR] : 'teststring_1.value.suffix_1' +""" +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +# can be combined with previous test cases after issue is solved +dictUsecase['TESTID'] = "JPP_0509" +dictUsecase['DESCRIPTION'] = "JSON file containing several parameter assignments in separate lines (different syntax)" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['SECTION'] = "COMPOSITE_EXPRESSIONS" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0509.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DICT] (1/1) > {teststring} [STR] : 'teststring.value.5' +""" +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0550" @@ -2036,10 +2085,10 @@ # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_1200" -# In all other use cases the path 'JSONFILE' is normalized before the JsonPreprocessor is called. +# In all other use cases the path 'JSONFILE' is normalized by the self test (component_test.py) before the JsonPreprocessor is called. # The reference for relative paths is the position of this file. -# In this use case the path 'JSONFILE' is not normalized. -# And the path is relative to the position of the executing script (component_test.py). +# In this use case the path 'JSONFILE' is not normalized by the self test. +# Therefore the path must be relative to the position of the executing script (in this case: component_test.py). dictUsecase['DESCRIPTION'] = "Relative path to JSON file" dictUsecase['EXPECTATION'] = "JsonPreprocessor resolves the relative path and returns values from JSON file" dictUsecase['SECTION'] = "PATH_FORMATS" diff --git a/test/testfiles/jpp-test_config_0507.jsonp b/test/testfiles/jpp-test_config_0507.jsonp new file mode 100644 index 00000000..97775dfb --- /dev/null +++ b/test/testfiles/jpp-test_config_0507.jsonp @@ -0,0 +1,22 @@ +// Copyright 2020-2023 Robert Bosch GmbH +// +// 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. +//************************************************************************** +{ + // reference: https://github.com/test-fullautomation/robotframework-testsuitesmanagement/issues/223 + // + "teststring_1" : "teststring_1.value", + ${teststring_1} : "${teststring_1}.suffix_1", + ${teststring_1} : "${teststring_1}.suffix-2", + ${teststring_1} : "prefix.${teststring_1}.suffix-3" +} diff --git a/test/testfiles/jpp-test_config_0508.jsonp b/test/testfiles/jpp-test_config_0508.jsonp new file mode 100644 index 00000000..b86ccc3f --- /dev/null +++ b/test/testfiles/jpp-test_config_0508.jsonp @@ -0,0 +1,20 @@ +// Copyright 2020-2023 Robert Bosch GmbH +// +// 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. +//************************************************************************** +{ + // reference: https://github.com/test-fullautomation/robotframework-testsuitesmanagement/issues/225 + // + "teststring_1" : "teststring_1.value", + "teststring_1" : "${teststring_1}.suffix_1" +} diff --git a/test/testfiles/jpp-test_config_0509.jsonp b/test/testfiles/jpp-test_config_0509.jsonp new file mode 100644 index 00000000..3c74878c --- /dev/null +++ b/test/testfiles/jpp-test_config_0509.jsonp @@ -0,0 +1,23 @@ +// Copyright 2020-2023 Robert Bosch GmbH +// +// 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. +//************************************************************************** +{ + // reference: https://github.com/test-fullautomation/robotframework-testsuitesmanagement/issues/224 + // + "teststring" : "teststring.value.1", + ${teststring} : "teststring.value.2", + "teststring" : "teststring.value.3", + ${teststring} : "teststring.value.4", + "teststring" : "teststring.value.5" +} From 94242ccbeb66ddb71296eb809348aa5c177d73c1 Mon Sep 17 00:00:00 2001 From: mas2hc Date: Thu, 5 Oct 2023 14:45:22 +0700 Subject: [PATCH 2/7] Improve overwrite parameter methodology --- JsonPreprocessor/CJsonPreprocessor.py | 79 ++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 2 deletions(-) diff --git a/JsonPreprocessor/CJsonPreprocessor.py b/JsonPreprocessor/CJsonPreprocessor.py index b8af5876..e687f041 100644 --- a/JsonPreprocessor/CJsonPreprocessor.py +++ b/JsonPreprocessor/CJsonPreprocessor.py @@ -251,7 +251,19 @@ def __processImportFiles(self, input_data : dict) -> dict: tmpOutdict = copy.deepcopy(out_dict) for k1, v1 in tmpOutdict.items(): if k1 == key: - del out_dict[k1] + if isinstance(out_dict[key], list): + if out_dict[key][0] != "__handleDuplicatedKey__": + tmpValue = ["__handleDuplicatedKey__", out_dict[key], value] + del out_dict[key] + else: + tmpValue = out_dict[key] + tmpValue.append(value) + del out_dict[key] + else: + tmpValue = ["__handleDuplicatedKey__", out_dict[key], value] + del out_dict[key] + value = tmpValue + out_dict[key] = value del tmpOutdict out_dict[key] = value return out_dict @@ -781,6 +793,68 @@ def __handleListElements(sInput : str) -> str: else: newItem = newItem + self.__checkAndUpdateKeyValue(item) return newItem + + def __handleDuplicatedKey(dInput : dict) -> dict: + tmpDict = copy.deepcopy(dInput) + for k, v in tmpDict.items(): + if isinstance(v, list) and v[0]=="__handleDuplicatedKey__": + tmpPattern = "\${\s*" + k + "\s*}|\${\s*" + k + "\.|\[\s*'"+ k + "'\s*\]|\." + k + "\.*" + if not re.search(pattern, str(v[-1])) or not re.search(tmpPattern, str(v[-1])): + dInput[k] = v[-1] + continue + else: + bRecursiveKey = False + i=2 + value = v[1] + tmpValue = copy.deepcopy(v) + while i < len(v): + if not re.search(pattern, str(v[i])): + value = v[i] + else: + tmpList = re.findall("(" + pattern + ")", str(v[i])) + for item in tmpList: + if re.search(tmpPattern, item[0]): + bRecursiveKey = True + break + if bRecursiveKey: + recursiveKey = v[i] + break + else: + value = v[i] + tmpValue.pop(1) + i+=1 + if bRecursiveKey: + k1 = k + "__RecursiveInitialValue__" + dInput[k1] = value + v = recursiveKey + if isinstance(v, list): + tmpList = [] + for item in v: + if isinstance(item, str) and re.search(tmpPattern, item): + item = re.sub(k, k1, item) + tmpList.append(item) + v = tmpList + else: + v = re.sub(k, k1, v) + dInput[k] = v + else: + dInput[k] = v[-1] + if isinstance(v, dict): + dInput[k] = __handleDuplicatedKey(v) + del tmpDict + return dInput + + def __removeDuplicatedKey(dInput : dict) -> dict: + if isinstance(dInput, dict): + for k, v in list(dInput.items()): + if "__RecursiveInitialValue__" in k: + del dInput[k] + else: + __removeDuplicatedKey(v) + elif isinstance(dInput, list): + for item in dInput: + __removeDuplicatedKey(item) + jFile = CString.NormalizePath(jFile, sReferencePathAbs=os.path.dirname(sys.argv[0])) if not(os.path.isfile(jFile)): @@ -878,6 +952,7 @@ def __handleListElements(sInput : str) -> str: self.__checkDotInParamName(oJson) if masterFile: + oJson = __handleDuplicatedKey(oJson) for k, v in oJson.items(): if k in self.lDataTypes: k = "JPavoidDataType_" + k @@ -923,5 +998,5 @@ def __handleListElements(sInput : str) -> str: raise Exception(f"The variable '{parseNestedParam[0]}' is not available!") self.__reset() - + __removeDuplicatedKey(oJson) return oJson From dc266f9e2b2b436923e63809b7dc63475c0ba394 Mon Sep 17 00:00:00 2001 From: qth2hi Date: Thu, 5 Oct 2023 14:34:54 +0200 Subject: [PATCH 3/7] Extended self test JPP_1000; added self test JPP_1001 Caution: Self test does not run until the issues are not solved! --- test/JPP_TestUsecases.csv | 1 + test/JPP_TestUsecases.html | 39 +++++++++++++++-- test/JPP_TestUsecases.rst | 12 +++++- test/JPP_TestUsecases.txt | 6 ++- test/component_test.py | 4 +- .../test_11_IMPLICIT_CREATION_GOODCASE.py | 10 ++++- test/testconfig/TestConfig.py | 42 ++++++++++++++----- ...pp-test_config_implicit_creation.1.1.jsonp | 8 +++- test/testfiles/jpp-test_config_0508.jsonp | 2 - test/testfiles/jpp-test_config_1001.jsonp | 33 +++++++++++++++ 10 files changed, 134 insertions(+), 23 deletions(-) create mode 100644 test/testfiles/jpp-test_config_1001.jsonp diff --git a/test/JPP_TestUsecases.csv b/test/JPP_TestUsecases.csv index 1be07bd2..fa3892b8 100644 --- a/test/JPP_TestUsecases.csv +++ b/test/JPP_TestUsecases.csv @@ -52,6 +52,7 @@ JPP_0952|COMMON_SYNTAX_VIOLATIONS|BADCASE|JSON file with syntax error (3) JPP_0953|COMMON_SYNTAX_VIOLATIONS|BADCASE|JSON file with syntax error (4): file is completely empty JPP_0954|COMMON_SYNTAX_VIOLATIONS|BADCASE|JSON file with syntax error (5): file is empty (multiple pairs of brackets only) JPP_1000|IMPLICIT_CREATION|GOODCASE|JSON file with dictionary keys to be created implicitly +JPP_1001|IMPLICIT_CREATION|GOODCASE|JSON file with dictionary keys to be created implicitly (same key names at all levels) JPP_1150|CYCLIC_IMPORTS|BADCASE|JSON file with cyclic imports (JSON file imports itself) JPP_1151|CYCLIC_IMPORTS|BADCASE|JSON file with cyclic imports (JSON file imports another file, that is already imported) JPP_1200|PATH_FORMATS|GOODCASE|Relative path to JSON file diff --git a/test/JPP_TestUsecases.html b/test/JPP_TestUsecases.html index 0aef25be..2031a0d6 100644 --- a/test/JPP_TestUsecases.html +++ b/test/JPP_TestUsecases.html @@ -1771,6 +1771,39 @@ 53
+ + + +JPP_1001 + + + + +IMPLICIT_CREATION + + + + +GOODCASE + + + + +JSON file with dictionary keys to be created implicitly (same key names at all levels)
+Expected: JsonPreprocessor returns values + + +
+ + + + + + + +54 + + @@ -1801,7 +1834,7 @@ -54 +55 @@ -1834,7 +1867,7 @@ -55 +56 @@ -1868,7 +1901,7 @@
 

-
Generated: 04.10.2023 - 17:39:40
+
Generated: 05.10.2023 - 14:27:01
 
diff --git a/test/JPP_TestUsecases.rst b/test/JPP_TestUsecases.rst index 728307cc..68288a6f 100644 --- a/test/JPP_TestUsecases.rst +++ b/test/JPP_TestUsecases.rst @@ -577,6 +577,16 @@ Test Use Cases ---- +* **Test JPP_1001** + + [IMPLICIT_CREATION / GOODCASE] + + **JSON file with dictionary keys to be created implicitly (same key names at all levels)** + + Expected: JsonPreprocessor returns values + +---- + * **Test JPP_1150** [CYCLIC_IMPORTS / BADCASE] @@ -609,5 +619,5 @@ Test Use Cases ---- -Generated: 04.10.2023 - 17:39:40 +Generated: 05.10.2023 - 14:27:01 diff --git a/test/JPP_TestUsecases.txt b/test/JPP_TestUsecases.txt index c75bd690..32a31a5f 100644 --- a/test/JPP_TestUsecases.txt +++ b/test/JPP_TestUsecases.txt @@ -244,6 +244,10 @@ Test JPP_1000 / IMPLICIT_CREATION / GOODCASE Description: JSON file with dictionary keys to be created implicitly Expectation: JsonPreprocessor returns values ------------------------------------------------------------------------------------------------------------------------ +Test JPP_1001 / IMPLICIT_CREATION / GOODCASE +Description: JSON file with dictionary keys to be created implicitly (same key names at all levels) +Expectation: JsonPreprocessor returns values +------------------------------------------------------------------------------------------------------------------------ Test JPP_1150 / CYCLIC_IMPORTS / BADCASE Description: JSON file with cyclic imports (JSON file imports itself) Expectation: No values are returned, and JsonPreprocessor throws an exception @@ -257,5 +261,5 @@ Description: Relative path to JSON file Expectation: JsonPreprocessor resolves the relative path and returns values from JSON file Hint.......: Works with raw path to JSON file (path not normalized internally) ------------------------------------------------------------------------------------------------------------------------ -Generated: 04.10.2023 - 17:39:40 +Generated: 05.10.2023 - 14:27:01 diff --git a/test/component_test.py b/test/component_test.py index 9966a4e6..56775a4a 100644 --- a/test/component_test.py +++ b/test/component_test.py @@ -22,8 +22,8 @@ # # -------------------------------------------------------------------------------------------------------------- # -VERSION = "0.13.0" -VERSION_DATE = "04.10.2023" +VERSION = "0.14.0" +VERSION_DATE = "05.10.2023" # # -------------------------------------------------------------------------------------------------------------- #TM*** diff --git a/test/pytest/pytestfiles/test_11_IMPLICIT_CREATION_GOODCASE.py b/test/pytest/pytestfiles/test_11_IMPLICIT_CREATION_GOODCASE.py index 21ea46e1..f4f95f6f 100644 --- a/test/pytest/pytestfiles/test_11_IMPLICIT_CREATION_GOODCASE.py +++ b/test/pytest/pytestfiles/test_11_IMPLICIT_CREATION_GOODCASE.py @@ -18,7 +18,7 @@ # # XC-CT/ECA3-Queckenstedt # -# 13.09.2023 - 10:58:36 +# 05.10.2023 - 14:27:02 # # -------------------------------------------------------------------------------------------------------------- @@ -37,4 +37,12 @@ class Test_IMPLICIT_CREATION_GOODCASE: def test_JPP_1000(self, Description): nReturn = CExecute.Execute("JPP_1000") assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns values + @pytest.mark.parametrize( + "Description", ["JSON file with dictionary keys to be created implicitly (same key names at all levels)",] + ) + def test_JPP_1001(self, Description): + nReturn = CExecute.Execute("JPP_1001") + assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- diff --git a/test/testconfig/TestConfig.py b/test/testconfig/TestConfig.py index 697e96d8..ccdd4bf4 100644 --- a/test/testconfig/TestConfig.py +++ b/test/testconfig/TestConfig.py @@ -22,7 +22,7 @@ # # -------------------------------------------------------------------------------------------------------------- # -# 04.10.2023 +# 05.10.2023 # # !!! Temporarily tests are deactivated by the following line commented out: # # # listofdictUsecases.append(dictUsecase) @@ -2039,16 +2039,36 @@ dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1000.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None dictUsecase['EXPECTEDRETURN'] = """ -[DICT] (2/1) > {dTestDict} [DICT] (4/1) > {kVal_1} [STR] : 'Val_1' -[DICT] (2/1) > {dTestDict} [DICT] (4/2) > {kVal_2} [DICT] (1/1) > {I-am-not-existing-1} [DICT] (1/1) > {I-am-not-existing-2} [STR] : 'Val_1' -[DICT] (2/1) > {dTestDict} [DICT] (4/3) > {kVal_3} [DICT] (1/1) > {I-am-not-existing-3} [DICT] (1/1) > {I-am-not-existing-4} [STR] : 'Val_1' -[DICT] (2/1) > {dTestDict} [DICT] (4/4) > {kVal_4} [DICT] (1/1) > {kVal_4B} [DICT] (1/1) > {kVal_4C} [DICT] (3/1) > {A} [INT] : 1 -[DICT] (2/1) > {dTestDict} [DICT] (4/4) > {kVal_4} [DICT] (1/1) > {kVal_4B} [DICT] (1/1) > {kVal_4C} [DICT] (3/2) > {B} [LIST] (2/1) > [INT] : 1 -[DICT] (2/1) > {dTestDict} [DICT] (4/4) > {kVal_4} [DICT] (1/1) > {kVal_4B} [DICT] (1/1) > {kVal_4C} [DICT] (3/2) > {B} [LIST] (2/2) > [INT] : 2 -[DICT] (2/1) > {dTestDict} [DICT] (4/4) > {kVal_4} [DICT] (1/1) > {kVal_4B} [DICT] (1/1) > {kVal_4C} [DICT] (3/3) > {kVal_4D} [DICT] (1/1) > {kVal_4E} [DICT] (1/1) > {kVal_4F} [DICT] (1/1) > {kVal_4G} [DICT] (2/1) > {C} [INT] : 2 -[DICT] (2/1) > {dTestDict} [DICT] (4/4) > {kVal_4} [DICT] (1/1) > {kVal_4B} [DICT] (1/1) > {kVal_4C} [DICT] (3/3) > {kVal_4D} [DICT] (1/1) > {kVal_4E} [DICT] (1/1) > {kVal_4F} [DICT] (1/1) > {kVal_4G} [DICT] (2/2) > {D} [LIST] (2/1) > [INT] : 3 -[DICT] (2/1) > {dTestDict} [DICT] (4/4) > {kVal_4} [DICT] (1/1) > {kVal_4B} [DICT] (1/1) > {kVal_4C} [DICT] (3/3) > {kVal_4D} [DICT] (1/1) > {kVal_4E} [DICT] (1/1) > {kVal_4F} [DICT] (1/1) > {kVal_4G} [DICT] (2/2) > {D} [LIST] (2/2) > [INT] : 4 -[DICT] (2/2) > {Val_1} [STR] : 'Val_1' +[DICT] (2/1) > {dTestDict} [DICT] (5/1) > {kVal_1} [STR] : 'Val_1' +[DICT] (2/1) > {dTestDict} [DICT] (5/2) > {kVal_2} [DICT] (1/1) > {I-am-not-existing-1} [DICT] (1/1) > {I-am-not-existing-2} [STR] : 'Val_1' +[DICT] (2/1) > {dTestDict} [DICT] (5/3) > {kVal_3} [DICT] (1/1) > {I-am-not-existing-3} [DICT] (1/1) > {I-am-not-existing-4} [STR] : 'Val_1_extended' +[DICT] (2/1) > {dTestDict} [DICT] (5/4) > {kVal_3b} [DICT] (1/1) > {I-am-not-existing-3b} [DICT] (1/1) > {I-am-not-existing-4b} [STR] : 'Val_1' +[DICT] (2/1) > {dTestDict} [DICT] (5/5) > {kVal_4} [DICT] (1/1) > {kVal_4B} [DICT] (1/1) > {kVal_4C} [DICT] (3/1) > {A} [INT] : 1 +[DICT] (2/1) > {dTestDict} [DICT] (5/5) > {kVal_4} [DICT] (1/1) > {kVal_4B} [DICT] (1/1) > {kVal_4C} [DICT] (3/2) > {B} [LIST] (2/1) > [INT] : 1 +[DICT] (2/1) > {dTestDict} [DICT] (5/5) > {kVal_4} [DICT] (1/1) > {kVal_4B} [DICT] (1/1) > {kVal_4C} [DICT] (3/2) > {B} [LIST] (2/2) > [INT] : 2 +[DICT] (2/1) > {dTestDict} [DICT] (5/5) > {kVal_4} [DICT] (1/1) > {kVal_4B} [DICT] (1/1) > {kVal_4C} [DICT] (3/3) > {kVal_4D} [DICT] (1/1) > {kVal_4E} [DICT] (1/1) > {kVal_4F} [DICT] (1/1) > {kVal_4G} [DICT] (2/1) > {C} [INT] : 2 +[DICT] (2/1) > {dTestDict} [DICT] (5/5) > {kVal_4} [DICT] (1/1) > {kVal_4B} [DICT] (1/1) > {kVal_4C} [DICT] (3/3) > {kVal_4D} [DICT] (1/1) > {kVal_4E} [DICT] (1/1) > {kVal_4F} [DICT] (1/1) > {kVal_4G} [DICT] (2/2) > {D} [LIST] (2/1) > [INT] : 3 +[DICT] (2/1) > {dTestDict} [DICT] (5/5) > {kVal_4} [DICT] (1/1) > {kVal_4B} [DICT] (1/1) > {kVal_4C} [DICT] (3/3) > {kVal_4D} [DICT] (1/1) > {kVal_4E} [DICT] (1/1) > {kVal_4F} [DICT] (1/1) > {kVal_4G} [DICT] (2/2) > {D} [LIST] (2/2) > [INT] : 4 +[DICT] (2/2) > {Val_1_extended} [STR] : 'Val_1' +""" +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1001" +dictUsecase['DESCRIPTION'] = "JSON file with dictionary keys to be created implicitly (same key names at all levels)" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns values" +dictUsecase['SECTION'] = "IMPLICIT_CREATION" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1001.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DICT] (3/1) > {param1} [DICT] (1/1) > {subkey} [DICT] (1/1) > {subkey} [DICT] (1/1) > {subkey} [STR] : 'subkey value' +[DICT] (3/2) > {param2} [DICT] (1/1) > {subkey} [DICT] (1/1) > {subkey} [DICT] (1/1) > {subkey} [STR] : 'subkey value extended' +[DICT] (3/3) > {param3} [DICT] (1/1) > {subkey} [DICT] (1/1) > {subkey} [DICT] (2/1) > {paramA} [STR] : 'subkey value extended' +[DICT] (3/3) > {param3} [DICT] (1/1) > {subkey} [DICT] (1/1) > {subkey} [DICT] (2/2) > {paramB} [STR] : 'subkey value extended' """ listofdictUsecases.append(dictUsecase) del dictUsecase diff --git a/test/testfiles/import/import.1/jpp-test_config_implicit_creation.1.1.jsonp b/test/testfiles/import/import.1/jpp-test_config_implicit_creation.1.1.jsonp index 6deadfac..ffb427aa 100644 --- a/test/testfiles/import/import.1/jpp-test_config_implicit_creation.1.1.jsonp +++ b/test/testfiles/import/import.1/jpp-test_config_implicit_creation.1.1.jsonp @@ -15,7 +15,11 @@ { ${dTestDict}['kVal_2']['I-am-not-existing-1']['I-am-not-existing-2'] : ${dTestDict}['kVal_1'], + // use what has been created implicitly before + ${dTestDict.kVal_3.I-am-not-existing-3.I-am-not-existing-4} : ${dTestDict}['kVal_2']['I-am-not-existing-1']['I-am-not-existing-2'], + ${dTestDict.kVal_3b.I-am-not-existing-3b.I-am-not-existing-4b} : ${dTestDict.kVal_2.I-am-not-existing-1.I-am-not-existing-2}, // overwrite what has been created implicitly before: - ${dTestDict.kVal_3.I-am-not-existing-3.I-am-not-existing-4} : ${dTestDict}['kVal_2']['I-am-not-existing-1']['I-am-not-existing-2'], - "[import]" : "./import.1.1/jpp-test_config_implicit_creation.1.1.1.jsonp" + ${dTestDict}['kVal_3']['I-am-not-existing-3']['I-am-not-existing-4'] : "${dTestDict}['kVal_1']_extended", + // further assignments + "[import]" : "./import.1.1/jpp-test_config_implicit_creation.1.1.1.jsonp" } diff --git a/test/testfiles/jpp-test_config_0508.jsonp b/test/testfiles/jpp-test_config_0508.jsonp index b86ccc3f..b0757bdc 100644 --- a/test/testfiles/jpp-test_config_0508.jsonp +++ b/test/testfiles/jpp-test_config_0508.jsonp @@ -13,8 +13,6 @@ // limitations under the License. //************************************************************************** { - // reference: https://github.com/test-fullautomation/robotframework-testsuitesmanagement/issues/225 - // "teststring_1" : "teststring_1.value", "teststring_1" : "${teststring_1}.suffix_1" } diff --git a/test/testfiles/jpp-test_config_1001.jsonp b/test/testfiles/jpp-test_config_1001.jsonp new file mode 100644 index 00000000..bbb17486 --- /dev/null +++ b/test/testfiles/jpp-test_config_1001.jsonp @@ -0,0 +1,33 @@ +// Copyright 2020-2023 Robert Bosch GmbH +// +// 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. +//************************************************************************** + +{ + "param1" : {}, + ${param1}['subkey']['subkey']['subkey'] : "subkey value", + "param2" : {}, + ${param2.subkey.subkey.subkey} : "${param1.subkey.subkey.subkey} extended", + "param3" : { + "subkey" : { + "subkey" : { + "paramA" : "ABC", + ${param3.subkey.subkey.paramA} : "DEF", + // https://github.com/test-fullautomation/robotframework-testsuitesmanagement/issues/224 + "paramA" : ${param2.subkey.subkey.subkey}, + "paramB" : "XYZ", + ${param3.subkey.subkey.paramB} : ${param2.subkey.subkey.subkey} + } + } + } +} From 995548f0f5f0d6858aa4995c6655dc2a1b807bab Mon Sep 17 00:00:00 2001 From: mas2hc Date: Mon, 9 Oct 2023 08:52:56 +0700 Subject: [PATCH 4/7] Improve duplicated key handling for test scenario JPP_0507 and JPP_0509 --- JsonPreprocessor/CJsonPreprocessor.py | 88 ++++++++++++++------------- 1 file changed, 47 insertions(+), 41 deletions(-) diff --git a/JsonPreprocessor/CJsonPreprocessor.py b/JsonPreprocessor/CJsonPreprocessor.py index e687f041..d037a7d3 100644 --- a/JsonPreprocessor/CJsonPreprocessor.py +++ b/JsonPreprocessor/CJsonPreprocessor.py @@ -250,6 +250,12 @@ def __processImportFiles(self, input_data : dict) -> dict: else: tmpOutdict = copy.deepcopy(out_dict) for k1, v1 in tmpOutdict.items(): + pattern1 = "\${\s*[0-9A-Za-z_]+[0-9A-Za-z\.\-_]*\s*}(\[+\s*'.+'\s*\]+|\[+\s*\d+\s*\]+)*" + if re.search(pattern1, k1): + continue + pattern2 = "\${\s*" + k1 + "\s*}$|\[\s*'" + k1 + "'\s*\]$" + if re.match(pattern2, key): + key = k1 if k1 == key: if isinstance(out_dict[key], list): if out_dict[key][0] != "__handleDuplicatedKey__": @@ -605,15 +611,26 @@ def __loadNestedValue(sInputStr: str): v, bNested = self.__updateAndReplaceNestedParam(v, bNested, recursive=True) elif isinstance(v, list): - tmpValue = [] - for item in v: - if isinstance(item, str) and re.search(pattern, item.lower()): - bNested = True - while isinstance(item, str) and "${" in item: - item = __loadNestedValue(item) - - tmpValue.append(item) - v = tmpValue + if v[0] != "__handleDuplicatedKey__": + tmpValue = [] + for item in v: + if isinstance(item, str) and re.search(pattern, item.lower()): + bNested = True + while isinstance(item, str) and "${" in item: + item = __loadNestedValue(item) + + tmpValue.append(item) + v = tmpValue + else: + i=1 + while i dict: dInput[k] = v[-1] continue else: - bRecursiveKey = False - i=2 - value = v[1] - tmpValue = copy.deepcopy(v) + i=1 while i < len(v): - if not re.search(pattern, str(v[i])): - value = v[i] - else: - tmpList = re.findall("(" + pattern + ")", str(v[i])) - for item in tmpList: - if re.search(tmpPattern, item[0]): + bRecursiveKey = False + if re.search(pattern, str(v[i])): + if isinstance(v[i], str): + if re.search(tmpPattern, v[i]): + v[i] = re.sub(k, k + "__RecursiveInitialValue__" + str(i-1), v[i]) bRecursiveKey = True - break + if isinstance(v[i], list): + newList = [] + for item in v[i]: + if re.search(tmpPattern, item): + item = re.sub(k, k + "__RecursiveInitialValue__" + str(i-1), item) + bRecursiveKey = True + newList.append(item) + v[i] = newList + del newList if bRecursiveKey: - recursiveKey = v[i] - break - else: - value = v[i] - tmpValue.pop(1) - i+=1 - if bRecursiveKey: - k1 = k + "__RecursiveInitialValue__" - dInput[k1] = value - v = recursiveKey - if isinstance(v, list): - tmpList = [] - for item in v: - if isinstance(item, str) and re.search(tmpPattern, item): - item = re.sub(k, k1, item) - tmpList.append(item) - v = tmpList + k1 = k + "__RecursiveInitialValue__" + str(i) + dInput[k1] = v[i] else: - v = re.sub(k, k1, v) - dInput[k] = v - else: - dInput[k] = v[-1] + k1 = k + "__RecursiveInitialValue__" + str(i) + dInput[k1] = v[i] + i+=1 + dInput[k] = v[1] if len(v)==2 else v if isinstance(v, dict): dInput[k] = __handleDuplicatedKey(v) del tmpDict From 25c22804bc7fc9de1d7b8beaf30b1c9f7a536618 Mon Sep 17 00:00:00 2001 From: mas2hc Date: Mon, 9 Oct 2023 09:43:41 +0700 Subject: [PATCH 5/7] Tiny update a pattern to handle duplicated keys --- JsonPreprocessor/CJsonPreprocessor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/JsonPreprocessor/CJsonPreprocessor.py b/JsonPreprocessor/CJsonPreprocessor.py index d037a7d3..59b974d0 100644 --- a/JsonPreprocessor/CJsonPreprocessor.py +++ b/JsonPreprocessor/CJsonPreprocessor.py @@ -253,8 +253,8 @@ def __processImportFiles(self, input_data : dict) -> dict: pattern1 = "\${\s*[0-9A-Za-z_]+[0-9A-Za-z\.\-_]*\s*}(\[+\s*'.+'\s*\]+|\[+\s*\d+\s*\]+)*" if re.search(pattern1, k1): continue - pattern2 = "\${\s*" + k1 + "\s*}$|\[\s*'" + k1 + "'\s*\]$" - if re.match(pattern2, key): + pattern2 = "\${\s*[0-9A-Za-z\.\-_]*\.*" + k1 + "\s*}$|\[\s*'" + k1 + "'\s*\]$" + if re.search(pattern2, key): key = k1 if k1 == key: if isinstance(out_dict[key], list): From 7ab6c8edb00c1af8cd8f51cf5f022127d3c74bf5 Mon Sep 17 00:00:00 2001 From: qth2hi Date: Mon, 9 Oct 2023 11:20:08 +0200 Subject: [PATCH 6/7] Maintenance * Replaced '-' by '_' in alls tests * Activated test case JPP_0205 (successful now) --- test/JPP_TestUsecases.csv | 1 + test/JPP_TestUsecases.html | 123 ++++++---- test/JPP_TestUsecases.rst | 12 +- test/JPP_TestUsecases.txt | 6 +- test/component_test.py | 4 +- ...test_03_PARAMETER_SUBSTITUTION_GOODCASE.py | 10 +- test/testconfig/Checklist.txt | 52 ++-- test/testconfig/TestConfig.py | 228 +++++++++--------- ...-test_config_implicit_creation.1.1.1.jsonp | 2 +- ...pp-test_config_implicit_creation.1.1.jsonp | 8 +- test/testfiles/jpp-test_config_0200.jsonp | 2 +- test/testfiles/jpp-test_config_0201.jsonp | 2 +- test/testfiles/jpp-test_config_0202.jsonp | 2 +- test/testfiles/jpp-test_config_0203.jsonp | 2 +- test/testfiles/jpp-test_config_0204.jsonp | 2 +- test/testfiles/jpp-test_config_0205.jsonp | 2 +- test/testfiles/jpp-test_config_0206.jsonp | 2 +- test/testfiles/jpp-test_config_0207.jsonp | 2 +- test/testfiles/jpp-test_config_0208.jsonp | 2 +- test/testfiles/jpp-test_config_0209.jsonp | 2 +- test/testfiles/jpp-test_config_0250.jsonp | 2 +- test/testfiles/jpp-test_config_0251.jsonp | 2 +- test/testfiles/jpp-test_config_0252.jsonp | 2 +- test/testfiles/jpp-test_config_0253.jsonp | 2 +- test/testfiles/jpp-test_config_0254.jsonp | 2 +- test/testfiles/jpp-test_config_0255.jsonp | 2 +- test/testfiles/jpp-test_config_0256.jsonp | 2 +- test/testfiles/jpp-test_config_0257.jsonp | 2 +- test/testfiles/jpp-test_config_0258.jsonp | 2 +- test/testfiles/jpp-test_config_0259.jsonp | 2 +- test/testfiles/jpp-test_config_0507.jsonp | 2 +- test/testfiles/jpp-test_config_0508.jsonp | 2 +- .../jpp-test_config_testdata_1.jsonp | 14 +- 33 files changed, 280 insertions(+), 224 deletions(-) diff --git a/test/JPP_TestUsecases.csv b/test/JPP_TestUsecases.csv index fa3892b8..22f38f16 100644 --- a/test/JPP_TestUsecases.csv +++ b/test/JPP_TestUsecases.csv @@ -11,6 +11,7 @@ JPP_0201|PARAMETER_SUBSTITUTION|GOODCASE|JSON file with nested parameter / strin JPP_0202|PARAMETER_SUBSTITUTION|GOODCASE|JSON file with nested parameter / index parameter substitution in parameter name / standard notation JPP_0203|PARAMETER_SUBSTITUTION|GOODCASE|JSON file with nested parameter / index parameter substitution in parameter name / dotdict notation JPP_0204|PARAMETER_SUBSTITUTION|GOODCASE|JSON file with nested parameter / index parameter substitution in parameter value / standard notation +JPP_0205|PARAMETER_SUBSTITUTION|GOODCASE|JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation JPP_0250|PARAMETER_SUBSTITUTION|BADCASE|JSON file with nested parameter / string parameter substitution in parameter value / innermost parameter not existing JPP_0251|PARAMETER_SUBSTITUTION|BADCASE|JSON file with nested parameter / string parameter substitution in parameter name / in between parameter not existing JPP_0252|PARAMETER_SUBSTITUTION|BADCASE|JSON file with nested parameter / index parameter substitution in parameter name / standard notation / index parameter not existing diff --git a/test/JPP_TestUsecases.html b/test/JPP_TestUsecases.html index 2031a0d6..59113018 100644 --- a/test/JPP_TestUsecases.html +++ b/test/JPP_TestUsecases.html @@ -397,6 +397,39 @@ 12
+ + + +JPP_0205 + + + + +PARAMETER_SUBSTITUTION + + + + +GOODCASE + + + + +JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation
+Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string + + +
+ + + + + + + +13 + + @@ -427,7 +460,7 @@ -13 +14 @@ -460,7 +493,7 @@ -14 +15 @@ -493,7 +526,7 @@ -15 +16 @@ -526,7 +559,7 @@ -16 +17 @@ -559,7 +592,7 @@ -17 +18 @@ -592,7 +625,7 @@ -18 +19 @@ -625,7 +658,7 @@ -19 +20 @@ -658,7 +691,7 @@ -20 +21 @@ -692,7 +725,7 @@ -21 +22 @@ -726,7 +759,7 @@ -22 +23 @@ -760,7 +793,7 @@ -23 +24 @@ -794,7 +827,7 @@ -24 +25 @@ -828,7 +861,7 @@ -25 +26 @@ -862,7 +895,7 @@ -26 +27 @@ -896,7 +929,7 @@ -27 +28 @@ -930,7 +963,7 @@ -28 +29 @@ -964,7 +997,7 @@ -29 +30 @@ -998,7 +1031,7 @@ -30 +31 @@ -1032,7 +1065,7 @@ -31 +32 @@ -1066,7 +1099,7 @@ -32 +33 @@ -1100,7 +1133,7 @@ -33 +34 @@ -1134,7 +1167,7 @@ -34 +35 @@ -1168,7 +1201,7 @@ -35 +36 @@ -1202,7 +1235,7 @@ -36 +37 @@ -1236,7 +1269,7 @@ -37 +38 @@ -1270,7 +1303,7 @@ -38 +39 @@ -1304,7 +1337,7 @@ -39 +40 @@ -1338,7 +1371,7 @@ -40 +41 @@ -1371,7 +1404,7 @@ -41 +42 @@ -1404,7 +1437,7 @@ -42 +43 @@ -1437,7 +1470,7 @@ -43 +44 @@ -1470,7 +1503,7 @@ -44 +45 @@ -1503,7 +1536,7 @@ -45 +46 @@ -1537,7 +1570,7 @@ -46 +47 @@ -1570,7 +1603,7 @@ -47 +48 @@ -1603,7 +1636,7 @@ -48 +49 @@ -1636,7 +1669,7 @@ -49 +50 @@ -1669,7 +1702,7 @@ -50 +51 @@ -1702,7 +1735,7 @@ -51 +52 @@ -1735,7 +1768,7 @@ -52 +53 @@ -1768,7 +1801,7 @@ -53 +54 @@ -1801,7 +1834,7 @@ -54 +55 @@ -1834,7 +1867,7 @@ -55 +56 @@ -1867,7 +1900,7 @@ -56 +57 @@ -1901,7 +1934,7 @@
 

-
Generated: 05.10.2023 - 14:27:01
+
Generated: 09.10.2023 - 11:13:29
 
diff --git a/test/JPP_TestUsecases.rst b/test/JPP_TestUsecases.rst index 68288a6f..e7468938 100644 --- a/test/JPP_TestUsecases.rst +++ b/test/JPP_TestUsecases.rst @@ -125,6 +125,16 @@ Test Use Cases ---- +* **Test JPP_0205** + + [PARAMETER_SUBSTITUTION / GOODCASE] + + **JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation** + + Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string + +---- + * **Test JPP_0250** [PARAMETER_SUBSTITUTION / BADCASE] @@ -619,5 +629,5 @@ Test Use Cases ---- -Generated: 05.10.2023 - 14:27:01 +Generated: 09.10.2023 - 11:13:29 diff --git a/test/JPP_TestUsecases.txt b/test/JPP_TestUsecases.txt index 32a31a5f..98c16439 100644 --- a/test/JPP_TestUsecases.txt +++ b/test/JPP_TestUsecases.txt @@ -59,6 +59,10 @@ Test JPP_0204 / PARAMETER_SUBSTITUTION / GOODCASE Description: JSON file with nested parameter / index parameter substitution in parameter value / standard notation Expectation: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string ------------------------------------------------------------------------------------------------------------------------ +Test JPP_0205 / PARAMETER_SUBSTITUTION / GOODCASE +Description: JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation +Expectation: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string +------------------------------------------------------------------------------------------------------------------------ Test JPP_0250 / PARAMETER_SUBSTITUTION / BADCASE Description: JSON file with nested parameter / string parameter substitution in parameter value / innermost parameter not existing Expectation: No values are returned, and JsonPreprocessor throws an exception @@ -261,5 +265,5 @@ Description: Relative path to JSON file Expectation: JsonPreprocessor resolves the relative path and returns values from JSON file Hint.......: Works with raw path to JSON file (path not normalized internally) ------------------------------------------------------------------------------------------------------------------------ -Generated: 05.10.2023 - 14:27:01 +Generated: 09.10.2023 - 11:13:29 diff --git a/test/component_test.py b/test/component_test.py index 56775a4a..085031dd 100644 --- a/test/component_test.py +++ b/test/component_test.py @@ -22,8 +22,8 @@ # # -------------------------------------------------------------------------------------------------------------- # -VERSION = "0.14.0" -VERSION_DATE = "05.10.2023" +VERSION = "0.15.0" +VERSION_DATE = "09.10.2023" # # -------------------------------------------------------------------------------------------------------------- #TM*** diff --git a/test/pytest/pytestfiles/test_03_PARAMETER_SUBSTITUTION_GOODCASE.py b/test/pytest/pytestfiles/test_03_PARAMETER_SUBSTITUTION_GOODCASE.py index 937f94cf..e9b8ee45 100644 --- a/test/pytest/pytestfiles/test_03_PARAMETER_SUBSTITUTION_GOODCASE.py +++ b/test/pytest/pytestfiles/test_03_PARAMETER_SUBSTITUTION_GOODCASE.py @@ -18,7 +18,7 @@ # # XC-CT/ECA3-Queckenstedt # -# 13.09.2023 - 10:58:36 +# 09.10.2023 - 11:13:29 # # -------------------------------------------------------------------------------------------------------------- @@ -69,4 +69,12 @@ def test_JPP_0203(self, Description): def test_JPP_0204(self, Description): nReturn = CExecute.Execute("JPP_0204") assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor creates a new string with all dollar operator expressions resolved as string + @pytest.mark.parametrize( + "Description", ["JSON file with nested parameter / index parameter substitution in parameter value / dotdict notation",] + ) + def test_JPP_0205(self, Description): + nReturn = CExecute.Execute("JPP_0205") + assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- diff --git a/test/testconfig/Checklist.txt b/test/testconfig/Checklist.txt index 22f3ea64..81353da1 100644 --- a/test/testconfig/Checklist.txt +++ b/test/testconfig/Checklist.txt @@ -4,19 +4,19 @@ Checklist for implementation of self test cases for JsonPreprocessor / parsing c XC-CT/ECA3-Queckenstedt -28.07.2023 +09.10.2023 -------------------------------------------------------------------------------------------------------------- * Dataset used for testing // variant info -"variant_1" : "VARIANT-1", -"variant_2" : "VARIANT-2", +"variant_1" : "VARIANT_1", +"variant_2" : "VARIANT_2", "list_variant_numbers" : [1, 2], "list_variant_index" : 0, "variant_number" : "1", -"dict_variants" : {"variant_1" : "VARIANT-1", "variant_2" : "VARIANT-2"}, +"dict_variants" : {"variant_1" : "VARIANT_1", "variant_2" : "VARIANT_2"}, "variant_key_1" : "variant_1", // "INNERMOST_VARIANT_VALUE" : "RIA", @@ -24,13 +24,13 @@ XC-CT/ECA3-Queckenstedt "VARIANT" : "VARIANT", // // milestone info -"milestone_1" : "MILESTONE-1", -"milestone_2" : "MILESTONE-2", -"milestone_3" : "MILESTONE-3", +"milestone_1" : "MILESTONE_1", +"milestone_2" : "MILESTONE_2", +"milestone_3" : "MILESTONE_3", "list_milestone_numbers" : [1, 2, 3], "list_milestone_index" : 1, "milestone_number" : "2", -"dict_milestones" : {"milestone_1" : "MILESTONE-1", "milestone_2" : "MILESTONE-2", "milestone_3" : "MILESTONE-3"}, +"dict_milestones" : {"milestone_1" : "MILESTONE_1", "milestone_2" : "MILESTONE_2", "milestone_3" : "MILESTONE_3"}, "milestone_key_2" : "milestone_2", // "innermost_milestone_name" : "est", @@ -45,31 +45,31 @@ XC-CT/ECA3-Queckenstedt "variant_1" : "${V${A${INNERMOST_VARIANT_VALUE}N}T}-${variant_number} (new value)" // nested parameter / string parameter substitution in parameter name -"${m${il${innermost_milestone_name}o}ne}_${milestone_number}" : "MILESTONE-2 (new value)" +"${m${il${innermost_milestone_name}o}ne}_${milestone_number}" : "MILESTONE_2 (new value)" // nested parameter / index parameter substitution in parameter name / standard notation -"VAR-${variant_${list_variant_numbers}[${list_variant_index}]}_MS-${milestone_${list_milestone_numbers}[${list_milestone_index}]}_param" : "value" +"VAR_${variant_${list_variant_numbers}[${list_variant_index}]}_MS_${milestone_${list_milestone_numbers}[${list_milestone_index}]}_param" : "value" // nested parameter / index parameter substitution in parameter name / dotdict notation -"VAR-${variant_${list_variant_numbers.${list_variant_index}}}_MS-${milestone_${list_milestone_numbers.${list_milestone_index}}}_param" : "value" +"VAR_${variant_${list_variant_numbers.${list_variant_index}}}_MS_${milestone_${list_milestone_numbers.${list_milestone_index}}}_param" : "value" // nested parameter / index parameter substitution in parameter value / standard notation -"param" : "VAR-${variant_${list_variant_numbers}[${list_variant_index}]}_MS-${milestone_${list_milestone_numbers}[${list_milestone_index}]} value" +"param" : "VAR_${variant_${list_variant_numbers}[${list_variant_index}]}_MS_${milestone_${list_milestone_numbers}[${list_milestone_index}]} value" // nested parameter / index parameter substitution in parameter value / dotdict notation -"param" : "VAR-${variant_${list_variant_numbers.${list_variant_index}}}_MS-${milestone_${list_milestone_numbers.${list_milestone_index}}} value" +"param" : "VAR_${variant_${list_variant_numbers.${list_variant_index}}}_MS_${milestone_${list_milestone_numbers.${list_milestone_index}}} value" // nested parameter / key parameter substitution in parameter name / standard notation -"VAR-${dict_variants}['${variant_key_${variant_number}}']_MS-${dict_milestones}['${milestone_key_${milestone_number}}']_param" : "value" +"VAR_${dict_variants}['${variant_key_${variant_number}}']_MS_${dict_milestones}['${milestone_key_${milestone_number}}']_param" : "value" // nested parameter / key parameter substitution in parameter name / dotdict notation -"VAR-${dict_variants.${variant_key_${variant_number}}}_MS-${dict_milestones.${milestone_key_${milestone_number}}}_param" : "value" +"VAR_${dict_variants.${variant_key_${variant_number}}}_MS_${dict_milestones.${milestone_key_${milestone_number}}}_param" : "value" // nested parameter / key parameter substitution in parameter value / standard notation -"param" : "VAR-${dict_variants}['${variant_key_${variant_number}}']_MS-${dict_milestones}['${milestone_key_${milestone_number}}'] value" +"param" : "VAR_${dict_variants}['${variant_key_${variant_number}}']_MS_${dict_milestones}['${milestone_key_${milestone_number}}'] value" // nested parameter / key parameter substitution in parameter value / dotdict notation -"param" : "VAR-${dict_variants.${variant_key_${variant_number}}}_MS-${dict_milestones.${milestone_key_${milestone_number}}} value" +"param" : "VAR_${dict_variants.${variant_key_${variant_number}}}_MS_${dict_milestones.${milestone_key_${milestone_number}}} value" -------------------------------------------------------------------------------------------------------------- @@ -79,31 +79,31 @@ XC-CT/ECA3-Queckenstedt "variant_1" : "${V${A${IAMNOTEXISTING}N}T}-${variant_number} (new value)" // nested parameter / string parameter substitution in parameter name / in between parameter not existing -"${m${IAMNOTEXISTING}ne}_${milestone_number}" : "MILESTONE-2 (new value)" +"${m${IAMNOTEXISTING}ne}_${milestone_number}" : "MILESTONE_2 (new value)" // nested parameter / index parameter substitution in parameter name / standard notation / index parameter not existing -"VAR-${variant_${list_variant_numbers}[${IAMNOTEXISTING}]}_MS-${milestone_${list_milestone_numbers}[${list_milestone_index}]}_param" : "value" +"VAR_${variant_${list_variant_numbers}[${IAMNOTEXISTING}]}_MS_${milestone_${list_milestone_numbers}[${list_milestone_index}]}_param" : "value" // nested parameter / index parameter substitution in parameter name / dotdict notation / index parameter not existing -"VAR-${variant_${list_variant_numbers.${list_variant_index}}}_MS-${milestone_${list_milestone_numbers.${IAMNOTEXISTING}}}_param" : "value" +"VAR_${variant_${list_variant_numbers.${list_variant_index}}}_MS_${milestone_${list_milestone_numbers.${IAMNOTEXISTING}}}_param" : "value" // nested parameter / index parameter substitution in parameter value / standard notation / index parameter not existing -"param" : "VAR-${variant_${list_variant_numbers}[${IAMNOTEXISTING}]}_MS-${milestone_${list_milestone_numbers}[${list_milestone_index}]} value" +"param" : "VAR_${variant_${list_variant_numbers}[${IAMNOTEXISTING}]}_MS_${milestone_${list_milestone_numbers}[${list_milestone_index}]} value" // nested parameter / index parameter substitution in parameter value / dotdict notation / index parameter not existing -"param" : "VAR-${variant_${list_variant_numbers.${list_variant_index}}}_MS-${milestone_${list_milestone_numbers.${IAMNOTEXISTING}}} value" +"param" : "VAR_${variant_${list_variant_numbers.${list_variant_index}}}_MS_${milestone_${list_milestone_numbers.${IAMNOTEXISTING}}} value" // nested parameter / key parameter substitution in parameter name / standard notation / variant number not existing -"VAR-${dict_variants}['${variant_key_${IAMNOTEXISTING}}']_MS-${dict_milestones}['${milestone_key_${milestone_number}}']_param" : "value" +"VAR_${dict_variants}['${variant_key_${IAMNOTEXISTING}}']_MS_${dict_milestones}['${milestone_key_${milestone_number}}']_param" : "value" // nested parameter / key parameter substitution in parameter name / dotdict notation / milestone number not existing -"VAR-${dict_variants.${variant_key_${variant_number}}}_MS-${dict_milestones.${milestone_key_${IAMNOTEXISTING}}}_param" : "value" +"VAR_${dict_variants.${variant_key_${variant_number}}}_MS_${dict_milestones.${milestone_key_${IAMNOTEXISTING}}}_param" : "value" // nested parameter / key parameter substitution in parameter value / standard notation / variant number not existing -"param" : "VAR-${dict_variants}['${variant_key_${IAMNOTEXISTING}}']_MS-${dict_milestones}['${milestone_key_${milestone_number}}'] value" +"param" : "VAR_${dict_variants}['${variant_key_${IAMNOTEXISTING}}']_MS_${dict_milestones}['${milestone_key_${milestone_number}}'] value" // nested parameter / key parameter substitution in parameter value / dotdict notation / milestone number not existing -"param" : "VAR-${dict_variants.${variant_key_${variant_number}}}_MS-${dict_milestones.${milestone_key_${IAMNOTEXISTING}}} value" +"param" : "VAR_${dict_variants.${variant_key_${variant_number}}}_MS_${dict_milestones.${milestone_key_${IAMNOTEXISTING}}} value" -------------------------------------------------------------------------------------------------------------- diff --git a/test/testconfig/TestConfig.py b/test/testconfig/TestConfig.py index ccdd4bf4..d99499cb 100644 --- a/test/testconfig/TestConfig.py +++ b/test/testconfig/TestConfig.py @@ -22,7 +22,7 @@ # # -------------------------------------------------------------------------------------------------------------- # -# 05.10.2023 +# 09.10.2023 # # !!! Temporarily tests are deactivated by the following line commented out: # # # listofdictUsecases.append(dictUsecase) @@ -551,33 +551,33 @@ dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0200.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None dictUsecase['EXPECTEDRETURN'] = """ -[DICT] (21/1) > {variant_2} [STR] : 'VARIANT-2' +[DICT] (21/1) > {variant_2} [STR] : 'VARIANT_2' [DICT] (21/2) > {list_variant_numbers} [LIST] (2/1) > [INT] : 1 [DICT] (21/2) > {list_variant_numbers} [LIST] (2/2) > [INT] : 2 [DICT] (21/3) > {list_variant_index} [INT] : 0 [DICT] (21/4) > {variant_number} [STR] : '1' -[DICT] (21/5) > {dict_variants} [DICT] (2/1) > {variant_1} [STR] : 'VARIANT-1' -[DICT] (21/5) > {dict_variants} [DICT] (2/2) > {variant_2} [STR] : 'VARIANT-2' +[DICT] (21/5) > {dict_variants} [DICT] (2/1) > {variant_1} [STR] : 'VARIANT_1' +[DICT] (21/5) > {dict_variants} [DICT] (2/2) > {variant_2} [STR] : 'VARIANT_2' [DICT] (21/6) > {variant_key_1} [STR] : 'variant_1' [DICT] (21/7) > {INNERMOST_VARIANT_VALUE} [STR] : 'RIA' [DICT] (21/8) > {ARIAN} [STR] : 'ARIAN' [DICT] (21/9) > {VARIANT} [STR] : 'VARIANT' -[DICT] (21/10) > {milestone_1} [STR] : 'MILESTONE-1' -[DICT] (21/11) > {milestone_2} [STR] : 'MILESTONE-2' -[DICT] (21/12) > {milestone_3} [STR] : 'MILESTONE-3' +[DICT] (21/10) > {milestone_1} [STR] : 'MILESTONE_1' +[DICT] (21/11) > {milestone_2} [STR] : 'MILESTONE_2' +[DICT] (21/12) > {milestone_3} [STR] : 'MILESTONE_3' [DICT] (21/13) > {list_milestone_numbers} [LIST] (3/1) > [INT] : 1 [DICT] (21/13) > {list_milestone_numbers} [LIST] (3/2) > [INT] : 2 [DICT] (21/13) > {list_milestone_numbers} [LIST] (3/3) > [INT] : 3 [DICT] (21/14) > {list_milestone_index} [INT] : 1 [DICT] (21/15) > {milestone_number} [STR] : '2' -[DICT] (21/16) > {dict_milestones} [DICT] (3/1) > {milestone_1} [STR] : 'MILESTONE-1' -[DICT] (21/16) > {dict_milestones} [DICT] (3/2) > {milestone_2} [STR] : 'MILESTONE-2' -[DICT] (21/16) > {dict_milestones} [DICT] (3/3) > {milestone_3} [STR] : 'MILESTONE-3' +[DICT] (21/16) > {dict_milestones} [DICT] (3/1) > {milestone_1} [STR] : 'MILESTONE_1' +[DICT] (21/16) > {dict_milestones} [DICT] (3/2) > {milestone_2} [STR] : 'MILESTONE_2' +[DICT] (21/16) > {dict_milestones} [DICT] (3/3) > {milestone_3} [STR] : 'MILESTONE_3' [DICT] (21/17) > {milestone_key_2} [STR] : 'milestone_2' [DICT] (21/18) > {innermost_milestone_name} [STR] : 'est' [DICT] (21/19) > {ilesto} [STR] : 'ilesto' [DICT] (21/20) > {milestone} [STR] : 'milestone' -[DICT] (21/21) > {variant_1} [STR] : 'VARIANT-1 (new value)' +[DICT] (21/21) > {variant_1} [STR] : 'VARIANT_1 (new value)' """ listofdictUsecases.append(dictUsecase) del dictUsecase @@ -593,29 +593,29 @@ dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0201.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None dictUsecase['EXPECTEDRETURN'] = """ -[DICT] (21/1) > {variant_1} [STR] : 'VARIANT-1' -[DICT] (21/2) > {variant_2} [STR] : 'VARIANT-2' +[DICT] (21/1) > {variant_1} [STR] : 'VARIANT_1' +[DICT] (21/2) > {variant_2} [STR] : 'VARIANT_2' [DICT] (21/3) > {list_variant_numbers} [LIST] (2/1) > [INT] : 1 [DICT] (21/3) > {list_variant_numbers} [LIST] (2/2) > [INT] : 2 [DICT] (21/4) > {list_variant_index} [INT] : 0 [DICT] (21/5) > {variant_number} [STR] : '1' -[DICT] (21/6) > {dict_variants} [DICT] (2/1) > {variant_1} [STR] : 'VARIANT-1' -[DICT] (21/6) > {dict_variants} [DICT] (2/2) > {variant_2} [STR] : 'VARIANT-2' +[DICT] (21/6) > {dict_variants} [DICT] (2/1) > {variant_1} [STR] : 'VARIANT_1' +[DICT] (21/6) > {dict_variants} [DICT] (2/2) > {variant_2} [STR] : 'VARIANT_2' [DICT] (21/7) > {variant_key_1} [STR] : 'variant_1' [DICT] (21/8) > {INNERMOST_VARIANT_VALUE} [STR] : 'RIA' [DICT] (21/9) > {ARIAN} [STR] : 'ARIAN' [DICT] (21/10) > {VARIANT} [STR] : 'VARIANT' -[DICT] (21/11) > {milestone_1} [STR] : 'MILESTONE-1' -[DICT] (21/12) > {milestone_2} [STR] : 'MILESTONE-2 (new value)' -[DICT] (21/13) > {milestone_3} [STR] : 'MILESTONE-3' +[DICT] (21/11) > {milestone_1} [STR] : 'MILESTONE_1' +[DICT] (21/12) > {milestone_2} [STR] : 'MILESTONE_2 (new value)' +[DICT] (21/13) > {milestone_3} [STR] : 'MILESTONE_3' [DICT] (21/14) > {list_milestone_numbers} [LIST] (3/1) > [INT] : 1 [DICT] (21/14) > {list_milestone_numbers} [LIST] (3/2) > [INT] : 2 [DICT] (21/14) > {list_milestone_numbers} [LIST] (3/3) > [INT] : 3 [DICT] (21/15) > {list_milestone_index} [INT] : 1 [DICT] (21/16) > {milestone_number} [STR] : '2' -[DICT] (21/17) > {dict_milestones} [DICT] (3/1) > {milestone_1} [STR] : 'MILESTONE-1' -[DICT] (21/17) > {dict_milestones} [DICT] (3/2) > {milestone_2} [STR] : 'MILESTONE-2' -[DICT] (21/17) > {dict_milestones} [DICT] (3/3) > {milestone_3} [STR] : 'MILESTONE-3' +[DICT] (21/17) > {dict_milestones} [DICT] (3/1) > {milestone_1} [STR] : 'MILESTONE_1' +[DICT] (21/17) > {dict_milestones} [DICT] (3/2) > {milestone_2} [STR] : 'MILESTONE_2' +[DICT] (21/17) > {dict_milestones} [DICT] (3/3) > {milestone_3} [STR] : 'MILESTONE_3' [DICT] (21/18) > {milestone_key_2} [STR] : 'milestone_2' [DICT] (21/19) > {innermost_milestone_name} [STR] : 'est' [DICT] (21/20) > {ilesto} [STR] : 'ilesto' @@ -635,34 +635,34 @@ dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0202.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None dictUsecase['EXPECTEDRETURN'] = """ -[DICT] (22/1) > {variant_1} [STR] : 'VARIANT-1' -[DICT] (22/2) > {variant_2} [STR] : 'VARIANT-2' +[DICT] (22/1) > {variant_1} [STR] : 'VARIANT_1' +[DICT] (22/2) > {variant_2} [STR] : 'VARIANT_2' [DICT] (22/3) > {list_variant_numbers} [LIST] (2/1) > [INT] : 1 [DICT] (22/3) > {list_variant_numbers} [LIST] (2/2) > [INT] : 2 [DICT] (22/4) > {list_variant_index} [INT] : 0 [DICT] (22/5) > {variant_number} [STR] : '1' -[DICT] (22/6) > {dict_variants} [DICT] (2/1) > {variant_1} [STR] : 'VARIANT-1' -[DICT] (22/6) > {dict_variants} [DICT] (2/2) > {variant_2} [STR] : 'VARIANT-2' +[DICT] (22/6) > {dict_variants} [DICT] (2/1) > {variant_1} [STR] : 'VARIANT_1' +[DICT] (22/6) > {dict_variants} [DICT] (2/2) > {variant_2} [STR] : 'VARIANT_2' [DICT] (22/7) > {variant_key_1} [STR] : 'variant_1' [DICT] (22/8) > {INNERMOST_VARIANT_VALUE} [STR] : 'RIA' [DICT] (22/9) > {ARIAN} [STR] : 'ARIAN' [DICT] (22/10) > {VARIANT} [STR] : 'VARIANT' -[DICT] (22/11) > {milestone_1} [STR] : 'MILESTONE-1' -[DICT] (22/12) > {milestone_2} [STR] : 'MILESTONE-2' -[DICT] (22/13) > {milestone_3} [STR] : 'MILESTONE-3' +[DICT] (22/11) > {milestone_1} [STR] : 'MILESTONE_1' +[DICT] (22/12) > {milestone_2} [STR] : 'MILESTONE_2' +[DICT] (22/13) > {milestone_3} [STR] : 'MILESTONE_3' [DICT] (22/14) > {list_milestone_numbers} [LIST] (3/1) > [INT] : 1 [DICT] (22/14) > {list_milestone_numbers} [LIST] (3/2) > [INT] : 2 [DICT] (22/14) > {list_milestone_numbers} [LIST] (3/3) > [INT] : 3 [DICT] (22/15) > {list_milestone_index} [INT] : 1 [DICT] (22/16) > {milestone_number} [STR] : '2' -[DICT] (22/17) > {dict_milestones} [DICT] (3/1) > {milestone_1} [STR] : 'MILESTONE-1' -[DICT] (22/17) > {dict_milestones} [DICT] (3/2) > {milestone_2} [STR] : 'MILESTONE-2' -[DICT] (22/17) > {dict_milestones} [DICT] (3/3) > {milestone_3} [STR] : 'MILESTONE-3' +[DICT] (22/17) > {dict_milestones} [DICT] (3/1) > {milestone_1} [STR] : 'MILESTONE_1' +[DICT] (22/17) > {dict_milestones} [DICT] (3/2) > {milestone_2} [STR] : 'MILESTONE_2' +[DICT] (22/17) > {dict_milestones} [DICT] (3/3) > {milestone_3} [STR] : 'MILESTONE_3' [DICT] (22/18) > {milestone_key_2} [STR] : 'milestone_2' [DICT] (22/19) > {innermost_milestone_name} [STR] : 'est' [DICT] (22/20) > {ilesto} [STR] : 'ilesto' [DICT] (22/21) > {milestone} [STR] : 'milestone' -[DICT] (22/22) > {VAR-VARIANT-1_MS-MILESTONE-2_param} [STR] : 'value' +[DICT] (22/22) > {VAR_VARIANT_1_MS_MILESTONE_2_param} [STR] : 'value' """ listofdictUsecases.append(dictUsecase) del dictUsecase @@ -678,34 +678,34 @@ dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0203.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None dictUsecase['EXPECTEDRETURN'] = """ -[DICT] (22/1) > {variant_1} [STR] : 'VARIANT-1' -[DICT] (22/2) > {variant_2} [STR] : 'VARIANT-2' +[DICT] (22/1) > {variant_1} [STR] : 'VARIANT_1' +[DICT] (22/2) > {variant_2} [STR] : 'VARIANT_2' [DICT] (22/3) > {list_variant_numbers} [LIST] (2/1) > [INT] : 1 [DICT] (22/3) > {list_variant_numbers} [LIST] (2/2) > [INT] : 2 [DICT] (22/4) > {list_variant_index} [INT] : 0 [DICT] (22/5) > {variant_number} [STR] : '1' -[DICT] (22/6) > {dict_variants} [DICT] (2/1) > {variant_1} [STR] : 'VARIANT-1' -[DICT] (22/6) > {dict_variants} [DICT] (2/2) > {variant_2} [STR] : 'VARIANT-2' +[DICT] (22/6) > {dict_variants} [DICT] (2/1) > {variant_1} [STR] : 'VARIANT_1' +[DICT] (22/6) > {dict_variants} [DICT] (2/2) > {variant_2} [STR] : 'VARIANT_2' [DICT] (22/7) > {variant_key_1} [STR] : 'variant_1' [DICT] (22/8) > {INNERMOST_VARIANT_VALUE} [STR] : 'RIA' [DICT] (22/9) > {ARIAN} [STR] : 'ARIAN' [DICT] (22/10) > {VARIANT} [STR] : 'VARIANT' -[DICT] (22/11) > {milestone_1} [STR] : 'MILESTONE-1' -[DICT] (22/12) > {milestone_2} [STR] : 'MILESTONE-2' -[DICT] (22/13) > {milestone_3} [STR] : 'MILESTONE-3' +[DICT] (22/11) > {milestone_1} [STR] : 'MILESTONE_1' +[DICT] (22/12) > {milestone_2} [STR] : 'MILESTONE_2' +[DICT] (22/13) > {milestone_3} [STR] : 'MILESTONE_3' [DICT] (22/14) > {list_milestone_numbers} [LIST] (3/1) > [INT] : 1 [DICT] (22/14) > {list_milestone_numbers} [LIST] (3/2) > [INT] : 2 [DICT] (22/14) > {list_milestone_numbers} [LIST] (3/3) > [INT] : 3 [DICT] (22/15) > {list_milestone_index} [INT] : 1 [DICT] (22/16) > {milestone_number} [STR] : '2' -[DICT] (22/17) > {dict_milestones} [DICT] (3/1) > {milestone_1} [STR] : 'MILESTONE-1' -[DICT] (22/17) > {dict_milestones} [DICT] (3/2) > {milestone_2} [STR] : 'MILESTONE-2' -[DICT] (22/17) > {dict_milestones} [DICT] (3/3) > {milestone_3} [STR] : 'MILESTONE-3' +[DICT] (22/17) > {dict_milestones} [DICT] (3/1) > {milestone_1} [STR] : 'MILESTONE_1' +[DICT] (22/17) > {dict_milestones} [DICT] (3/2) > {milestone_2} [STR] : 'MILESTONE_2' +[DICT] (22/17) > {dict_milestones} [DICT] (3/3) > {milestone_3} [STR] : 'MILESTONE_3' [DICT] (22/18) > {milestone_key_2} [STR] : 'milestone_2' [DICT] (22/19) > {innermost_milestone_name} [STR] : 'est' [DICT] (22/20) > {ilesto} [STR] : 'ilesto' [DICT] (22/21) > {milestone} [STR] : 'milestone' -[DICT] (22/22) > {VAR-VARIANT-1_MS-MILESTONE-2_param} [STR] : 'value' +[DICT] (22/22) > {VAR_VARIANT_1_MS_MILESTONE_2_param} [STR] : 'value' """ listofdictUsecases.append(dictUsecase) del dictUsecase @@ -721,34 +721,34 @@ dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0204.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None dictUsecase['EXPECTEDRETURN'] = """ -[DICT] (22/1) > {variant_1} [STR] : 'VARIANT-1' -[DICT] (22/2) > {variant_2} [STR] : 'VARIANT-2' +[DICT] (22/1) > {variant_1} [STR] : 'VARIANT_1' +[DICT] (22/2) > {variant_2} [STR] : 'VARIANT_2' [DICT] (22/3) > {list_variant_numbers} [LIST] (2/1) > [INT] : 1 [DICT] (22/3) > {list_variant_numbers} [LIST] (2/2) > [INT] : 2 [DICT] (22/4) > {list_variant_index} [INT] : 0 [DICT] (22/5) > {variant_number} [STR] : '1' -[DICT] (22/6) > {dict_variants} [DICT] (2/1) > {variant_1} [STR] : 'VARIANT-1' -[DICT] (22/6) > {dict_variants} [DICT] (2/2) > {variant_2} [STR] : 'VARIANT-2' +[DICT] (22/6) > {dict_variants} [DICT] (2/1) > {variant_1} [STR] : 'VARIANT_1' +[DICT] (22/6) > {dict_variants} [DICT] (2/2) > {variant_2} [STR] : 'VARIANT_2' [DICT] (22/7) > {variant_key_1} [STR] : 'variant_1' [DICT] (22/8) > {INNERMOST_VARIANT_VALUE} [STR] : 'RIA' [DICT] (22/9) > {ARIAN} [STR] : 'ARIAN' [DICT] (22/10) > {VARIANT} [STR] : 'VARIANT' -[DICT] (22/11) > {milestone_1} [STR] : 'MILESTONE-1' -[DICT] (22/12) > {milestone_2} [STR] : 'MILESTONE-2' -[DICT] (22/13) > {milestone_3} [STR] : 'MILESTONE-3' +[DICT] (22/11) > {milestone_1} [STR] : 'MILESTONE_1' +[DICT] (22/12) > {milestone_2} [STR] : 'MILESTONE_2' +[DICT] (22/13) > {milestone_3} [STR] : 'MILESTONE_3' [DICT] (22/14) > {list_milestone_numbers} [LIST] (3/1) > [INT] : 1 [DICT] (22/14) > {list_milestone_numbers} [LIST] (3/2) > [INT] : 2 [DICT] (22/14) > {list_milestone_numbers} [LIST] (3/3) > [INT] : 3 [DICT] (22/15) > {list_milestone_index} [INT] : 1 [DICT] (22/16) > {milestone_number} [STR] : '2' -[DICT] (22/17) > {dict_milestones} [DICT] (3/1) > {milestone_1} [STR] : 'MILESTONE-1' -[DICT] (22/17) > {dict_milestones} [DICT] (3/2) > {milestone_2} [STR] : 'MILESTONE-2' -[DICT] (22/17) > {dict_milestones} [DICT] (3/3) > {milestone_3} [STR] : 'MILESTONE-3' +[DICT] (22/17) > {dict_milestones} [DICT] (3/1) > {milestone_1} [STR] : 'MILESTONE_1' +[DICT] (22/17) > {dict_milestones} [DICT] (3/2) > {milestone_2} [STR] : 'MILESTONE_2' +[DICT] (22/17) > {dict_milestones} [DICT] (3/3) > {milestone_3} [STR] : 'MILESTONE_3' [DICT] (22/18) > {milestone_key_2} [STR] : 'milestone_2' [DICT] (22/19) > {innermost_milestone_name} [STR] : 'est' [DICT] (22/20) > {ilesto} [STR] : 'ilesto' [DICT] (22/21) > {milestone} [STR] : 'milestone' -[DICT] (22/22) > {param} [STR] : 'VAR-VARIANT-1_MS-MILESTONE-2 value' +[DICT] (22/22) > {param} [STR] : 'VAR_VARIANT_1_MS_MILESTONE_2 value' """ listofdictUsecases.append(dictUsecase) del dictUsecase @@ -764,36 +764,36 @@ dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0205.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None dictUsecase['EXPECTEDRETURN'] = """ -[DICT] (22/1) > {variant_1} [STR] : 'VARIANT-1' -[DICT] (22/2) > {variant_2} [STR] : 'VARIANT-2' +[DICT] (22/1) > {variant_1} [STR] : 'VARIANT_1' +[DICT] (22/2) > {variant_2} [STR] : 'VARIANT_2' [DICT] (22/3) > {list_variant_numbers} [LIST] (2/1) > [INT] : 1 [DICT] (22/3) > {list_variant_numbers} [LIST] (2/2) > [INT] : 2 [DICT] (22/4) > {list_variant_index} [INT] : 0 [DICT] (22/5) > {variant_number} [STR] : '1' -[DICT] (22/6) > {dict_variants} [DICT] (2/1) > {variant_1} [STR] : 'VARIANT-1' -[DICT] (22/6) > {dict_variants} [DICT] (2/2) > {variant_2} [STR] : 'VARIANT-2' +[DICT] (22/6) > {dict_variants} [DICT] (2/1) > {variant_1} [STR] : 'VARIANT_1' +[DICT] (22/6) > {dict_variants} [DICT] (2/2) > {variant_2} [STR] : 'VARIANT_2' [DICT] (22/7) > {variant_key_1} [STR] : 'variant_1' [DICT] (22/8) > {INNERMOST_VARIANT_VALUE} [STR] : 'RIA' [DICT] (22/9) > {ARIAN} [STR] : 'ARIAN' [DICT] (22/10) > {VARIANT} [STR] : 'VARIANT' -[DICT] (22/11) > {milestone_1} [STR] : 'MILESTONE-1' -[DICT] (22/12) > {milestone_2} [STR] : 'MILESTONE-2' -[DICT] (22/13) > {milestone_3} [STR] : 'MILESTONE-3' +[DICT] (22/11) > {milestone_1} [STR] : 'MILESTONE_1' +[DICT] (22/12) > {milestone_2} [STR] : 'MILESTONE_2' +[DICT] (22/13) > {milestone_3} [STR] : 'MILESTONE_3' [DICT] (22/14) > {list_milestone_numbers} [LIST] (3/1) > [INT] : 1 [DICT] (22/14) > {list_milestone_numbers} [LIST] (3/2) > [INT] : 2 [DICT] (22/14) > {list_milestone_numbers} [LIST] (3/3) > [INT] : 3 [DICT] (22/15) > {list_milestone_index} [INT] : 1 [DICT] (22/16) > {milestone_number} [STR] : '2' -[DICT] (22/17) > {dict_milestones} [DICT] (3/1) > {milestone_1} [STR] : 'MILESTONE-1' -[DICT] (22/17) > {dict_milestones} [DICT] (3/2) > {milestone_2} [STR] : 'MILESTONE-2' -[DICT] (22/17) > {dict_milestones} [DICT] (3/3) > {milestone_3} [STR] : 'MILESTONE-3' +[DICT] (22/17) > {dict_milestones} [DICT] (3/1) > {milestone_1} [STR] : 'MILESTONE_1' +[DICT] (22/17) > {dict_milestones} [DICT] (3/2) > {milestone_2} [STR] : 'MILESTONE_2' +[DICT] (22/17) > {dict_milestones} [DICT] (3/3) > {milestone_3} [STR] : 'MILESTONE_3' [DICT] (22/18) > {milestone_key_2} [STR] : 'milestone_2' [DICT] (22/19) > {innermost_milestone_name} [STR] : 'est' [DICT] (22/20) > {ilesto} [STR] : 'ilesto' [DICT] (22/21) > {milestone} [STR] : 'milestone' -[DICT] (22/22) > {param} [STR] : 'VAR-VARIANT-1_MS-MILESTONE-2 value' +[DICT] (22/22) > {param} [STR] : 'VAR_VARIANT_1_MS_MILESTONE_2 value' """ -# # # listofdictUsecases.append(dictUsecase) +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} @@ -807,34 +807,34 @@ dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0206.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None dictUsecase['EXPECTEDRETURN'] = """ -[DICT] (22/1) > {variant_1} [STR] : 'VARIANT-1' -[DICT] (22/2) > {variant_2} [STR] : 'VARIANT-2' +[DICT] (22/1) > {variant_1} [STR] : 'VARIANT_1' +[DICT] (22/2) > {variant_2} [STR] : 'VARIANT_2' [DICT] (22/3) > {list_variant_numbers} [LIST] (2/1) > [INT] : 1 [DICT] (22/3) > {list_variant_numbers} [LIST] (2/2) > [INT] : 2 [DICT] (22/4) > {list_variant_index} [INT] : 0 [DICT] (22/5) > {variant_number} [STR] : '1' -[DICT] (22/6) > {dict_variants} [DICT] (2/1) > {variant_1} [STR] : 'VARIANT-1' -[DICT] (22/6) > {dict_variants} [DICT] (2/2) > {variant_2} [STR] : 'VARIANT-2' +[DICT] (22/6) > {dict_variants} [DICT] (2/1) > {variant_1} [STR] : 'VARIANT_1' +[DICT] (22/6) > {dict_variants} [DICT] (2/2) > {variant_2} [STR] : 'VARIANT_2' [DICT] (22/7) > {variant_key_1} [STR] : 'variant_1' [DICT] (22/8) > {INNERMOST_VARIANT_VALUE} [STR] : 'RIA' [DICT] (22/9) > {ARIAN} [STR] : 'ARIAN' [DICT] (22/10) > {VARIANT} [STR] : 'VARIANT' -[DICT] (22/11) > {milestone_1} [STR] : 'MILESTONE-1' -[DICT] (22/12) > {milestone_2} [STR] : 'MILESTONE-2' -[DICT] (22/13) > {milestone_3} [STR] : 'MILESTONE-3' +[DICT] (22/11) > {milestone_1} [STR] : 'MILESTONE_1' +[DICT] (22/12) > {milestone_2} [STR] : 'MILESTONE_2' +[DICT] (22/13) > {milestone_3} [STR] : 'MILESTONE_3' [DICT] (22/14) > {list_milestone_numbers} [LIST] (3/1) > [INT] : 1 [DICT] (22/14) > {list_milestone_numbers} [LIST] (3/2) > [INT] : 2 [DICT] (22/14) > {list_milestone_numbers} [LIST] (3/3) > [INT] : 3 [DICT] (22/15) > {list_milestone_index} [INT] : 1 [DICT] (22/16) > {milestone_number} [STR] : '2' -[DICT] (22/17) > {dict_milestones} [DICT] (3/1) > {milestone_1} [STR] : 'MILESTONE-1' -[DICT] (22/17) > {dict_milestones} [DICT] (3/2) > {milestone_2} [STR] : 'MILESTONE-2' -[DICT] (22/17) > {dict_milestones} [DICT] (3/3) > {milestone_3} [STR] : 'MILESTONE-3' +[DICT] (22/17) > {dict_milestones} [DICT] (3/1) > {milestone_1} [STR] : 'MILESTONE_1' +[DICT] (22/17) > {dict_milestones} [DICT] (3/2) > {milestone_2} [STR] : 'MILESTONE_2' +[DICT] (22/17) > {dict_milestones} [DICT] (3/3) > {milestone_3} [STR] : 'MILESTONE_3' [DICT] (22/18) > {milestone_key_2} [STR] : 'milestone_2' [DICT] (22/19) > {innermost_milestone_name} [STR] : 'est' [DICT] (22/20) > {ilesto} [STR] : 'ilesto' [DICT] (22/21) > {milestone} [STR] : 'milestone' -[DICT] (22/22) > {VAR-VARIANT-1_MS-MILESTONE-2_param} [STR] : 'value' +[DICT] (22/22) > {VAR_VARIANT_1_MS_MILESTONE_2_param} [STR] : 'value' """ # # # listofdictUsecases.append(dictUsecase) del dictUsecase @@ -850,34 +850,34 @@ dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0207.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None dictUsecase['EXPECTEDRETURN'] = """ -[DICT] (22/1) > {variant_1} [STR] : 'VARIANT-1' -[DICT] (22/2) > {variant_2} [STR] : 'VARIANT-2' +[DICT] (22/1) > {variant_1} [STR] : 'VARIANT_1' +[DICT] (22/2) > {variant_2} [STR] : 'VARIANT_2' [DICT] (22/3) > {list_variant_numbers} [LIST] (2/1) > [INT] : 1 [DICT] (22/3) > {list_variant_numbers} [LIST] (2/2) > [INT] : 2 [DICT] (22/4) > {list_variant_index} [INT] : 0 [DICT] (22/5) > {variant_number} [STR] : '1' -[DICT] (22/6) > {dict_variants} [DICT] (2/1) > {variant_1} [STR] : 'VARIANT-1' -[DICT] (22/6) > {dict_variants} [DICT] (2/2) > {variant_2} [STR] : 'VARIANT-2' +[DICT] (22/6) > {dict_variants} [DICT] (2/1) > {variant_1} [STR] : 'VARIANT_1' +[DICT] (22/6) > {dict_variants} [DICT] (2/2) > {variant_2} [STR] : 'VARIANT_2' [DICT] (22/7) > {variant_key_1} [STR] : 'variant_1' [DICT] (22/8) > {INNERMOST_VARIANT_VALUE} [STR] : 'RIA' [DICT] (22/9) > {ARIAN} [STR] : 'ARIAN' [DICT] (22/10) > {VARIANT} [STR] : 'VARIANT' -[DICT] (22/11) > {milestone_1} [STR] : 'MILESTONE-1' -[DICT] (22/12) > {milestone_2} [STR] : 'MILESTONE-2' -[DICT] (22/13) > {milestone_3} [STR] : 'MILESTONE-3' +[DICT] (22/11) > {milestone_1} [STR] : 'MILESTONE_1' +[DICT] (22/12) > {milestone_2} [STR] : 'MILESTONE_2' +[DICT] (22/13) > {milestone_3} [STR] : 'MILESTONE_3' [DICT] (22/14) > {list_milestone_numbers} [LIST] (3/1) > [INT] : 1 [DICT] (22/14) > {list_milestone_numbers} [LIST] (3/2) > [INT] : 2 [DICT] (22/14) > {list_milestone_numbers} [LIST] (3/3) > [INT] : 3 [DICT] (22/15) > {list_milestone_index} [INT] : 1 [DICT] (22/16) > {milestone_number} [STR] : '2' -[DICT] (22/17) > {dict_milestones} [DICT] (3/1) > {milestone_1} [STR] : 'MILESTONE-1' -[DICT] (22/17) > {dict_milestones} [DICT] (3/2) > {milestone_2} [STR] : 'MILESTONE-2' -[DICT] (22/17) > {dict_milestones} [DICT] (3/3) > {milestone_3} [STR] : 'MILESTONE-3' +[DICT] (22/17) > {dict_milestones} [DICT] (3/1) > {milestone_1} [STR] : 'MILESTONE_1' +[DICT] (22/17) > {dict_milestones} [DICT] (3/2) > {milestone_2} [STR] : 'MILESTONE_2' +[DICT] (22/17) > {dict_milestones} [DICT] (3/3) > {milestone_3} [STR] : 'MILESTONE_3' [DICT] (22/18) > {milestone_key_2} [STR] : 'milestone_2' [DICT] (22/19) > {innermost_milestone_name} [STR] : 'est' [DICT] (22/20) > {ilesto} [STR] : 'ilesto' [DICT] (22/21) > {milestone} [STR] : 'milestone' -[DICT] (22/22) > {VAR-VARIANT-1_MS-MILESTONE-2_param} [STR] : 'value' +[DICT] (22/22) > {VAR_VARIANT_1_MS_MILESTONE_2_param} [STR] : 'value' """ # # # listofdictUsecases.append(dictUsecase) del dictUsecase @@ -893,34 +893,34 @@ dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0208.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None dictUsecase['EXPECTEDRETURN'] = """ -[DICT] (22/1) > {variant_1} [STR] : 'VARIANT-1' -[DICT] (22/2) > {variant_2} [STR] : 'VARIANT-2' +[DICT] (22/1) > {variant_1} [STR] : 'VARIANT_1' +[DICT] (22/2) > {variant_2} [STR] : 'VARIANT_2' [DICT] (22/3) > {list_variant_numbers} [LIST] (2/1) > [INT] : 1 [DICT] (22/3) > {list_variant_numbers} [LIST] (2/2) > [INT] : 2 [DICT] (22/4) > {list_variant_index} [INT] : 0 [DICT] (22/5) > {variant_number} [STR] : '1' -[DICT] (22/6) > {dict_variants} [DICT] (2/1) > {variant_1} [STR] : 'VARIANT-1' -[DICT] (22/6) > {dict_variants} [DICT] (2/2) > {variant_2} [STR] : 'VARIANT-2' +[DICT] (22/6) > {dict_variants} [DICT] (2/1) > {variant_1} [STR] : 'VARIANT_1' +[DICT] (22/6) > {dict_variants} [DICT] (2/2) > {variant_2} [STR] : 'VARIANT_2' [DICT] (22/7) > {variant_key_1} [STR] : 'variant_1' [DICT] (22/8) > {INNERMOST_VARIANT_VALUE} [STR] : 'RIA' [DICT] (22/9) > {ARIAN} [STR] : 'ARIAN' [DICT] (22/10) > {VARIANT} [STR] : 'VARIANT' -[DICT] (22/11) > {milestone_1} [STR] : 'MILESTONE-1' -[DICT] (22/12) > {milestone_2} [STR] : 'MILESTONE-2' -[DICT] (22/13) > {milestone_3} [STR] : 'MILESTONE-3' +[DICT] (22/11) > {milestone_1} [STR] : 'MILESTONE_1' +[DICT] (22/12) > {milestone_2} [STR] : 'MILESTONE_2' +[DICT] (22/13) > {milestone_3} [STR] : 'MILESTONE_3' [DICT] (22/14) > {list_milestone_numbers} [LIST] (3/1) > [INT] : 1 [DICT] (22/14) > {list_milestone_numbers} [LIST] (3/2) > [INT] : 2 [DICT] (22/14) > {list_milestone_numbers} [LIST] (3/3) > [INT] : 3 [DICT] (22/15) > {list_milestone_index} [INT] : 1 [DICT] (22/16) > {milestone_number} [STR] : '2' -[DICT] (22/17) > {dict_milestones} [DICT] (3/1) > {milestone_1} [STR] : 'MILESTONE-1' -[DICT] (22/17) > {dict_milestones} [DICT] (3/2) > {milestone_2} [STR] : 'MILESTONE-2' -[DICT] (22/17) > {dict_milestones} [DICT] (3/3) > {milestone_3} [STR] : 'MILESTONE-3' +[DICT] (22/17) > {dict_milestones} [DICT] (3/1) > {milestone_1} [STR] : 'MILESTONE_1' +[DICT] (22/17) > {dict_milestones} [DICT] (3/2) > {milestone_2} [STR] : 'MILESTONE_2' +[DICT] (22/17) > {dict_milestones} [DICT] (3/3) > {milestone_3} [STR] : 'MILESTONE_3' [DICT] (22/18) > {milestone_key_2} [STR] : 'milestone_2' [DICT] (22/19) > {innermost_milestone_name} [STR] : 'est' [DICT] (22/20) > {ilesto} [STR] : 'ilesto' [DICT] (22/21) > {milestone} [STR] : 'milestone' -[DICT] (22/22) > {param} [STR] : 'VAR-VARIANT-1_MS-MILESTONE-2 value' +[DICT] (22/22) > {param} [STR] : 'VAR_VARIANT_1_MS_MILESTONE_2 value' """ # # # listofdictUsecases.append(dictUsecase) del dictUsecase @@ -936,34 +936,34 @@ dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0209.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None dictUsecase['EXPECTEDRETURN'] = """ -[DICT] (22/1) > {variant_1} [STR] : 'VARIANT-1' -[DICT] (22/2) > {variant_2} [STR] : 'VARIANT-2' +[DICT] (22/1) > {variant_1} [STR] : 'VARIANT_1' +[DICT] (22/2) > {variant_2} [STR] : 'VARIANT_2' [DICT] (22/3) > {list_variant_numbers} [LIST] (2/1) > [INT] : 1 [DICT] (22/3) > {list_variant_numbers} [LIST] (2/2) > [INT] : 2 [DICT] (22/4) > {list_variant_index} [INT] : 0 [DICT] (22/5) > {variant_number} [STR] : '1' -[DICT] (22/6) > {dict_variants} [DICT] (2/1) > {variant_1} [STR] : 'VARIANT-1' -[DICT] (22/6) > {dict_variants} [DICT] (2/2) > {variant_2} [STR] : 'VARIANT-2' +[DICT] (22/6) > {dict_variants} [DICT] (2/1) > {variant_1} [STR] : 'VARIANT_1' +[DICT] (22/6) > {dict_variants} [DICT] (2/2) > {variant_2} [STR] : 'VARIANT_2' [DICT] (22/7) > {variant_key_1} [STR] : 'variant_1' [DICT] (22/8) > {INNERMOST_VARIANT_VALUE} [STR] : 'RIA' [DICT] (22/9) > {ARIAN} [STR] : 'ARIAN' [DICT] (22/10) > {VARIANT} [STR] : 'VARIANT' -[DICT] (22/11) > {milestone_1} [STR] : 'MILESTONE-1' -[DICT] (22/12) > {milestone_2} [STR] : 'MILESTONE-2' -[DICT] (22/13) > {milestone_3} [STR] : 'MILESTONE-3' +[DICT] (22/11) > {milestone_1} [STR] : 'MILESTONE_1' +[DICT] (22/12) > {milestone_2} [STR] : 'MILESTONE_2' +[DICT] (22/13) > {milestone_3} [STR] : 'MILESTONE_3' [DICT] (22/14) > {list_milestone_numbers} [LIST] (3/1) > [INT] : 1 [DICT] (22/14) > {list_milestone_numbers} [LIST] (3/2) > [INT] : 2 [DICT] (22/14) > {list_milestone_numbers} [LIST] (3/3) > [INT] : 3 [DICT] (22/15) > {list_milestone_index} [INT] : 1 [DICT] (22/16) > {milestone_number} [STR] : '2' -[DICT] (22/17) > {dict_milestones} [DICT] (3/1) > {milestone_1} [STR] : 'MILESTONE-1' -[DICT] (22/17) > {dict_milestones} [DICT] (3/2) > {milestone_2} [STR] : 'MILESTONE-2' -[DICT] (22/17) > {dict_milestones} [DICT] (3/3) > {milestone_3} [STR] : 'MILESTONE-3' +[DICT] (22/17) > {dict_milestones} [DICT] (3/1) > {milestone_1} [STR] : 'MILESTONE_1' +[DICT] (22/17) > {dict_milestones} [DICT] (3/2) > {milestone_2} [STR] : 'MILESTONE_2' +[DICT] (22/17) > {dict_milestones} [DICT] (3/3) > {milestone_3} [STR] : 'MILESTONE_3' [DICT] (22/18) > {milestone_key_2} [STR] : 'milestone_2' [DICT] (22/19) > {innermost_milestone_name} [STR] : 'est' [DICT] (22/20) > {ilesto} [STR] : 'ilesto' [DICT] (22/21) > {milestone} [STR] : 'milestone' -[DICT] (22/22) > {param} [STR] : 'VAR-VARIANT-1_MS-MILESTONE-2 value' +[DICT] (22/22) > {param} [STR] : 'VAR_VARIANT_1_MS_MILESTONE_2 value' """ # # # listofdictUsecases.append(dictUsecase) del dictUsecase @@ -1888,7 +1888,7 @@ dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0508.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None dictUsecase['EXPECTEDRETURN'] = """ -[DICT] (1/1) > {teststring_1} [STR] : 'teststring_1.value.suffix_1' +[DICT] (1/1) > {teststring_1} [STR] : 'teststring_1.value.suffix-1' """ listofdictUsecases.append(dictUsecase) del dictUsecase @@ -2040,9 +2040,9 @@ dictUsecase['EXPECTEDEXCEPTION'] = None dictUsecase['EXPECTEDRETURN'] = """ [DICT] (2/1) > {dTestDict} [DICT] (5/1) > {kVal_1} [STR] : 'Val_1' -[DICT] (2/1) > {dTestDict} [DICT] (5/2) > {kVal_2} [DICT] (1/1) > {I-am-not-existing-1} [DICT] (1/1) > {I-am-not-existing-2} [STR] : 'Val_1' -[DICT] (2/1) > {dTestDict} [DICT] (5/3) > {kVal_3} [DICT] (1/1) > {I-am-not-existing-3} [DICT] (1/1) > {I-am-not-existing-4} [STR] : 'Val_1_extended' -[DICT] (2/1) > {dTestDict} [DICT] (5/4) > {kVal_3b} [DICT] (1/1) > {I-am-not-existing-3b} [DICT] (1/1) > {I-am-not-existing-4b} [STR] : 'Val_1' +[DICT] (2/1) > {dTestDict} [DICT] (5/2) > {kVal_2} [DICT] (1/1) > {I_am_not_existing_1} [DICT] (1/1) > {I_am_not_existing_2} [STR] : 'Val_1' +[DICT] (2/1) > {dTestDict} [DICT] (5/3) > {kVal_3} [DICT] (1/1) > {I_am_not_existing_3} [DICT] (1/1) > {I_am_not_existing_4} [STR] : 'Val_1_extended' +[DICT] (2/1) > {dTestDict} [DICT] (5/4) > {kVal_3b} [DICT] (1/1) > {I_am_not_existing_3b} [DICT] (1/1) > {I_am_not_existing_4b} [STR] : 'Val_1' [DICT] (2/1) > {dTestDict} [DICT] (5/5) > {kVal_4} [DICT] (1/1) > {kVal_4B} [DICT] (1/1) > {kVal_4C} [DICT] (3/1) > {A} [INT] : 1 [DICT] (2/1) > {dTestDict} [DICT] (5/5) > {kVal_4} [DICT] (1/1) > {kVal_4B} [DICT] (1/1) > {kVal_4C} [DICT] (3/2) > {B} [LIST] (2/1) > [INT] : 1 [DICT] (2/1) > {dTestDict} [DICT] (5/5) > {kVal_4} [DICT] (1/1) > {kVal_4B} [DICT] (1/1) > {kVal_4C} [DICT] (3/2) > {B} [LIST] (2/2) > [INT] : 2 diff --git a/test/testfiles/import/import.1/import.1.1/jpp-test_config_implicit_creation.1.1.1.jsonp b/test/testfiles/import/import.1/import.1.1/jpp-test_config_implicit_creation.1.1.1.jsonp index e0ad853a..91c512cc 100644 --- a/test/testfiles/import/import.1/import.1.1/jpp-test_config_implicit_creation.1.1.1.jsonp +++ b/test/testfiles/import/import.1/import.1.1/jpp-test_config_implicit_creation.1.1.1.jsonp @@ -15,7 +15,7 @@ { // use inside quotes the expression belonging to the data structure that has been created implicitly before: - "${dTestDict.kVal_3.I-am-not-existing-3.I-am-not-existing-4}" : "${dTestDict}['kVal_2']['I-am-not-existing-1']['I-am-not-existing-2']", + "${dTestDict.kVal_3.I_am_not_existing_3.I_am_not_existing_4}" : "${dTestDict}['kVal_2']['I_am_not_existing_1']['I_am_not_existing_2']", // mixture of dotdict and standard notation: ${dTestDict.kVal_4}['kVal_4B']['kVal_4C'] : {"A" : 1, "B" : [1,2]}, ${dTestDict.kVal_4.kVal_4B.kVal_4C.kVal_4D.kVal_4E}['kVal_4F']['kVal_4G'] : {"C" : 2, "D" : [3,4]} diff --git a/test/testfiles/import/import.1/jpp-test_config_implicit_creation.1.1.jsonp b/test/testfiles/import/import.1/jpp-test_config_implicit_creation.1.1.jsonp index ffb427aa..1a57b9e4 100644 --- a/test/testfiles/import/import.1/jpp-test_config_implicit_creation.1.1.jsonp +++ b/test/testfiles/import/import.1/jpp-test_config_implicit_creation.1.1.jsonp @@ -14,12 +14,12 @@ //************************************************************************** { - ${dTestDict}['kVal_2']['I-am-not-existing-1']['I-am-not-existing-2'] : ${dTestDict}['kVal_1'], + ${dTestDict}['kVal_2']['I_am_not_existing_1']['I_am_not_existing_2'] : ${dTestDict}['kVal_1'], // use what has been created implicitly before - ${dTestDict.kVal_3.I-am-not-existing-3.I-am-not-existing-4} : ${dTestDict}['kVal_2']['I-am-not-existing-1']['I-am-not-existing-2'], - ${dTestDict.kVal_3b.I-am-not-existing-3b.I-am-not-existing-4b} : ${dTestDict.kVal_2.I-am-not-existing-1.I-am-not-existing-2}, + ${dTestDict.kVal_3.I_am_not_existing_3.I_am_not_existing_4} : ${dTestDict}['kVal_2']['I_am_not_existing_1']['I_am_not_existing_2'], + ${dTestDict.kVal_3b.I_am_not_existing_3b.I_am_not_existing_4b} : ${dTestDict.kVal_2.I_am_not_existing_1.I_am_not_existing_2}, // overwrite what has been created implicitly before: - ${dTestDict}['kVal_3']['I-am-not-existing-3']['I-am-not-existing-4'] : "${dTestDict}['kVal_1']_extended", + ${dTestDict}['kVal_3']['I_am_not_existing_3']['I_am_not_existing_4'] : "${dTestDict}['kVal_1']_extended", // further assignments "[import]" : "./import.1.1/jpp-test_config_implicit_creation.1.1.1.jsonp" } diff --git a/test/testfiles/jpp-test_config_0200.jsonp b/test/testfiles/jpp-test_config_0200.jsonp index babcd94a..88442a45 100644 --- a/test/testfiles/jpp-test_config_0200.jsonp +++ b/test/testfiles/jpp-test_config_0200.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "variant_1" : "${V${A${INNERMOST_VARIANT_VALUE}N}T}-${variant_number} (new value)" + "variant_1" : "${V${A${INNERMOST_VARIANT_VALUE}N}T}_${variant_number} (new value)" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0201.jsonp b/test/testfiles/jpp-test_config_0201.jsonp index e6a0505d..00c21679 100644 --- a/test/testfiles/jpp-test_config_0201.jsonp +++ b/test/testfiles/jpp-test_config_0201.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "${m${il${innermost_milestone_name}o}ne}_${milestone_number}" : "MILESTONE-2 (new value)" + "${m${il${innermost_milestone_name}o}ne}_${milestone_number}" : "MILESTONE_2 (new value)" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0202.jsonp b/test/testfiles/jpp-test_config_0202.jsonp index 1aaee5e5..aa71d2f8 100644 --- a/test/testfiles/jpp-test_config_0202.jsonp +++ b/test/testfiles/jpp-test_config_0202.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "VAR-${variant_${list_variant_numbers}[${list_variant_index}]}_MS-${milestone_${list_milestone_numbers}[${list_milestone_index}]}_param" : "value" + "VAR_${variant_${list_variant_numbers}[${list_variant_index}]}_MS_${milestone_${list_milestone_numbers}[${list_milestone_index}]}_param" : "value" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0203.jsonp b/test/testfiles/jpp-test_config_0203.jsonp index 6ae69aec..f544c543 100644 --- a/test/testfiles/jpp-test_config_0203.jsonp +++ b/test/testfiles/jpp-test_config_0203.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "VAR-${variant_${list_variant_numbers.${list_variant_index}}}_MS-${milestone_${list_milestone_numbers.${list_milestone_index}}}_param" : "value" + "VAR_${variant_${list_variant_numbers.${list_variant_index}}}_MS_${milestone_${list_milestone_numbers.${list_milestone_index}}}_param" : "value" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0204.jsonp b/test/testfiles/jpp-test_config_0204.jsonp index b0c270bb..9d167315 100644 --- a/test/testfiles/jpp-test_config_0204.jsonp +++ b/test/testfiles/jpp-test_config_0204.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "param" : "VAR-${variant_${list_variant_numbers}[${list_variant_index}]}_MS-${milestone_${list_milestone_numbers}[${list_milestone_index}]} value" + "param" : "VAR_${variant_${list_variant_numbers}[${list_variant_index}]}_MS_${milestone_${list_milestone_numbers}[${list_milestone_index}]} value" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0205.jsonp b/test/testfiles/jpp-test_config_0205.jsonp index 195929dc..60695e7f 100644 --- a/test/testfiles/jpp-test_config_0205.jsonp +++ b/test/testfiles/jpp-test_config_0205.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "param" : "VAR-${variant_${list_variant_numbers.${list_variant_index}}}_MS-${milestone_${list_milestone_numbers.${list_milestone_index}}} value" + "param" : "VAR_${variant_${list_variant_numbers.${list_variant_index}}}_MS_${milestone_${list_milestone_numbers.${list_milestone_index}}} value" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0206.jsonp b/test/testfiles/jpp-test_config_0206.jsonp index 92d807cb..1406990b 100644 --- a/test/testfiles/jpp-test_config_0206.jsonp +++ b/test/testfiles/jpp-test_config_0206.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "VAR-${dict_variants}['${variant_key_${variant_number}}']_MS-${dict_milestones}['${milestone_key_${milestone_number}}']_param" : "value" + "VAR_${dict_variants}['${variant_key_${variant_number}}']_MS_${dict_milestones}['${milestone_key_${milestone_number}}']_param" : "value" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0207.jsonp b/test/testfiles/jpp-test_config_0207.jsonp index dc6a70cc..5738bc2e 100644 --- a/test/testfiles/jpp-test_config_0207.jsonp +++ b/test/testfiles/jpp-test_config_0207.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "VAR-${dict_variants.${variant_key_${variant_number}}}_MS-${dict_milestones.${milestone_key_${milestone_number}}}_param" : "value" + "VAR_${dict_variants.${variant_key_${variant_number}}}_MS_${dict_milestones.${milestone_key_${milestone_number}}}_param" : "value" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0208.jsonp b/test/testfiles/jpp-test_config_0208.jsonp index d19bf91e..165ed280 100644 --- a/test/testfiles/jpp-test_config_0208.jsonp +++ b/test/testfiles/jpp-test_config_0208.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "param" : "VAR-${dict_variants}['${variant_key_${variant_number}}']_MS-${dict_milestones}['${milestone_key_${milestone_number}}'] value" + "param" : "VAR_${dict_variants}['${variant_key_${variant_number}}']_MS_${dict_milestones}['${milestone_key_${milestone_number}}'] value" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0209.jsonp b/test/testfiles/jpp-test_config_0209.jsonp index a4794d1a..a24903a9 100644 --- a/test/testfiles/jpp-test_config_0209.jsonp +++ b/test/testfiles/jpp-test_config_0209.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "param" : "VAR-${dict_variants.${variant_key_${variant_number}}}_MS-${dict_milestones.${milestone_key_${milestone_number}}} value" + "param" : "VAR_${dict_variants.${variant_key_${variant_number}}}_MS_${dict_milestones.${milestone_key_${milestone_number}}} value" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0250.jsonp b/test/testfiles/jpp-test_config_0250.jsonp index e0ab2087..fff977c2 100644 --- a/test/testfiles/jpp-test_config_0250.jsonp +++ b/test/testfiles/jpp-test_config_0250.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "variant_1" : "${V${A${IAMNOTEXISTING}N}T}-${variant_number} (new value)" + "variant_1" : "${V${A${IAMNOTEXISTING}N}T}_${variant_number} (new value)" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0251.jsonp b/test/testfiles/jpp-test_config_0251.jsonp index d8d0e749..ad27cc7c 100644 --- a/test/testfiles/jpp-test_config_0251.jsonp +++ b/test/testfiles/jpp-test_config_0251.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "${m${IAMNOTEXISTING}ne}_${milestone_number}" : "MILESTONE-2 (new value)" + "${m${IAMNOTEXISTING}ne}_${milestone_number}" : "MILESTONE_2 (new value)" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0252.jsonp b/test/testfiles/jpp-test_config_0252.jsonp index 1d2dfc1c..752c0ac8 100644 --- a/test/testfiles/jpp-test_config_0252.jsonp +++ b/test/testfiles/jpp-test_config_0252.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "VAR-${variant_${list_variant_numbers}[${IAMNOTEXISTING}]}_MS-${milestone_${list_milestone_numbers}[${list_milestone_index}]}_param" : "value" + "VAR_${variant_${list_variant_numbers}[${IAMNOTEXISTING}]}_MS_${milestone_${list_milestone_numbers}[${list_milestone_index}]}_param" : "value" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0253.jsonp b/test/testfiles/jpp-test_config_0253.jsonp index dd1a18f3..48c193db 100644 --- a/test/testfiles/jpp-test_config_0253.jsonp +++ b/test/testfiles/jpp-test_config_0253.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "VAR-${variant_${list_variant_numbers.${list_variant_index}}}_MS-${milestone_${list_milestone_numbers.${IAMNOTEXISTING}}}_param" : "value" + "VAR_${variant_${list_variant_numbers.${list_variant_index}}}_MS_${milestone_${list_milestone_numbers.${IAMNOTEXISTING}}}_param" : "value" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0254.jsonp b/test/testfiles/jpp-test_config_0254.jsonp index dc34a68b..ce348e35 100644 --- a/test/testfiles/jpp-test_config_0254.jsonp +++ b/test/testfiles/jpp-test_config_0254.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "param" : "VAR-${variant_${list_variant_numbers}[${IAMNOTEXISTING}]}_MS-${milestone_${list_milestone_numbers}[${list_milestone_index}]} value" + "param" : "VAR_${variant_${list_variant_numbers}[${IAMNOTEXISTING}]}_MS_${milestone_${list_milestone_numbers}[${list_milestone_index}]} value" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0255.jsonp b/test/testfiles/jpp-test_config_0255.jsonp index 92be5fb1..47aeb65d 100644 --- a/test/testfiles/jpp-test_config_0255.jsonp +++ b/test/testfiles/jpp-test_config_0255.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "param" : "VAR-${variant_${list_variant_numbers.${list_variant_index}}}_MS-${milestone_${list_milestone_numbers.${IAMNOTEXISTING}}} value" + "param" : "VAR_${variant_${list_variant_numbers.${list_variant_index}}}_MS_${milestone_${list_milestone_numbers.${IAMNOTEXISTING}}} value" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0256.jsonp b/test/testfiles/jpp-test_config_0256.jsonp index d3ffebde..44246dce 100644 --- a/test/testfiles/jpp-test_config_0256.jsonp +++ b/test/testfiles/jpp-test_config_0256.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "VAR-${dict_variants}['${variant_key_${IAMNOTEXISTING}}']_MS-${dict_milestones}['${milestone_key_${milestone_number}}']_param" : "value" + "VAR_${dict_variants}['${variant_key_${IAMNOTEXISTING}}']_MS_${dict_milestones}['${milestone_key_${milestone_number}}']_param" : "value" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0257.jsonp b/test/testfiles/jpp-test_config_0257.jsonp index 03ca0550..fca68051 100644 --- a/test/testfiles/jpp-test_config_0257.jsonp +++ b/test/testfiles/jpp-test_config_0257.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "VAR-${dict_variants.${variant_key_${variant_number}}}_MS-${dict_milestones.${milestone_key_${IAMNOTEXISTING}}}_param" : "value" + "VAR_${dict_variants.${variant_key_${variant_number}}}_MS_${dict_milestones.${milestone_key_${IAMNOTEXISTING}}}_param" : "value" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0258.jsonp b/test/testfiles/jpp-test_config_0258.jsonp index 57047ab5..90aba9cb 100644 --- a/test/testfiles/jpp-test_config_0258.jsonp +++ b/test/testfiles/jpp-test_config_0258.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "param" : "VAR-${dict_variants}['${variant_key_${IAMNOTEXISTING}}']_MS-${dict_milestones}['${milestone_key_${milestone_number}}'] value" + "param" : "VAR_${dict_variants}['${variant_key_${IAMNOTEXISTING}}']_MS_${dict_milestones}['${milestone_key_${milestone_number}}'] value" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0259.jsonp b/test/testfiles/jpp-test_config_0259.jsonp index 5791f2f7..d64afdee 100644 --- a/test/testfiles/jpp-test_config_0259.jsonp +++ b/test/testfiles/jpp-test_config_0259.jsonp @@ -16,5 +16,5 @@ // taking over the already defined basic data types "[import]" : "./jpp-test_config_testdata_1.jsonp", // - "param" : "VAR-${dict_variants.${variant_key_${variant_number}}}_MS-${dict_milestones.${milestone_key_${IAMNOTEXISTING}}} value" + "param" : "VAR_${dict_variants.${variant_key_${variant_number}}}_MS-${dict_milestones.${milestone_key_${IAMNOTEXISTING}}} value" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0507.jsonp b/test/testfiles/jpp-test_config_0507.jsonp index 97775dfb..8a86fb2d 100644 --- a/test/testfiles/jpp-test_config_0507.jsonp +++ b/test/testfiles/jpp-test_config_0507.jsonp @@ -16,7 +16,7 @@ // reference: https://github.com/test-fullautomation/robotframework-testsuitesmanagement/issues/223 // "teststring_1" : "teststring_1.value", - ${teststring_1} : "${teststring_1}.suffix_1", + ${teststring_1} : "${teststring_1}.suffix-1", ${teststring_1} : "${teststring_1}.suffix-2", ${teststring_1} : "prefix.${teststring_1}.suffix-3" } diff --git a/test/testfiles/jpp-test_config_0508.jsonp b/test/testfiles/jpp-test_config_0508.jsonp index b0757bdc..f65e8bd6 100644 --- a/test/testfiles/jpp-test_config_0508.jsonp +++ b/test/testfiles/jpp-test_config_0508.jsonp @@ -14,5 +14,5 @@ //************************************************************************** { "teststring_1" : "teststring_1.value", - "teststring_1" : "${teststring_1}.suffix_1" + "teststring_1" : "${teststring_1}.suffix-1" } diff --git a/test/testfiles/jpp-test_config_testdata_1.jsonp b/test/testfiles/jpp-test_config_testdata_1.jsonp index 940bde8a..bb166a6d 100644 --- a/test/testfiles/jpp-test_config_testdata_1.jsonp +++ b/test/testfiles/jpp-test_config_testdata_1.jsonp @@ -14,12 +14,12 @@ //************************************************************************** { // variant info - "variant_1" : "VARIANT-1", - "variant_2" : "VARIANT-2", + "variant_1" : "VARIANT_1", + "variant_2" : "VARIANT_2", "list_variant_numbers" : [1, 2], "list_variant_index" : 0, "variant_number" : "1", - "dict_variants" : {"variant_1" : "VARIANT-1", "variant_2" : "VARIANT-2"}, + "dict_variants" : {"variant_1" : "VARIANT_1", "variant_2" : "VARIANT_2"}, "variant_key_1" : "variant_1", // "INNERMOST_VARIANT_VALUE" : "RIA", @@ -27,13 +27,13 @@ "VARIANT" : "VARIANT", // // milestone info - "milestone_1" : "MILESTONE-1", - "milestone_2" : "MILESTONE-2", - "milestone_3" : "MILESTONE-3", + "milestone_1" : "MILESTONE_1", + "milestone_2" : "MILESTONE_2", + "milestone_3" : "MILESTONE_3", "list_milestone_numbers" : [1, 2, 3], "list_milestone_index" : 1, "milestone_number" : "2", - "dict_milestones" : {"milestone_1" : "MILESTONE-1", "milestone_2" : "MILESTONE-2", "milestone_3" : "MILESTONE-3"}, + "dict_milestones" : {"milestone_1" : "MILESTONE_1", "milestone_2" : "MILESTONE_2", "milestone_3" : "MILESTONE_3"}, "milestone_key_2" : "milestone_2", // "innermost_milestone_name" : "est", From 9a66c266ad077492eac4c2abace6876a4fb78e60 Mon Sep 17 00:00:00 2001 From: mas2hc Date: Tue, 10 Oct 2023 13:58:25 +0700 Subject: [PATCH 7/7] Fixed the issue related to testcase ID JPP_0358 --- JsonPreprocessor/CJsonPreprocessor.py | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/JsonPreprocessor/CJsonPreprocessor.py b/JsonPreprocessor/CJsonPreprocessor.py index 59b974d0..4608f948 100644 --- a/JsonPreprocessor/CJsonPreprocessor.py +++ b/JsonPreprocessor/CJsonPreprocessor.py @@ -555,13 +555,18 @@ def __jsonUpdated(k, v, oJson, bNested, keyNested = ''): oJson[k] = v globals().update({k:v}) - def __loadNestedValue(sInputStr: str): + def __loadNestedValue(initValue: str, sInputStr: str): bStringValue = False if re.search("(str\(\s*" + pattern + "\))", sInputStr.lower()): sInputStr = re.sub("str\(\s*(" + pattern + ")\s*\)", "$\\1", sInputStr) bStringValue = True - else: + elif re.match("^\s*" + pattern + "\s*$", sInputStr): sInputStr = re.sub("\$", "$$", sInputStr) + else: + while "str(" in initValue: + initValue = re.sub("str\((" + pattern + ")\)", "\\1", initValue, count=1) + raise Exception(f"Invalid syntax! An opened or closed curly brackets are missing in value '{initValue}'.\n \ + Please check value '{initValue}' in config file!!!") sInputStr = self.__checkParamName(sInputStr) valueAfterProcessed = self.__nestedParamHandler(sInputStr) for valueProcessed in valueAfterProcessed: @@ -595,7 +600,7 @@ def __loadNestedValue(sInputStr: str): keyNested = k bNested = True while "${" in k: - k = __loadNestedValue(k) + k = __loadNestedValue(keyNested, k) elif re.match("^\s*" + pattern + "\s*$", k.lower()): keyNested = k k = re.sub("\$", "$$", k) @@ -616,32 +621,37 @@ def __loadNestedValue(sInputStr: str): for item in v: if isinstance(item, str) and re.search(pattern, item.lower()): bNested = True + initItem = item while isinstance(item, str) and "${" in item: - item = __loadNestedValue(item) + item = __loadNestedValue(initItem, item) tmpValue.append(item) v = tmpValue + del tmpValue else: i=1 while i str: