Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions test/JPP_TestUsecases.csv
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ JPP_2000|PARAMETER_SCOPE|GOODCASE|JSON file with nested dictionary, in which a p
JPP_2001|PARAMETER_SCOPE|GOODCASE|JSON file with nested dictionary, in which a parameter is overwritten (2)
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_2004|PARAMETER_SCOPE|GOODCASE|JSON file with nested dictionary, in which a parameter is overwritten (5)
JPP_2005|PARAMETER_SCOPE|GOODCASE|JSON file with nested dictionary, in which a parameter is overwritten (6)
JPP_2006|PARAMETER_SCOPE|GOODCASE|JSON file with nested dictionary, in which a parameter is overwritten (7)
JPP_2007|PARAMETER_SCOPE|GOODCASE|JSON file with nested dictionary, in which a parameter is overwritten (8)
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)
Expand Down
117 changes: 108 additions & 9 deletions test/JPP_TestUsecases.html
Original file line number Diff line number Diff line change
Expand Up @@ -6349,6 +6349,105 @@
191
</b></font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
<font size="2" face="Arial" color="#595959">
<b>
<a target="_blank" href="https://github.com/test-fullautomation/python-jsonpreprocessor/blob/develop/test/testfiles/jpp-test_config_2004.jsonp">JPP_2004</a>
</b></font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
<font size="2" face="Arial" color="#4169E1">
PARAMETER_SCOPE
</font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
<font size="2" face="Arial" color="#008000">
GOODCASE
</font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="left">
<font size="2" face="Arial" color="#595959"><i>
<b>JSON file with nested dictionary, in which a parameter is overwritten (5)</b><br>
Expected: JsonPreprocessor returns expected value


</i></font></td>


</tr>
<tr valign="middle" align="left">
<td colspan="1" valign="center" bgcolor="#F5F5F5" align="right">
<font size="2" face="Arial" color="#FF0000">
<b>
192
</b></font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
<font size="2" face="Arial" color="#595959">
<b>
<a target="_blank" href="https://github.com/test-fullautomation/python-jsonpreprocessor/blob/develop/test/testfiles/jpp-test_config_2005.jsonp">JPP_2005</a>
</b></font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
<font size="2" face="Arial" color="#4169E1">
PARAMETER_SCOPE
</font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
<font size="2" face="Arial" color="#008000">
GOODCASE
</font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="left">
<font size="2" face="Arial" color="#595959"><i>
<b>JSON file with nested dictionary, in which a parameter is overwritten (6)</b><br>
Expected: JsonPreprocessor returns expected value


</i></font></td>


</tr>
<tr valign="middle" align="left">
<td colspan="1" valign="center" bgcolor="#F5F5F5" align="right">
<font size="2" face="Arial" color="#FF0000">
<b>
193
</b></font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
<font size="2" face="Arial" color="#595959">
<b>
<a target="_blank" href="https://github.com/test-fullautomation/python-jsonpreprocessor/blob/develop/test/testfiles/jpp-test_config_2006.jsonp">JPP_2006</a>
</b></font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
<font size="2" face="Arial" color="#4169E1">
PARAMETER_SCOPE
</font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
<font size="2" face="Arial" color="#008000">
GOODCASE
</font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="left">
<font size="2" face="Arial" color="#595959"><i>
<b>JSON file with nested dictionary, in which a parameter is overwritten (7)</b><br>
Expected: JsonPreprocessor returns expected value


</i></font></td>


