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 config/robotframework_aio/release_items_JsonPreprocessor.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
* Improved format of nested parameters; improved error messages
* Some bugs fixed in implicitly created data structures
* Improved index handling together with nested parameters
* Self test extended by further test cases

All JsonPreprocessor test cases: `JPP_TestUsecases.html <https://htmlpreview.github.io/?https://github.com/test-fullautomation/python-jsonpreprocessor/blob/develop/test/JPP_TestUsecases.html>`_
"
]
}
Expand Down
3 changes: 3 additions & 0 deletions test/JPP_TestUsecases.csv
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ JPP_0508|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file containing several string conc
JPP_0509|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file containing several parameter assignments in separate lines (different syntax)
JPP_0510|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file containing several parameter assignments in separate lines (extended string concatenation)
JPP_0511|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file containing a list; list index is defined by a parameter
JPP_0512|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file containing a nested use of lists and dictionaries, with the same parameter used several times within the same expression
JPP_0513|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file containing several square bracket expressions (as list index and dictionary key) with and without single quotes
JPP_0550|COMPOSITE_EXPRESSIONS|BADCASE|JSON file with composite data structure (nested lists and dictionaries / some key names with dots inside)
JPP_0600|CODE_COMMENTS|GOODCASE|JSON file with several combinations of code comments
JPP_0950|COMMON_SYNTAX_VIOLATIONS|BADCASE|JSON file with syntax error (1)
Expand All @@ -79,6 +81,7 @@ JPP_0953|COMMON_SYNTAX_VIOLATIONS|BADCASE|JSON file with syntax error (4): file
JPP_0954|COMMON_SYNTAX_VIOLATIONS|BADCASE|JSON file with syntax error (5): file is empty (multiple pairs of brackets only)
JPP_1000|IMPLICIT_CREATION|GOODCASE|JSON file with dictionary keys to be created implicitly
JPP_1001|IMPLICIT_CREATION|GOODCASE|JSON file with dictionary keys to be created implicitly (same key names at all levels)
JPP_1002|IMPLICIT_CREATION|GOODCASE|JSON file with combinations of implicit and explicit creation / with and without initialization
JPP_1050|IMPLICIT_CREATION|BADCASE|JSON file with implicit creation of data structures based on parameters (1)
JPP_1051|IMPLICIT_CREATION|BADCASE|JSON file with implicit creation of data structures based on parameters (2)
JPP_1052|IMPLICIT_CREATION|BADCASE|JSON file with implicit creation of data structures based on parameters (3)
Expand Down
141 changes: 120 additions & 21 deletions test/JPP_TestUsecases.html
Original file line number Diff line number Diff line change
Expand Up @@ -2373,6 +2373,72 @@
71
</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_0512.jsonp">JPP_0512</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 a nested use of lists and dictionaries, with the same parameter used several times within the same expression</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>
72
</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_0513.jsonp">JPP_0513</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 square bracket expressions (as list index and dictionary key) with and without single quotes</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>
73
</b></font></td>

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

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

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

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

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

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

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

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

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
Expand Down Expand Up @@ -2668,7 +2734,40 @@
<td colspan="1" valign="center" bgcolor="#F5F5F5" align="right">
<font size="2" face="Arial" color="#FF0000">
<b>
80
82
</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_1002.jsonp">JPP_1002</a>
</b></font></td>

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
<font size="2" face="Arial" color="#4169E1">
IMPLICIT_CREATION
</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 combinations of implicit and explicit creation / with and without initialization</b><br>
Expected: JsonPreprocessor returns values


</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>
83
</b></font></td>

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

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

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

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

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

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

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

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

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

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

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

<td colspan="1" valign="center" bgcolor="#F5F5F5" align="middle">
Expand Down Expand Up @@ -3065,7 +3164,7 @@
</tbody></table></div>
<div>&nbsp;</div>
<hr width="100%" color="#FF8C00" align="center">
<div align="center"><font size="2" color="#27408B">Generated: 10.01.2024 - 12:25:22</font></div>
<div align="center"><font size="2" color="#27408B">Generated: 16.01.2024 - 13:22:08</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 @@ -773,6 +773,26 @@ Test Use Cases

----

* **Test JPP_0512**

[COMPOSITE_EXPRESSIONS / GOODCASE]

**JSON file containing a nested use of lists and dictionaries, with the same parameter used several times within the same expression**

Expected: JsonPreprocessor returns expected value

----

* **Test JPP_0513**

[COMPOSITE_EXPRESSIONS / GOODCASE]

**JSON file containing several square bracket expressions (as list index and dictionary key) with and without single quotes**

Expected: JsonPreprocessor returns expected value

----

* **Test JPP_0550**

[COMPOSITE_EXPRESSIONS / BADCASE]
Expand Down Expand Up @@ -865,6 +885,16 @@ Test Use Cases

----

* **Test JPP_1002**

[IMPLICIT_CREATION / GOODCASE]

**JSON file with combinations of implicit and explicit creation / with and without initialization**

Expected: JsonPreprocessor returns values

----

* **Test JPP_1050**

[IMPLICIT_CREATION / BADCASE]
Expand Down Expand Up @@ -987,5 +1017,5 @@ Test Use Cases

----

Generated: 10.01.2024 - 12:25:22
Generated: 16.01.2024 - 13:22:08

Loading