From 2099ab792f5d737149718e4012130ddbe37906e3 Mon Sep 17 00:00:00 2001 From: qth2hi Date: Thu, 14 Nov 2024 15:42:41 +0100 Subject: [PATCH] Self test adapted to latest changes in JsonPreprocessor code --- test/JPP_TestUsecases.csv | 25 +- test/JPP_TestUsecases.html | 447 +++++++++++++++--- test/JPP_TestUsecases.rst | 128 ++++- test/JPP_TestUsecases.txt | 72 ++- test/component_test.py | 4 +- .../test_15_FILE_IMPORTS_GOODCASE.py | 66 ++- .../test_16_FILE_IMPORTS_BADCASE.py | 10 +- .../test_26_PARAMETER_SCOPE_BADCASE.py | 50 +- test/testconfig/TestConfig.py | 172 ++++--- .../AA/BB/CC/imported.CC.C.jsonp | 2 +- .../AA/BB/CC/imported.CC.M.jsonp | 2 +- test/testfiles/jpp-test_config_1111.jsonp | 2 +- ..._2500.jsonp => jpp-test_config_2050.jsonp} | 0 ..._2501.jsonp => jpp-test_config_2051.jsonp} | 0 ..._2502.jsonp => jpp-test_config_2052.jsonp} | 0 ..._2503.jsonp => jpp-test_config_2053.jsonp} | 0 ..._2504.jsonp => jpp-test_config_2054.jsonp} | 0 ..._2505.jsonp => jpp-test_config_2055.jsonp} | 0 ..._2506.jsonp => jpp-test_config_2056.jsonp} | 0 ..._2507.jsonp => jpp-test_config_2057.jsonp} | 0 ..._2508.jsonp => jpp-test_config_2058.jsonp} | 0 21 files changed, 765 insertions(+), 215 deletions(-) rename test/testfiles/{jpp-test_config_2500.jsonp => jpp-test_config_2050.jsonp} (100%) rename test/testfiles/{jpp-test_config_2501.jsonp => jpp-test_config_2051.jsonp} (100%) rename test/testfiles/{jpp-test_config_2502.jsonp => jpp-test_config_2052.jsonp} (100%) rename test/testfiles/{jpp-test_config_2503.jsonp => jpp-test_config_2053.jsonp} (100%) rename test/testfiles/{jpp-test_config_2504.jsonp => jpp-test_config_2054.jsonp} (100%) rename test/testfiles/{jpp-test_config_2505.jsonp => jpp-test_config_2055.jsonp} (100%) rename test/testfiles/{jpp-test_config_2506.jsonp => jpp-test_config_2056.jsonp} (100%) rename test/testfiles/{jpp-test_config_2507.jsonp => jpp-test_config_2057.jsonp} (100%) rename test/testfiles/{jpp-test_config_2508.jsonp => jpp-test_config_2058.jsonp} (100%) diff --git a/test/JPP_TestUsecases.csv b/test/JPP_TestUsecases.csv index 46d1e8ca..278e4680 100644 --- a/test/JPP_TestUsecases.csv +++ b/test/JPP_TestUsecases.csv @@ -120,8 +120,17 @@ JPP_1100|FILE_IMPORTS|GOODCASE|JSON file import based on parameters (dynamic imp JPP_1101|FILE_IMPORTS|GOODCASE|JSON file import based on parameters (dynamic import (2)) JPP_1102|FILE_IMPORTS|GOODCASE|JSON file import based on parameters (dynamic import (3)) JPP_1103|FILE_IMPORTS|GOODCASE|JSON file import based on parameters (dynamic import (4)) +JPP_1104|FILE_IMPORTS|GOODCASE|JSON file import based on parameters (dynamic import (5)) +JPP_1105|FILE_IMPORTS|GOODCASE|JSON file import based on parameters (dynamic import (6)) +JPP_1106|FILE_IMPORTS|GOODCASE|JSON file import based on parameters (dynamic import, recursive (7)) +JPP_1107|FILE_IMPORTS|GOODCASE|JSON file import based on parameters (dynamic import, alternate (8)) +JPP_1108|FILE_IMPORTS|GOODCASE|JSON file import based on parameters (dynamic import, parallel (9)) +JPP_1109|FILE_IMPORTS|GOODCASE|JSON file import based on dictionary key values +JPP_1110|FILE_IMPORTS|GOODCASE|JSON file import based on list elemens +JPP_1111|FILE_IMPORTS|GOODCASE|JSON file import based on parameters (dynamic import (7)) JPP_1150|FILE_IMPORTS|BADCASE|JSON file with cyclic imports (JSON file imports itself, fix path) JPP_1151|FILE_IMPORTS|BADCASE|JSON file with cyclic imports (JSON file imports another file, that is already imported, fix path) +JPP_1154|FILE_IMPORTS|BADCASE|JSON file with not existing parameter within dynamic import path JPP_1155|FILE_IMPORTS|BADCASE|JSON file with not existing import file JPP_1158|FILE_IMPORTS|BADCASE|JSON file with error in [import] key (1) JPP_1159|FILE_IMPORTS|BADCASE|JSON file with error in [import] key (2) @@ -170,11 +179,11 @@ JPP_2001|PARAMETER_SCOPE|GOODCASE|JSON file with nested dictionary, in which a p JPP_2002|PARAMETER_SCOPE|GOODCASE|JSON file with nested dictionary, in which a parameter is overwritten (3) JPP_2003|PARAMETER_SCOPE|GOODCASE|JSON file with nested dictionary, in which a parameter is overwritten (4) JPP_2007|PARAMETER_SCOPE|GOODCASE|JSON file with nested dictionary, in which a parameter is overwritten (8) -JPP_2500|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (1) -JPP_2501|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (2) -JPP_2502|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (3) -JPP_2503|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (4) -JPP_2504|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (5) -JPP_2506|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (7) -JPP_2507|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (8) -JPP_2508|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (9) +JPP_2050|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (1) +JPP_2051|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (2) +JPP_2052|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (3) +JPP_2053|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (4) +JPP_2054|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (5) +JPP_2056|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (7) +JPP_2057|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (8) +JPP_2058|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (9) diff --git a/test/JPP_TestUsecases.html b/test/JPP_TestUsecases.html index 8eced064..133a4e2b 100644 --- a/test/JPP_TestUsecases.html +++ b/test/JPP_TestUsecases.html @@ -4026,6 +4026,272 @@ 121 + + + +JPP_1104 + + + + +FILE_IMPORTS + + + + +GOODCASE + + + + +JSON file import based on parameters (dynamic import (5))
+Expected: JsonPreprocessor returns values + + +
+ + + + + + + +122 + + + + + +JPP_1105 + + + + +FILE_IMPORTS + + + + +GOODCASE + + + + +JSON file import based on parameters (dynamic import (6))
+Expected: JsonPreprocessor returns values + + +
+ + + + + + + +123 + + + + + +JPP_1106 + + + + +FILE_IMPORTS + + + + +GOODCASE + + + + +JSON file import based on parameters (dynamic import, recursive (7))
+Expected: JsonPreprocessor returns values + + +
+ + + + + + + +124 + + + + + +JPP_1107 + + + + +FILE_IMPORTS + + + + +GOODCASE + + + + +JSON file import based on parameters (dynamic import, alternate (8))
+Expected: JsonPreprocessor returns values +
+The recursive import occurs alternately in a dynamic or fixed manner + +
+ + + + + + + +125 + + + + + +JPP_1108 + + + + +FILE_IMPORTS + + + + +GOODCASE + + + + +JSON file import based on parameters (dynamic import, parallel (9))
+Expected: JsonPreprocessor returns values +
+The recursive import occurs in two import trees running in parallel with alternately in a dynamic or fixed manner + +
+ + + + + + + +126 + + + + + +JPP_1109 + + + + +FILE_IMPORTS + + + + +GOODCASE + + + + +JSON file import based on dictionary key values
+Expected: JsonPreprocessor returns values + + +
+ + + + + + + +127 + + + + + +JPP_1110 + + + + +FILE_IMPORTS + + + + +GOODCASE + + + + +JSON file import based on list elemens
+Expected: JsonPreprocessor returns values + + +
+ + + + + + + +128 + + + + + +JPP_1111 + + + + +FILE_IMPORTS + + + + +GOODCASE + + + + +JSON file import based on parameters (dynamic import (7))
+Expected: JsonPreprocessor returns values + + +
+ + + + + + + +129 + + @@ -4057,7 +4323,7 @@ -122 +130 @@ -4091,7 +4357,40 @@ -123 +131 + + + + + +JPP_1154 + + + + +FILE_IMPORTS + + + + +BADCASE + + + + +JSON file with not existing parameter within dynamic import path
+Expected: No values are returned, and JsonPreprocessor throws an exception + + +
+ + + + + + + +132 @@ -4124,7 +4423,7 @@ -124 +133 @@ -4157,7 +4456,7 @@ -125 +134 @@ -4190,7 +4489,7 @@ -126 +135 @@ -4223,7 +4522,7 @@ -127 +136 @@ -4257,7 +4556,7 @@ -128 +137 @@ -4290,7 +4589,7 @@ -129 +138 @@ -4323,7 +4622,7 @@ -130 +139 @@ -4356,7 +4655,7 @@ -131 +140 @@ -4389,7 +4688,7 @@ -132 +141 @@ -4422,7 +4721,7 @@ -133 +142 @@ -4455,7 +4754,7 @@ -134 +143 @@ -4488,7 +4787,7 @@ -135 +144 @@ -4521,7 +4820,7 @@ -136 +145 @@ -4554,7 +4853,7 @@ -137 +146 @@ -4587,7 +4886,7 @@ -138 +147 @@ -4620,7 +4919,7 @@ -139 +148 @@ -4653,7 +4952,7 @@ -140 +149 @@ -4686,7 +4985,7 @@ -141 +150 @@ -4719,7 +5018,7 @@ -142 +151 @@ -4752,7 +5051,7 @@ -143 +152 @@ -4785,7 +5084,7 @@ -144 +153 @@ -4818,7 +5117,7 @@ -145 +154 @@ -4851,7 +5150,7 @@ -146 +155 @@ -4884,7 +5183,7 @@ -147 +156 @@ -4917,7 +5216,7 @@ -148 +157 @@ -4950,7 +5249,7 @@ -149 +158 @@ -4983,7 +5282,7 @@ -150 +159 @@ -5016,7 +5315,7 @@ -151 +160 @@ -5049,7 +5348,7 @@ -152 +161 @@ -5082,7 +5381,7 @@ -153 +162 @@ -5115,7 +5414,7 @@ -154 +163 @@ -5148,7 +5447,7 @@ -155 +164 @@ -5181,7 +5480,7 @@ -156 +165 @@ -5214,7 +5513,7 @@ -157 +166 @@ -5247,7 +5546,7 @@ -158 +167 @@ -5280,7 +5579,7 @@ -159 +168 @@ -5313,7 +5612,7 @@ -160 +169 @@ -5346,7 +5645,7 @@ -161 +170 @@ -5379,7 +5678,7 @@ -162 +171 @@ -5412,7 +5711,7 @@ -163 +172 @@ -5445,7 +5744,7 @@ -164 +173 @@ -5478,7 +5777,7 @@ -165 +174 @@ -5511,7 +5810,7 @@ -166 +175 @@ -5544,7 +5843,7 @@ -167 +176 @@ -5577,7 +5876,7 @@ -168 +177 @@ -5610,7 +5909,7 @@ -169 +178 @@ -5643,7 +5942,7 @@ -170 +179 @@ -5676,13 +5975,13 @@ -171 +180 -JPP_2500 +JPP_2050 @@ -5698,7 +5997,7 @@ JSON file containing a parameter with missing scope (1)
-Expected: JsonPreprocessor returns expected value +Expected: No values are returned, and JsonPreprocessor throws an exception
@@ -5709,13 +6008,13 @@ -172 +181 -JPP_2501 +JPP_2051 @@ -5731,7 +6030,7 @@ JSON file containing a parameter with missing scope (2)
-Expected: JsonPreprocessor returns expected value +Expected: No values are returned, and JsonPreprocessor throws an exception
@@ -5742,13 +6041,13 @@ -173 +182 -JPP_2502 +JPP_2052 @@ -5764,7 +6063,7 @@ JSON file containing a parameter with missing scope (3)
-Expected: JsonPreprocessor returns expected value +Expected: No values are returned, and JsonPreprocessor throws an exception
@@ -5775,13 +6074,13 @@ -174 +183 -JPP_2503 +JPP_2053 @@ -5797,7 +6096,7 @@ JSON file containing a parameter with missing scope (4)
-Expected: JsonPreprocessor returns expected value +Expected: No values are returned, and JsonPreprocessor throws an exception
@@ -5808,13 +6107,13 @@ -175 +184 -JPP_2504 +JPP_2054 @@ -5830,7 +6129,7 @@ JSON file containing a parameter with missing scope (5)
-Expected: JsonPreprocessor returns expected value +Expected: No values are returned, and JsonPreprocessor throws an exception
@@ -5841,13 +6140,13 @@ -176 +185 -JPP_2506 +JPP_2056 @@ -5863,7 +6162,7 @@ JSON file containing a parameter with missing scope (7)
-Expected: JsonPreprocessor returns expected value +Expected: No values are returned, and JsonPreprocessor throws an exception
@@ -5874,13 +6173,13 @@ -177 +186 -JPP_2507 +JPP_2057 @@ -5896,7 +6195,7 @@ JSON file containing a parameter with missing scope (8)
-Expected: JsonPreprocessor returns expected value +Expected: No values are returned, and JsonPreprocessor throws an exception
@@ -5907,13 +6206,13 @@ -178 +187 -JPP_2508 +JPP_2058 @@ -5929,7 +6228,7 @@ JSON file containing a parameter with missing scope (9)
-Expected: JsonPreprocessor returns expected value +Expected: No values are returned, and JsonPreprocessor throws an exception
@@ -5940,7 +6239,7 @@
 

-
Generated: 06.11.2024 - 18:29:18
+
Generated: 14.11.2024 - 15:38:04
 
diff --git a/test/JPP_TestUsecases.rst b/test/JPP_TestUsecases.rst index 5507d7dd..310f6569 100644 --- a/test/JPP_TestUsecases.rst +++ b/test/JPP_TestUsecases.rst @@ -1279,6 +1279,90 @@ Test Use Cases ---- +* **Test JPP_1104** + + [FILE_IMPORTS / GOODCASE] + + **JSON file import based on parameters (dynamic import (5))** + + Expected: JsonPreprocessor returns values + +---- + +* **Test JPP_1105** + + [FILE_IMPORTS / GOODCASE] + + **JSON file import based on parameters (dynamic import (6))** + + Expected: JsonPreprocessor returns values + +---- + +* **Test JPP_1106** + + [FILE_IMPORTS / GOODCASE] + + **JSON file import based on parameters (dynamic import, recursive (7))** + + Expected: JsonPreprocessor returns values + +---- + +* **Test JPP_1107** + + [FILE_IMPORTS / GOODCASE] + + **JSON file import based on parameters (dynamic import, alternate (8))** + + Expected: JsonPreprocessor returns values + + *Comment: The recursive import occurs alternately in a dynamic or fixed manner* + +---- + +* **Test JPP_1108** + + [FILE_IMPORTS / GOODCASE] + + **JSON file import based on parameters (dynamic import, parallel (9))** + + Expected: JsonPreprocessor returns values + + *Comment: The recursive import occurs in two import trees running in parallel with alternately in a dynamic or fixed manner* + +---- + +* **Test JPP_1109** + + [FILE_IMPORTS / GOODCASE] + + **JSON file import based on dictionary key values** + + Expected: JsonPreprocessor returns values + +---- + +* **Test JPP_1110** + + [FILE_IMPORTS / GOODCASE] + + **JSON file import based on list elemens** + + Expected: JsonPreprocessor returns values + +---- + +* **Test JPP_1111** + + [FILE_IMPORTS / GOODCASE] + + **JSON file import based on parameters (dynamic import (7))** + + Expected: JsonPreprocessor returns values + +---- + * **Test JPP_1150** [FILE_IMPORTS / BADCASE] @@ -1303,6 +1387,16 @@ Test Use Cases ---- +* **Test JPP_1154** + + [FILE_IMPORTS / BADCASE] + + **JSON file with not existing parameter within dynamic import path** + + Expected: No values are returned, and JsonPreprocessor throws an exception + +---- + * **Test JPP_1155** [FILE_IMPORTS / BADCASE] @@ -1785,85 +1879,85 @@ Test Use Cases ---- -* **Test JPP_2500** +* **Test JPP_2050** [PARAMETER_SCOPE / BADCASE] **JSON file containing a parameter with missing scope (1)** - Expected: JsonPreprocessor returns expected value + Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_2501** +* **Test JPP_2051** [PARAMETER_SCOPE / BADCASE] **JSON file containing a parameter with missing scope (2)** - Expected: JsonPreprocessor returns expected value + Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_2502** +* **Test JPP_2052** [PARAMETER_SCOPE / BADCASE] **JSON file containing a parameter with missing scope (3)** - Expected: JsonPreprocessor returns expected value + Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_2503** +* **Test JPP_2053** [PARAMETER_SCOPE / BADCASE] **JSON file containing a parameter with missing scope (4)** - Expected: JsonPreprocessor returns expected value + Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_2504** +* **Test JPP_2054** [PARAMETER_SCOPE / BADCASE] **JSON file containing a parameter with missing scope (5)** - Expected: JsonPreprocessor returns expected value + Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_2506** +* **Test JPP_2056** [PARAMETER_SCOPE / BADCASE] **JSON file containing a parameter with missing scope (7)** - Expected: JsonPreprocessor returns expected value + Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_2507** +* **Test JPP_2057** [PARAMETER_SCOPE / BADCASE] **JSON file containing a parameter with missing scope (8)** - Expected: JsonPreprocessor returns expected value + Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_2508** +* **Test JPP_2058** [PARAMETER_SCOPE / BADCASE] **JSON file containing a parameter with missing scope (9)** - Expected: JsonPreprocessor returns expected value + Expected: No values are returned, and JsonPreprocessor throws an exception ---- -Generated: 06.11.2024 - 18:29:18 +Generated: 14.11.2024 - 15:38:04 diff --git a/test/JPP_TestUsecases.txt b/test/JPP_TestUsecases.txt index 659b8066..860b0c68 100644 --- a/test/JPP_TestUsecases.txt +++ b/test/JPP_TestUsecases.txt @@ -527,6 +527,40 @@ Test JPP_1103 / FILE_IMPORTS / GOODCASE Description: JSON file import based on parameters (dynamic import (4)) Expectation: JsonPreprocessor returns values ------------------------------------------------------------------------------------------------------------------------ +Test JPP_1104 / FILE_IMPORTS / GOODCASE +Description: JSON file import based on parameters (dynamic import (5)) +Expectation: JsonPreprocessor returns values +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1105 / FILE_IMPORTS / GOODCASE +Description: JSON file import based on parameters (dynamic import (6)) +Expectation: JsonPreprocessor returns values +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1106 / FILE_IMPORTS / GOODCASE +Description: JSON file import based on parameters (dynamic import, recursive (7)) +Expectation: JsonPreprocessor returns values +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1107 / FILE_IMPORTS / GOODCASE +Description: JSON file import based on parameters (dynamic import, alternate (8)) +Expectation: JsonPreprocessor returns values +Comment....: The recursive import occurs alternately in a dynamic or fixed manner +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1108 / FILE_IMPORTS / GOODCASE +Description: JSON file import based on parameters (dynamic import, parallel (9)) +Expectation: JsonPreprocessor returns values +Comment....: The recursive import occurs in two import trees running in parallel with alternately in a dynamic or fixed manner +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1109 / FILE_IMPORTS / GOODCASE +Description: JSON file import based on dictionary key values +Expectation: JsonPreprocessor returns values +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1110 / FILE_IMPORTS / GOODCASE +Description: JSON file import based on list elemens +Expectation: JsonPreprocessor returns values +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1111 / FILE_IMPORTS / GOODCASE +Description: JSON file import based on parameters (dynamic import (7)) +Expectation: JsonPreprocessor returns values +------------------------------------------------------------------------------------------------------------------------ Test JPP_1150 / FILE_IMPORTS / BADCASE Description: JSON file with cyclic imports (JSON file imports itself, fix path) Expectation: No values are returned, and JsonPreprocessor throws an exception @@ -537,6 +571,10 @@ Description: JSON file with cyclic imports (JSON file imports another file, that Expectation: No values are returned, and JsonPreprocessor throws an exception Comment....: Cyclic import ------------------------------------------------------------------------------------------------------------------------ +Test JPP_1154 / FILE_IMPORTS / BADCASE +Description: JSON file with not existing parameter within dynamic import path +Expectation: No values are returned, and JsonPreprocessor throws an exception +------------------------------------------------------------------------------------------------------------------------ Test JPP_1155 / FILE_IMPORTS / BADCASE Description: JSON file with not existing import file Expectation: No values are returned, and JsonPreprocessor throws an exception @@ -730,37 +768,37 @@ Test JPP_2007 / PARAMETER_SCOPE / GOODCASE Description: JSON file with nested dictionary, in which a parameter is overwritten (8) Expectation: JsonPreprocessor returns expected value ------------------------------------------------------------------------------------------------------------------------ -Test JPP_2500 / PARAMETER_SCOPE / BADCASE +Test JPP_2050 / PARAMETER_SCOPE / BADCASE Description: JSON file containing a parameter with missing scope (1) -Expectation: JsonPreprocessor returns expected value +Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ -Test JPP_2501 / PARAMETER_SCOPE / BADCASE +Test JPP_2051 / PARAMETER_SCOPE / BADCASE Description: JSON file containing a parameter with missing scope (2) -Expectation: JsonPreprocessor returns expected value +Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ -Test JPP_2502 / PARAMETER_SCOPE / BADCASE +Test JPP_2052 / PARAMETER_SCOPE / BADCASE Description: JSON file containing a parameter with missing scope (3) -Expectation: JsonPreprocessor returns expected value +Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ -Test JPP_2503 / PARAMETER_SCOPE / BADCASE +Test JPP_2053 / PARAMETER_SCOPE / BADCASE Description: JSON file containing a parameter with missing scope (4) -Expectation: JsonPreprocessor returns expected value +Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ -Test JPP_2504 / PARAMETER_SCOPE / BADCASE +Test JPP_2054 / PARAMETER_SCOPE / BADCASE Description: JSON file containing a parameter with missing scope (5) -Expectation: JsonPreprocessor returns expected value +Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ -Test JPP_2506 / PARAMETER_SCOPE / BADCASE +Test JPP_2056 / PARAMETER_SCOPE / BADCASE Description: JSON file containing a parameter with missing scope (7) -Expectation: JsonPreprocessor returns expected value +Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ -Test JPP_2507 / PARAMETER_SCOPE / BADCASE +Test JPP_2057 / PARAMETER_SCOPE / BADCASE Description: JSON file containing a parameter with missing scope (8) -Expectation: JsonPreprocessor returns expected value +Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ -Test JPP_2508 / PARAMETER_SCOPE / BADCASE +Test JPP_2058 / PARAMETER_SCOPE / BADCASE Description: JSON file containing a parameter with missing scope (9) -Expectation: JsonPreprocessor returns expected value +Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ -Generated: 06.11.2024 - 18:29:18 +Generated: 14.11.2024 - 15:38:04 diff --git a/test/component_test.py b/test/component_test.py index b10753a0..29dbbc3b 100644 --- a/test/component_test.py +++ b/test/component_test.py @@ -22,8 +22,8 @@ # # -------------------------------------------------------------------------------------------------------------- # -VERSION = "0.51.0" -VERSION_DATE = "07.11.2024" +VERSION = "0.52.0" +VERSION_DATE = "14.11.2024" # # -------------------------------------------------------------------------------------------------------------- #TM*** diff --git a/test/pytest/pytestfiles/test_15_FILE_IMPORTS_GOODCASE.py b/test/pytest/pytestfiles/test_15_FILE_IMPORTS_GOODCASE.py index 242194b4..c3680cec 100644 --- a/test/pytest/pytestfiles/test_15_FILE_IMPORTS_GOODCASE.py +++ b/test/pytest/pytestfiles/test_15_FILE_IMPORTS_GOODCASE.py @@ -18,7 +18,7 @@ # # XC-HWP/ESW3-Queckenstedt # -# 06.11.2024 - 18:29:18 +# 14.11.2024 - 15:38:04 # # -------------------------------------------------------------------------------------------------------------- @@ -61,4 +61,68 @@ def test_JPP_1102(self, Description): def test_JPP_1103(self, Description): nReturn = CExecute.Execute("JPP_1103") assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns values + @pytest.mark.parametrize( + "Description", ["JSON file import based on parameters (dynamic import (5))",] + ) + def test_JPP_1104(self, Description): + nReturn = CExecute.Execute("JPP_1104") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns values + @pytest.mark.parametrize( + "Description", ["JSON file import based on parameters (dynamic import (6))",] + ) + def test_JPP_1105(self, Description): + nReturn = CExecute.Execute("JPP_1105") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns values + @pytest.mark.parametrize( + "Description", ["JSON file import based on parameters (dynamic import, recursive (7))",] + ) + def test_JPP_1106(self, Description): + nReturn = CExecute.Execute("JPP_1106") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns values + @pytest.mark.parametrize( + "Description", ["JSON file import based on parameters (dynamic import, alternate (8))",] + ) + def test_JPP_1107(self, Description): + nReturn = CExecute.Execute("JPP_1107") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns values + @pytest.mark.parametrize( + "Description", ["JSON file import based on parameters (dynamic import, parallel (9))",] + ) + def test_JPP_1108(self, Description): + nReturn = CExecute.Execute("JPP_1108") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns values + @pytest.mark.parametrize( + "Description", ["JSON file import based on dictionary key values",] + ) + def test_JPP_1109(self, Description): + nReturn = CExecute.Execute("JPP_1109") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns values + @pytest.mark.parametrize( + "Description", ["JSON file import based on list elemens",] + ) + def test_JPP_1110(self, Description): + nReturn = CExecute.Execute("JPP_1110") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns values + @pytest.mark.parametrize( + "Description", ["JSON file import based on parameters (dynamic import (7))",] + ) + def test_JPP_1111(self, Description): + nReturn = CExecute.Execute("JPP_1111") + assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_16_FILE_IMPORTS_BADCASE.py b/test/pytest/pytestfiles/test_16_FILE_IMPORTS_BADCASE.py index 1def71e3..929e4fe1 100644 --- a/test/pytest/pytestfiles/test_16_FILE_IMPORTS_BADCASE.py +++ b/test/pytest/pytestfiles/test_16_FILE_IMPORTS_BADCASE.py @@ -18,7 +18,7 @@ # # XC-HWP/ESW3-Queckenstedt # -# 06.11.2024 - 18:29:18 +# 14.11.2024 - 15:38:04 # # -------------------------------------------------------------------------------------------------------------- @@ -45,6 +45,14 @@ def test_JPP_1150(self, Description): def test_JPP_1151(self, Description): nReturn = CExecute.Execute("JPP_1151") assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with not existing parameter within dynamic import path",] + ) + def test_JPP_1154(self, Description): + nReturn = CExecute.Execute("JPP_1154") + assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( diff --git a/test/pytest/pytestfiles/test_26_PARAMETER_SCOPE_BADCASE.py b/test/pytest/pytestfiles/test_26_PARAMETER_SCOPE_BADCASE.py index d1f821be..4bcda173 100644 --- a/test/pytest/pytestfiles/test_26_PARAMETER_SCOPE_BADCASE.py +++ b/test/pytest/pytestfiles/test_26_PARAMETER_SCOPE_BADCASE.py @@ -18,7 +18,7 @@ # # XC-HWP/ESW3-Queckenstedt # -# 06.11.2024 - 18:29:18 +# 14.11.2024 - 15:38:04 # # -------------------------------------------------------------------------------------------------------------- @@ -30,67 +30,67 @@ class Test_PARAMETER_SCOPE_BADCASE: # -------------------------------------------------------------------------------------------------------------- - # Expected: JsonPreprocessor returns expected value + # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( "Description", ["JSON file containing a parameter with missing scope (1)",] ) - def test_JPP_2500(self, Description): - nReturn = CExecute.Execute("JPP_2500") + def test_JPP_2050(self, Description): + nReturn = CExecute.Execute("JPP_2050") assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- - # Expected: JsonPreprocessor returns expected value + # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( "Description", ["JSON file containing a parameter with missing scope (2)",] ) - def test_JPP_2501(self, Description): - nReturn = CExecute.Execute("JPP_2501") + def test_JPP_2051(self, Description): + nReturn = CExecute.Execute("JPP_2051") assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- - # Expected: JsonPreprocessor returns expected value + # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( "Description", ["JSON file containing a parameter with missing scope (3)",] ) - def test_JPP_2502(self, Description): - nReturn = CExecute.Execute("JPP_2502") + def test_JPP_2052(self, Description): + nReturn = CExecute.Execute("JPP_2052") assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- - # Expected: JsonPreprocessor returns expected value + # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( "Description", ["JSON file containing a parameter with missing scope (4)",] ) - def test_JPP_2503(self, Description): - nReturn = CExecute.Execute("JPP_2503") + def test_JPP_2053(self, Description): + nReturn = CExecute.Execute("JPP_2053") assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- - # Expected: JsonPreprocessor returns expected value + # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( "Description", ["JSON file containing a parameter with missing scope (5)",] ) - def test_JPP_2504(self, Description): - nReturn = CExecute.Execute("JPP_2504") + def test_JPP_2054(self, Description): + nReturn = CExecute.Execute("JPP_2054") assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- - # Expected: JsonPreprocessor returns expected value + # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( "Description", ["JSON file containing a parameter with missing scope (7)",] ) - def test_JPP_2506(self, Description): - nReturn = CExecute.Execute("JPP_2506") + def test_JPP_2056(self, Description): + nReturn = CExecute.Execute("JPP_2056") assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- - # Expected: JsonPreprocessor returns expected value + # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( "Description", ["JSON file containing a parameter with missing scope (8)",] ) - def test_JPP_2507(self, Description): - nReturn = CExecute.Execute("JPP_2507") + def test_JPP_2057(self, Description): + nReturn = CExecute.Execute("JPP_2057") assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- - # Expected: JsonPreprocessor returns expected value + # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( "Description", ["JSON file containing a parameter with missing scope (9)",] ) - def test_JPP_2508(self, Description): - nReturn = CExecute.Execute("JPP_2508") + def test_JPP_2058(self, Description): + nReturn = CExecute.Execute("JPP_2058") assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- diff --git a/test/testconfig/TestConfig.py b/test/testconfig/TestConfig.py index afd793e3..e93bec79 100644 --- a/test/testconfig/TestConfig.py +++ b/test/testconfig/TestConfig.py @@ -22,7 +22,7 @@ # # -------------------------------------------------------------------------------------------------------------- # -# 07.11.2024 +# 14.11.2024 # # !!! Temporarily tests are deactivated by the following line commented out: # # # listofdictUsecases.append(dictUsecase) @@ -2888,7 +2888,6 @@ del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -# https://github.com/test-fullautomation/python-jsonpreprocessor/issues/372 dictUsecase['TESTID'] = "JPP_1104" dictUsecase['DESCRIPTION'] = "JSON file import based on parameters (dynamic import (5))" dictUsecase['EXPECTATION'] = "JsonPreprocessor returns values" @@ -2897,13 +2896,17 @@ dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1104.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = None # 'File '%cwd%/dynamic_imports/AA/imported.AA.jsonp' is not existing!'! -dictUsecase['EXPECTEDRETURN'] = None -# # # listofdictUsecases.append(dictUsecase) +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (4/1) > {cwd} [STR] : '.' +[DOTDICT] (4/2) > {path_sep_1} [STR] : '/' +[DOTDICT] (4/3) > {path_sep_2} [STR] : '\\' +[DOTDICT] (4/4) > {level} [STR] : 'AA' +""" +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -# https://github.com/test-fullautomation/python-jsonpreprocessor/issues/372 dictUsecase['TESTID'] = "JPP_1105" dictUsecase['DESCRIPTION'] = "JSON file import based on parameters (dynamic import (6))" dictUsecase['EXPECTATION'] = "JsonPreprocessor returns values" @@ -2912,13 +2915,19 @@ dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1105.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = None # 'File '%P1%_imports/AA/imported.AA.jsonp' is not existing!'! -dictUsecase['EXPECTEDRETURN'] = None -# # # listofdictUsecases.append(dictUsecase) +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (6/1) > {P1} [STR] : './dynamic' +[DOTDICT] (6/2) > {P2} [STR] : '_import' +[DOTDICT] (6/3) > {P3} [STR] : 's/AA/imp' +[DOTDICT] (6/4) > {P4} [STR] : 'orted.A' +[DOTDICT] (6/5) > {P5} [STR] : 'A.jsonp' +[DOTDICT] (6/6) > {level} [STR] : 'AA' +""" +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -# https://github.com/test-fullautomation/python-jsonpreprocessor/pull/378 dictUsecase['TESTID'] = "JPP_1106" dictUsecase['DESCRIPTION'] = "JSON file import based on parameters (dynamic import, recursive (7))" dictUsecase['EXPECTATION'] = "JsonPreprocessor returns values" @@ -2928,12 +2937,18 @@ dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1106.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None -dictUsecase['EXPECTEDRETURN'] = None # computation stops at level 'AA', and import of level 'BB' is not resolved -# # # listofdictUsecases.append(dictUsecase) +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (6/1) > {AA} [STR] : 'AA' +[DOTDICT] (6/2) > {BB} [STR] : 'BB' +[DOTDICT] (6/3) > {CC} [STR] : 'CC' +[DOTDICT] (6/4) > {DD} [STR] : 'DD' +[DOTDICT] (6/5) > {level} [STR] : 'DD.2' +[DOTDICT] (6/6) > {origin} [STR] : 'DD.AA' +""" +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -# https://github.com/test-fullautomation/python-jsonpreprocessor/pull/378 dictUsecase['TESTID'] = "JPP_1107" dictUsecase['DESCRIPTION'] = "JSON file import based on parameters (dynamic import, alternate (8))" dictUsecase['EXPECTATION'] = "JsonPreprocessor returns values" @@ -2943,12 +2958,17 @@ dictUsecase['COMMENT'] = "The recursive import occurs alternately in a dynamic or fixed manner" dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1107.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None -dictUsecase['EXPECTEDRETURN'] = None # computation stops at level 'BB', and import of level 'CC' is not resolved -# # # listofdictUsecases.append(dictUsecase) +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (5/1) > {AA} [STR] : 'AA' +[DOTDICT] (5/2) > {BB} [STR] : 'BB' +[DOTDICT] (5/3) > {CC} [STR] : 'CC' +[DOTDICT] (5/4) > {DD} [STR] : 'DD' +[DOTDICT] (5/5) > {level} [STR] : 'DD.3' +""" +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -# https://github.com/test-fullautomation/python-jsonpreprocessor/pull/378 dictUsecase['TESTID'] = "JPP_1108" dictUsecase['DESCRIPTION'] = "JSON file import based on parameters (dynamic import, parallel (9))" dictUsecase['EXPECTATION'] = "JsonPreprocessor returns values" @@ -2958,12 +2978,17 @@ dictUsecase['COMMENT'] = "The recursive import occurs in two import trees running in parallel with alternately in a dynamic or fixed manner" dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1108.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None -dictUsecase['EXPECTEDRETURN'] = None # expected 'DD.P.2.2.2' instead of 'DD.P.2.1.2'; reason: import not resolved -# # # listofdictUsecases.append(dictUsecase) +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (5/1) > {AA} [STR] : 'AA' +[DOTDICT] (5/2) > {BB} [STR] : 'BB' +[DOTDICT] (5/3) > {CC} [STR] : 'CC' +[DOTDICT] (5/4) > {DD} [STR] : 'DD' +[DOTDICT] (5/5) > {level} [STR] : 'DD.P.2.2.2' +""" +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -# https://github.com/test-fullautomation/python-jsonpreprocessor/issues/382 dictUsecase['TESTID'] = "JPP_1109" dictUsecase['DESCRIPTION'] = "JSON file import based on dictionary key values" dictUsecase['EXPECTATION'] = "JsonPreprocessor returns values" @@ -2972,13 +2997,16 @@ dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1109.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = None # currently: 'File '%import_files%['fileBB']__ConvertParameterToString__' is not existing!'! -dictUsecase['EXPECTEDRETURN'] = None -# # # listofdictUsecases.append(dictUsecase) +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (2/1) > {import_files} [DOTDICT] (2/1) > {fileAA} [STR] : './dynamic_imports/AA/imported.AA.jsonp' +[DOTDICT] (2/1) > {import_files} [DOTDICT] (2/2) > {fileBB} [STR] : './dynamic_imports/AA/BB/imported.BB.jsonp' +[DOTDICT] (2/2) > {level} [STR] : 'BB' +""" +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -# https://github.com/test-fullautomation/python-jsonpreprocessor/issues/382 dictUsecase['TESTID'] = "JPP_1110" dictUsecase['DESCRIPTION'] = "JSON file import based on list elemens" dictUsecase['EXPECTATION'] = "JsonPreprocessor returns values" @@ -2987,9 +3015,12 @@ dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1110.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = None # currently: File '%import_files%[1]__ConvertParameterToString__' is not existing! -dictUsecase['EXPECTEDRETURN'] = None -# # # listofdictUsecases.append(dictUsecase) +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (2/1) > {import_files} [LIST] (2/1) > [STR] : './dynamic_imports/AA/imported.AA.jsonp' +[DOTDICT] (2/1) > {import_files} [LIST] (2/2) > [STR] : './dynamic_imports/AA/BB/imported.BB.jsonp' +[DOTDICT] (2/2) > {level} [STR] : 'BB'""" +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} @@ -3001,9 +3032,21 @@ dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1111.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = None # currently: 'maximum recursion depth exceeded while calling a Python object -dictUsecase['EXPECTEDRETURN'] = None -# # # listofdictUsecases.append(dictUsecase) +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (5/1) > {dynamic_imports} [STR] : 'dynamic_imports' +[DOTDICT] (5/2) > {global_defs} [STR] : 'global_defs' +[DOTDICT] (5/3) > {dictDirs} [DOTDICT] (4/1) > {AA} [STR] : 'AA' +[DOTDICT] (5/3) > {dictDirs} [DOTDICT] (4/2) > {BB} [STR] : 'BB' +[DOTDICT] (5/3) > {dictDirs} [DOTDICT] (4/3) > {CC} [STR] : 'CC' +[DOTDICT] (5/3) > {dictDirs} [DOTDICT] (4/4) > {DD} [STR] : 'DD' +[DOTDICT] (5/4) > {listDirs} [LIST] (4/1) > [STR] : 'AA' +[DOTDICT] (5/4) > {listDirs} [LIST] (4/2) > [STR] : 'BB' +[DOTDICT] (5/4) > {listDirs} [LIST] (4/3) > [STR] : 'CC' +[DOTDICT] (5/4) > {listDirs} [LIST] (4/4) > [STR] : 'DD' +[DOTDICT] (5/5) > {level} [STR] : 'BB' +""" +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------------------- @@ -3044,7 +3087,7 @@ dictUsecase['HINT'] = None dictUsecase['COMMENT'] = "Cyclic import" dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1152.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "Cyclic imported json file" # import not resolved; cyclic import not detected +dictUsecase['EXPECTEDEXCEPTION'] = "Cyclic imported json file" # maximum recursion depth exceeded while calling a Python object dictUsecase['EXPECTEDRETURN'] = None # # # listofdictUsecases.append(dictUsecase) del dictUsecase @@ -3058,13 +3101,12 @@ dictUsecase['HINT'] = None dictUsecase['COMMENT'] = "Cyclic import" dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1153.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "Cyclic imported json file" # import not resolved; cyclic import not detected +dictUsecase['EXPECTEDEXCEPTION'] = "Cyclic imported json file" # 'maximum recursion depth exceeded in __instancecheck__ dictUsecase['EXPECTEDRETURN'] = None # # # listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -# https://github.com/test-fullautomation/python-jsonpreprocessor/issues/370 dictUsecase['TESTID'] = "JPP_1154" dictUsecase['DESCRIPTION'] = "JSON file with not existing parameter within dynamic import path" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" @@ -3073,9 +3115,9 @@ dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1154.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "The parameter '${I_AM_NOT_EXISTING}' is not available!" # currently: Invalid expression found +dictUsecase['EXPECTEDEXCEPTION'] = "Could not load the import file './${I_AM_NOT_EXISTING}/imported.jsonp'. The parameter '${I_AM_NOT_EXISTING} ' is not available!'" dictUsecase['EXPECTEDRETURN'] = None -# # # listofdictUsecases.append(dictUsecase) +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} @@ -3102,7 +3144,7 @@ dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1156.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = None # currently: The double quotes are missing; expected: bracket mismatch +dictUsecase['EXPECTEDEXCEPTION'] = None # currently: Could not load the import file './dynamic_imports/${AA/imported.AA.jsonp'. The parameter '' is not available! dictUsecase['EXPECTEDRETURN'] = None # # # listofdictUsecases.append(dictUsecase) del dictUsecase @@ -3245,11 +3287,6 @@ listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- -# -------------------------------------------------------------------------------------------------------------- -# slicing shall be blocked -# https://github.com/test-fullautomation/python-jsonpreprocessor/issues/104 -# https://github.com/test-fullautomation/python-jsonpreprocessor/issues/205 -# -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_1350" dictUsecase['DESCRIPTION'] = "JSON file with blocked slicing notation (-1)" @@ -4080,127 +4117,128 @@ listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_2500" +dictUsecase['TESTID'] = "JPP_2050" dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (1)" -dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "PARAMETER_SCOPE" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2500.jsonp" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2050.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = """'Could not resolve expression '${param}'. The based parameter 'param' is not defined yet! Use the ' : ' syntax to create a new based parameter.'""" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_2501" +dictUsecase['TESTID'] = "JPP_2051" dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (2)" -dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "PARAMETER_SCOPE" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2501.jsonp" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2051.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = """'A key with name '${param}' does not exist at this position. Use the ' : ' syntax to create a new key.'""" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_2502" +dictUsecase['TESTID'] = "JPP_2052" dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (3)" -dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "PARAMETER_SCOPE" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2502.jsonp" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2052.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = """'Missing scope for parameter '${param}'. To change the value of this parameter, an absolute path must be used: '${params}['001']['param']' or '${params.001.param}'.'""" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_2503" +dictUsecase['TESTID'] = "JPP_2053" dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (4)" -dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "PARAMETER_SCOPE" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2503.jsonp" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2053.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = """'A key with name '${params}['001']' does not exist at this position. Use the ' : ' syntax to create a new key.'""" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_2504" +dictUsecase['TESTID'] = "JPP_2054" dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (5)" -dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "PARAMETER_SCOPE" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2504.jsonp" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2054.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = """'A key with name '${params.001}' does not exist at this position. Use the ' : ' syntax to create a new key.'""" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_2505" +dictUsecase['TESTID'] = "JPP_2055" dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (6)" -dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "PARAMETER_SCOPE" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2505.jsonp" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2055.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None dictUsecase['EXPECTEDRETURN'] = None # # # listofdictUsecases.append(dictUsecase) # https://github.com/test-fullautomation/python-jsonpreprocessor/issues/349 del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_2506" +dictUsecase['TESTID'] = "JPP_2056" dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (7)" -dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "PARAMETER_SCOPE" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2506.jsonp" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2056.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = """'A key with name '${C}' does not exist at this position. Use the ' : ' syntax to create a new key.'""" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_2507" +dictUsecase['TESTID'] = "JPP_2057" dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (8)" -dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "PARAMETER_SCOPE" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2507.jsonp" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2057.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = """'A key with name '${params}[1]['B'][0]['C']' does not exist at this position. Use the ' : ' syntax to create a new key.'""" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_2508" +dictUsecase['TESTID'] = "JPP_2058" dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (9)" -dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "PARAMETER_SCOPE" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2508.jsonp" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2058.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = """'A key with name '${params.1.B.0.C}' does not exist at this position. Use the ' : ' syntax to create a new key.'""" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.C.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.C.jsonp index 84869c4d..70cb3ca8 100644 --- a/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.C.jsonp +++ b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.C.jsonp @@ -14,5 +14,5 @@ //************************************************************************** { "level" : "CC", - "[import]" : "./${DD}/imported.${DD}.C.jsonp", + "[import]" : "./${DD}/imported.${DD}.C.jsonp" } diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.M.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.M.jsonp index 068f5e11..4e6b8b55 100644 --- a/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.M.jsonp +++ b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.M.jsonp @@ -14,5 +14,5 @@ //************************************************************************** { "level" : "CC", - "[import]" : "./DD/imported.DD.3.jsonp", + "[import]" : "./DD/imported.DD.3.jsonp" } diff --git a/test/testfiles/jpp-test_config_1111.jsonp b/test/testfiles/jpp-test_config_1111.jsonp index 9b72239a..57023108 100644 --- a/test/testfiles/jpp-test_config_1111.jsonp +++ b/test/testfiles/jpp-test_config_1111.jsonp @@ -16,5 +16,5 @@ "dynamic_imports" : "dynamic_imports", "global_defs" : "global_defs", "[import]" : "./${dynamic_imports}/${global_defs}/${global_defs}_2.jsonp", - "[import]" : "./${imports_dir}/${dictDirs.AA}/${listDirs.1}/imported.BB.jsonp" + "[import]" : "./${dynamic_imports}/${dictDirs.AA}/${listDirs.1}/imported.BB.jsonp" } \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_2500.jsonp b/test/testfiles/jpp-test_config_2050.jsonp similarity index 100% rename from test/testfiles/jpp-test_config_2500.jsonp rename to test/testfiles/jpp-test_config_2050.jsonp diff --git a/test/testfiles/jpp-test_config_2501.jsonp b/test/testfiles/jpp-test_config_2051.jsonp similarity index 100% rename from test/testfiles/jpp-test_config_2501.jsonp rename to test/testfiles/jpp-test_config_2051.jsonp diff --git a/test/testfiles/jpp-test_config_2502.jsonp b/test/testfiles/jpp-test_config_2052.jsonp similarity index 100% rename from test/testfiles/jpp-test_config_2502.jsonp rename to test/testfiles/jpp-test_config_2052.jsonp diff --git a/test/testfiles/jpp-test_config_2503.jsonp b/test/testfiles/jpp-test_config_2053.jsonp similarity index 100% rename from test/testfiles/jpp-test_config_2503.jsonp rename to test/testfiles/jpp-test_config_2053.jsonp diff --git a/test/testfiles/jpp-test_config_2504.jsonp b/test/testfiles/jpp-test_config_2054.jsonp similarity index 100% rename from test/testfiles/jpp-test_config_2504.jsonp rename to test/testfiles/jpp-test_config_2054.jsonp diff --git a/test/testfiles/jpp-test_config_2505.jsonp b/test/testfiles/jpp-test_config_2055.jsonp similarity index 100% rename from test/testfiles/jpp-test_config_2505.jsonp rename to test/testfiles/jpp-test_config_2055.jsonp diff --git a/test/testfiles/jpp-test_config_2506.jsonp b/test/testfiles/jpp-test_config_2056.jsonp similarity index 100% rename from test/testfiles/jpp-test_config_2506.jsonp rename to test/testfiles/jpp-test_config_2056.jsonp diff --git a/test/testfiles/jpp-test_config_2507.jsonp b/test/testfiles/jpp-test_config_2057.jsonp similarity index 100% rename from test/testfiles/jpp-test_config_2507.jsonp rename to test/testfiles/jpp-test_config_2057.jsonp diff --git a/test/testfiles/jpp-test_config_2508.jsonp b/test/testfiles/jpp-test_config_2058.jsonp similarity index 100% rename from test/testfiles/jpp-test_config_2508.jsonp rename to test/testfiles/jpp-test_config_2058.jsonp