</tr>
<tr valign="middle" align="left">
<td colspan="1" valign="center" bgcolor="#F5F5F5" align="right">
<font size="2" face="Arial" color="#FF0000">
<b>
194
</b></font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
<font size="2" face="Arial" color="#595959">
<b>
Expand Down Expand Up @@ -6379,7 +6478,7 @@
<td colspan="1" valign="center" bgcolor="#F5F5F5" align="right">
<font size="2" face="Arial" color="#FF0000">
<b>
192
195
</b></font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
Expand Down Expand Up @@ -6412,7 +6511,7 @@
<td colspan="1" valign="center" bgcolor="#F5F5F5" align="right">
<font size="2" face="Arial" color="#FF0000">
<b>
193
196
</b></font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
Expand Down Expand Up @@ -6445,7 +6544,7 @@
<td colspan="1" valign="center" bgcolor="#F5F5F5" align="right">
<font size="2" face="Arial" color="#FF0000">
<b>
194
197
</b></font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
Expand Down Expand Up @@ -6478,7 +6577,7 @@
<td colspan="1" valign="center" bgcolor="#F5F5F5" align="right">
<font size="2" face="Arial" color="#FF0000">
<b>
195
198
</b></font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
Expand Down Expand Up @@ -6511,7 +6610,7 @@
<td colspan="1" valign="center" bgcolor="#F5F5F5" align="right">
<font size="2" face="Arial" color="#FF0000">
<b>
196
199
</b></font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
Expand Down Expand Up @@ -6544,7 +6643,7 @@
<td colspan="1" valign="center" bgcolor="#F5F5F5" align="right">
<font size="2" face="Arial" color="#FF0000">
<b>
197
200
</b></font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
Expand Down Expand Up @@ -6577,7 +6676,7 @@
<td colspan="1" valign="center" bgcolor="#F5F5F5" align="right">
<font size="2" face="Arial" color="#FF0000">
<b>
198
201
</b></font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
Expand Down Expand Up @@ -6610,7 +6709,7 @@
<td colspan="1" valign="center" bgcolor="#F5F5F5" align="right">
<font size="2" face="Arial" color="#FF0000">
<b>
199
202
</b></font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
Expand Down Expand Up @@ -6643,7 +6742,7 @@
</tbody></table></div>
<div>&nbsp;</div>
<hr width="100%" color="#FF8C00" align="center">
<div align="center"><font size="2" color="#27408B">Generated: 26.11.2024 - 12:36:07</font></div>
<div align="center"><font size="2" color="#27408B">Generated: 03.01.2025 - 16:19:20</font></div>
<div>&nbsp;</div>
</body></html>

32 changes: 31 additions & 1 deletion test/JPP_TestUsecases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2005,6 +2005,36 @@ Test Use Cases

----

* **Test JPP_2004**

[PARAMETER_SCOPE / GOODCASE]

**JSON file with nested dictionary, in which a parameter is overwritten (5)**

Expected: JsonPreprocessor returns expected value

----

* **Test JPP_2005**

[PARAMETER_SCOPE / GOODCASE]

**JSON file with nested dictionary, in which a parameter is overwritten (6)**

Expected: JsonPreprocessor returns expected value

----

* **Test JPP_2006**

[PARAMETER_SCOPE / GOODCASE]

**JSON file with nested dictionary, in which a parameter is overwritten (7)**

Expected: JsonPreprocessor returns expected value

----

* **Test JPP_2007**

[PARAMETER_SCOPE / GOODCASE]
Expand Down Expand Up @@ -2095,5 +2125,5 @@ Test Use Cases

----

Generated: 26.11.2024 - 12:36:07
Generated: 03.01.2025 - 16:19:20

