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
2 changes: 2 additions & 0 deletions test/JPP_TestUsecases.csv
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,6 @@ JPP_1658|NOT_EXISTING_PARAMETERS|BADCASE|JSON file with not existing parameters
JPP_1659|NOT_EXISTING_PARAMETERS|BADCASE|JSON file with not existing parameters at several positions (10)
JPP_1660|NOT_EXISTING_PARAMETERS|BADCASE|JSON file with not existing parameters at several positions (11)
JPP_1661|NOT_EXISTING_PARAMETERS|BADCASE|JSON file with not existing parameters at several positions (12)
JPP_1700|LINE_BREAKS|GOODCASE|JSON file with and without line breaks inside expressions
JPP_1800|SELF_ASSIGNMENTS|GOODCASE|JSON file with self assignments of strings, lists and dictionaries
JPP_1901|ASSIGNMENTS_BY_REFERENCE|GOODCASE|JSON file with list assignments (by reference)
68 changes: 67 additions & 1 deletion test/JPP_TestUsecases.html
Original file line number Diff line number Diff line change
Expand Up @@ -4556,6 +4556,72 @@
137
</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_1700.jsonp">JPP_1700</a>
</b></font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
<font size="2" face="Arial" color="#4169E1">
LINE_BREAKS
</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 and without line breaks inside expressions</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>
138
</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_1800.jsonp">JPP_1800</a>
</b></font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
<font size="2" face="Arial" color="#4169E1">
SELF_ASSIGNMENTS
</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 self assignments of strings, lists and dictionaries</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>
139
</b></font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
<font size="2" face="Arial" color="#595959">
<b>
Expand Down Expand Up @@ -4586,7 +4652,7 @@
</tbody></table></div>
<div>&nbsp;</div>
<hr width="100%" color="#FF8C00" align="center">
<div align="center"><font size="2" color="#27408B">Generated: 27.03.2024 - 11:21:23</font></div>
<div align="center"><font size="2" color="#27408B">Generated: 03.04.2024 - 09:23:46</font></div>
<div>&nbsp;</div>
</body></html>

22 changes: 21 additions & 1 deletion test/JPP_TestUsecases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1443,6 +1443,26 @@ Test Use Cases

----

* **Test JPP_1700**

[LINE_BREAKS / GOODCASE]

**JSON file with and without line breaks inside expressions**

Expected: JsonPreprocessor returns expected value

----

* **Test JPP_1800**

[SELF_ASSIGNMENTS / GOODCASE]

**JSON file with self assignments of strings, lists and dictionaries**

Expected: JsonPreprocessor returns expected value

----

* **Test JPP_1901**

[ASSIGNMENTS_BY_REFERENCE / GOODCASE]
Expand All @@ -1453,5 +1473,5 @@ Test Use Cases

----

Generated: 27.03.2024 - 11:21:23
Generated: 03.04.2024 - 09:23:46

10 changes: 9 additions & 1 deletion test/JPP_TestUsecases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -593,9 +593,17 @@ Test JPP_1661 / NOT_EXISTING_PARAMETERS / BADCASE
Description: JSON file with not existing parameters at several positions (12)
Expectation: No values are returned, and JsonPreprocessor throws an exception
------------------------------------------------------------------------------------------------------------------------
Test JPP_1700 / LINE_BREAKS / GOODCASE
Description: JSON file with and without line breaks inside expressions
Expectation: JsonPreprocessor returns expected value
------------------------------------------------------------------------------------------------------------------------
Test JPP_1800 / SELF_ASSIGNMENTS / GOODCASE
Description: JSON file with self assignments of strings, lists and dictionaries
Expectation: JsonPreprocessor returns expected value
------------------------------------------------------------------------------------------------------------------------
Test JPP_1901 / ASSIGNMENTS_BY_REFERENCE / GOODCASE
Description: JSON file with list assignments (by reference)
Expectation: JsonPreprocessor returns expected value
------------------------------------------------------------------------------------------------------------------------
Generated: 27.03.2024 - 11:21:23
Generated: 03.04.2024 - 09:23:46

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.39.0"
VERSION_DATE = "27.03.2024"
VERSION = "0.40.0"
VERSION_DATE = "03.04.2024"
#
# --------------------------------------------------------------------------------------------------------------
#TM***
Expand Down
40 changes: 40 additions & 0 deletions test/pytest/pytestfiles/test_18_LINE_BREAKS_GOODCASE.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# **************************************************************************************************************
# 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.
# --------------------------------------------------------------------------------------------------------------
#
# test_18_LINE_BREAKS_GOODCASE.py
#
# XC-CT/ECA3-Queckenstedt
#
# 03.04.2024 - 09:23:46
#
# --------------------------------------------------------------------------------------------------------------

