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 @@ -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)
Expand Down
121 changes: 110 additions & 11 deletions test/JPP_TestUsecases.html
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,105 @@
42
</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_0507.jsonp">JPP_0507</a>
</b></font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
<font size="2" face="Arial" color="#4169E1">
COMPOSITE_EXPRESSIONS
</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 containing several string concatenations in separate lines (1)</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>
43
</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_0508.jsonp">JPP_0508</a>
</b></font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
<font size="2" face="Arial" color="#4169E1">
COMPOSITE_EXPRESSIONS
</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 containing several string concatenations in separate lines (2)</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>
44
</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_0509.jsonp">JPP_0509</a>
</b></font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
<font size="2" face="Arial" color="#4169E1">
COMPOSITE_EXPRESSIONS
</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 containing several parameter assignments in separate lines (different syntax)</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>
45
</b></font></td>

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

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

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

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

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

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

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

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

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

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

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
Expand Down Expand Up @@ -1769,7 +1868,7 @@
</tbody></table></div>
<div>&nbsp;</div>
<hr width="100%" color="#FF8C00" align="center">
<div align="center"><font size="2" color="#27408B">Generated: 29.09.2023 - 15:06:38</font></div>
<div align="center"><font size="2" color="#27408B">Generated: 04.10.2023 - 17:39:40</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 @@ -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]
Expand Down Expand Up @@ -579,5 +609,5 @@ Test Use Cases

----

Generated: 29.09.2023 - 15:06:38
Generated: 04.10.2023 - 17:39:40

14 changes: 13 additions & 1 deletion test/JPP_TestUsecases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

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.12.0"
VERSION_DATE = "29.09.2023"
VERSION = "0.13.0"
VERSION_DATE = "04.10.2023"
#
# --------------------------------------------------------------------------------------------------------------
#TM***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#
# XC-CT/ECA3-Queckenstedt
#
# 28.09.2023 - 11:51:44
# 04.10.2023 - 17:39:40
#
# --------------------------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -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
# --------------------------------------------------------------------------------------------------------------
Loading