14 changes: 13 additions & 1 deletion test/JPP_TestUsecases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,18 @@ Test JPP_2003 / PARAMETER_SCOPE / GOODCASE
Description: JSON file with nested dictionary, in which a parameter is overwritten (4)
Expectation: JsonPreprocessor returns expected value
------------------------------------------------------------------------------------------------------------------------
Test JPP_2004 / PARAMETER_SCOPE / GOODCASE
Description: JSON file with nested dictionary, in which a parameter is overwritten (5)
Expectation: JsonPreprocessor returns expected value
------------------------------------------------------------------------------------------------------------------------
Test JPP_2005 / PARAMETER_SCOPE / GOODCASE
Description: JSON file with nested dictionary, in which a parameter is overwritten (6)
Expectation: JsonPreprocessor returns expected value
------------------------------------------------------------------------------------------------------------------------
Test JPP_2006 / PARAMETER_SCOPE / GOODCASE
Description: JSON file with nested dictionary, in which a parameter is overwritten (7)
Expectation: JsonPreprocessor returns expected value
------------------------------------------------------------------------------------------------------------------------
Test JPP_2007 / PARAMETER_SCOPE / GOODCASE
Description: JSON file with nested dictionary, in which a parameter is overwritten (8)
Expectation: JsonPreprocessor returns expected value
Expand Down Expand Up @@ -856,5 +868,5 @@ Test JPP_2058 / PARAMETER_SCOPE / BADCASE
Description: JSON file containing a parameter with missing scope (9)
Expectation: No values are returned, and JsonPreprocessor throws an exception
------------------------------------------------------------------------------------------------------------------------
Generated: 26.11.2024 - 12:36:07
Generated: 03.01.2025 - 16:19:20