import pytest
from pytestlibs.CExecute import CExecute

# --------------------------------------------------------------------------------------------------------------

class Test_LINE_BREAKS_GOODCASE:

# --------------------------------------------------------------------------------------------------------------
# Expected: JsonPreprocessor returns expected value
@pytest.mark.parametrize(
"Description", ["JSON file with and without line breaks inside expressions",]
)
def test_JPP_1700(self, Description):
nReturn = CExecute.Execute("JPP_1700")
assert nReturn == 0
# --------------------------------------------------------------------------------------------------------------
40 changes: 40 additions & 0 deletions test/pytest/pytestfiles/test_19_SELF_ASSIGNMENTS_GOODCASE.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# **************************************************************************************************************
# 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.
# --------------------------------------------------------------------------------------------------------------
#
# test_19_SELF_ASSIGNMENTS_GOODCASE.py
#
# XC-CT/ECA3-Queckenstedt
#
# 03.04.2024 - 09:23:46
#
# --------------------------------------------------------------------------------------------------------------

import pytest
from pytestlibs.CExecute import CExecute

# --------------------------------------------------------------------------------------------------------------

class Test_SELF_ASSIGNMENTS_GOODCASE:

# --------------------------------------------------------------------------------------------------------------
# Expected: JsonPreprocessor returns expected value
@pytest.mark.parametrize(
"Description", ["JSON file with self assignments of strings, lists and dictionaries",]
)
def test_JPP_1800(self, Description):
nReturn = CExecute.Execute("JPP_1800")
assert nReturn == 0
# --------------------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
# limitations under the License.
# --------------------------------------------------------------------------------------------------------------
#
# test_18_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py
# test_20_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py
#
# XC-CT/ECA3-Queckenstedt
#
# 27.03.2024 - 11:21:23
# 03.04.2024 - 09:23:46
#
# --------------------------------------------------------------------------------------------------------------

Expand Down
5 changes: 1 addition & 4 deletions test/testconfig/TestConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#
# --------------------------------------------------------------------------------------------------------------
#
# 27.03.2024
# 03.04.2024
#
# !!! Temporarily tests are deactivated by the following line commented out:
# # # listofdictUsecases.append(dictUsecase)
Expand Down Expand Up @@ -3282,7 +3282,6 @@
del dictUsecase
# --------------------------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------------------
# https://github.com/test-fullautomation/python-jsonpreprocessor/issues/259
dictUsecase = {}
dictUsecase['TESTID'] = "JPP_1700"
dictUsecase['DESCRIPTION'] = "JSON file with and without line breaks inside expressions"
Expand Down Expand Up @@ -3323,8 +3322,6 @@
del dictUsecase
# --------------------------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------------------
# https://github.com/test-fullautomation/robotframework-testsuitesmanagement/issues/253
# https://github.com/test-fullautomation/python-jsonpreprocessor/issues/213
dictUsecase = {}
dictUsecase['TESTID'] = "JPP_1800"
dictUsecase['DESCRIPTION'] = "JSON file with self assignments of strings, lists and dictionaries"
Expand Down
1 change: 0 additions & 1 deletion test/testfiles/jpp-test_config_1700.jsonp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
//**************************************************************************

{
// https://github.com/test-fullautomation/python-jsonpreprocessor/issues/259
"dictParam1" : {"kA" : "A", "kB" : "B"},
"dictParam2" : {"kA" : "A",
"kB" : "B"},
Expand Down
3 changes: 0 additions & 3 deletions test/testfiles/jpp-test_config_1800.jsonp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
//**************************************************************************

{
// https://github.com/test-fullautomation/robotframework-testsuitesmanagement/issues/253
// https://github.com/test-fullautomation/python-jsonpreprocessor/issues/213

"param1" : "value",
${param1} : ${param1},

Expand Down