4 changes: 2 additions & 2 deletions test/component_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#
# --------------------------------------------------------------------------------------------------------------
#
VERSION = "0.55.0"
VERSION_DATE = "26.11.2024"
VERSION = "0.56.0"
VERSION_DATE = "03.01.2025"
#
# --------------------------------------------------------------------------------------------------------------
#TM***
Expand Down
26 changes: 25 additions & 1 deletion test/pytest/pytestfiles/test_25_PARAMETER_SCOPE_GOODCASE.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#
# XC-HWP/ESW3-Queckenstedt
#
# 06.11.2024 - 18:29:18
# 03.01.2025 - 16:19:20
#
# --------------------------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -61,6 +61,30 @@ def test_JPP_2002(self, Description):
def test_JPP_2003(self, Description):
nReturn = CExecute.Execute("JPP_2003")
assert nReturn == 0
# --------------------------------------------------------------------------------------------------------------
# Expected: JsonPreprocessor returns expected value
@pytest.mark.parametrize(
"Description", ["JSON file with nested dictionary, in which a parameter is overwritten (5)",]
)
def test_JPP_2004(self, Description):
nReturn = CExecute.Execute("JPP_2004")
assert nReturn == 0
# --------------------------------------------------------------------------------------------------------------
# Expected: JsonPreprocessor returns expected value
@pytest.mark.parametrize(
"Description", ["JSON file with nested dictionary, in which a parameter is overwritten (6)",]
)
def test_JPP_2005(self, Description):
nReturn = CExecute.Execute("JPP_2005")
assert nReturn == 0
# --------------------------------------------------------------------------------------------------------------
# Expected: JsonPreprocessor returns expected value
@pytest.mark.parametrize(
"Description", ["JSON file with nested dictionary, in which a parameter is overwritten (7)",]
)
def test_JPP_2006(self, Description):
nReturn = CExecute.Execute("JPP_2006")
assert nReturn == 0
# --------------------------------------------------------------------------------------------------------------
# Expected: JsonPreprocessor returns expected value
@pytest.mark.parametrize(
Expand Down
38 changes: 31 additions & 7 deletions test/testconfig/TestConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#
# --------------------------------------------------------------------------------------------------------------
#
# 26.11.2024
# 03.01.2025
#
# !!! Temporarily tests are deactivated by the following line commented out:
# # # listofdictUsecases.append(dictUsecase)
Expand Down Expand Up @@ -4149,8 +4149,16 @@
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2004.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = None
dictUsecase['EXPECTEDRETURN'] = None
# # # listofdictUsecases.append(dictUsecase) # https://github.com/test-fullautomation/python-jsonpreprocessor/issues/349
dictUsecase['EXPECTEDRETURN'] = """
[DOTDICT] (2/1) > {C} [INT] : 1
[DOTDICT] (2/2) > {params} [LIST] (3/1) > [INT] : 2
[DOTDICT] (2/2) > {params} [LIST] (3/2) > [DOTDICT] (2/1) > {A} [INT] : 3
[DOTDICT] (2/2) > {params} [LIST] (3/2) > [DOTDICT] (2/2) > {B} [LIST] (2/1) > [DOTDICT] (2/1) > {C} [INT] : 10
[DOTDICT] (2/2) > {params} [LIST] (3/2) > [DOTDICT] (2/2) > {B} [LIST] (2/1) > [DOTDICT] (2/2) > {D} [INT] : 5
[DOTDICT] (2/2) > {params} [LIST] (3/2) > [DOTDICT] (2/2) > {B} [LIST] (2/2) > [INT] : 6
[DOTDICT] (2/2) > {params} [LIST] (3/3) > [INT] : 7
"""
listofdictUsecases.append(dictUsecase)
del dictUsecase
# --------------------------------------------------------------------------------------------------------------
dictUsecase = {}
Expand All @@ -4163,8 +4171,16 @@
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2005.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = None
dictUsecase['EXPECTEDRETURN'] = None
# # # listofdictUsecases.append(dictUsecase) # https://github.com/test-fullautomation/python-jsonpreprocessor/issues/349
dictUsecase['EXPECTEDRETURN'] = """
[DOTDICT] (2/1) > {C} [INT] : 1
[DOTDICT] (2/2) > {params} [LIST] (3/1) > [INT] : 2
[DOTDICT] (2/2) > {params} [LIST] (3/2) > [DOTDICT] (2/1) > {A} [INT] : 3
[DOTDICT] (2/2) > {params} [LIST] (3/2) > [DOTDICT] (2/2) > {B} [LIST] (2/1) > [DOTDICT] (2/1) > {C} [INT] : 10
[DOTDICT] (2/2) > {params} [LIST] (3/2) > [DOTDICT] (2/2) > {B} [LIST] (2/1) > [DOTDICT] (2/2) > {D} [INT] : 5
[DOTDICT] (2/2) > {params} [LIST] (3/2) > [DOTDICT] (2/2) > {B} [LIST] (2/2) > [INT] : 6
[DOTDICT] (2/2) > {params} [LIST] (3/3) > [INT] : 7
"""
listofdictUsecases.append(dictUsecase)
del dictUsecase
# --------------------------------------------------------------------------------------------------------------
dictUsecase = {}
Expand All @@ -4177,8 +4193,16 @@
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2006.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = None
dictUsecase['EXPECTEDRETURN'] = None
# # # listofdictUsecases.append(dictUsecase) # https://github.com/test-fullautomation/python-jsonpreprocessor/issues/349
dictUsecase['EXPECTEDRETURN'] = """
[DOTDICT] (2/1) > {C} [INT] : 1
[DOTDICT] (2/2) > {params} [LIST] (3/1) > [INT] : 2
[DOTDICT] (2/2) > {params} [LIST] (3/2) > [DOTDICT] (2/1) > {A} [INT] : 3
[DOTDICT] (2/2) > {params} [LIST] (3/2) > [DOTDICT] (2/2) > {B} [LIST] (2/1) > [DOTDICT] (2/1) > {C} [INT] : 10
[DOTDICT] (2/2) > {params} [LIST] (3/2) > [DOTDICT] (2/2) > {B} [LIST] (2/1) > [DOTDICT] (2/2) > {D} [INT] : 5
[DOTDICT] (2/2) > {params} [LIST] (3/2) > [DOTDICT] (2/2) > {B} [LIST] (2/2) > [INT] : 6
[DOTDICT] (2/2) > {params} [LIST] (3/3) > [INT] : 7
"""
listofdictUsecases.append(dictUsecase)
del dictUsecase
# --------------------------------------------------------------------------------------------------------------
dictUsecase = {}
Expand Down
1 change: 0 additions & 1 deletion test/testfiles/jpp-test_config_2004.jsonp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.
//**************************************************************************
{
// https://github.com/test-fullautomation/python-jsonpreprocessor/issues/349
"C" : 1,
"params" : [
2,
Expand Down
Loading