Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namsonx/task/stabi branch #369

Merged
merged 30 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
930824d
Updated self test and code snippet generator
HolQue Oct 28, 2024
cc544e2
Merge pull request #362 from test-fullautomation/HolQue/task/selftest…
namsonx Oct 29, 2024
d9b5acf
Code snippet generator: "blocked substitutions" snippets automated
HolQue Oct 29, 2024
f4c9eba
Merge pull request #368 from test-fullautomation/HolQue/task/selftest…
test-fullautomation Oct 30, 2024
a086d5a
Enhancement - Implemented dynamic path of imported file
namsonx Oct 30, 2024
8f90062
Update history and version for 0.8.2
namsonx Oct 30, 2024
495a655
Release info maintenance
HolQue Oct 30, 2024
9ac0349
Merge pull request #375 from test-fullautomation/HolQue/task/selftest…
namsonx Oct 31, 2024
87fc582
Updated dynamic paths for imported JSON files feature
namsonx Oct 31, 2024
3eced23
Added some JSONP self test files (for tests of dynamic import)
HolQue Nov 1, 2024
d656227
Merge pull request #376 from test-fullautomation/HolQue/task/selftest…
test-fullautomation Nov 4, 2024
4200b1d
Added further JSONP self test files (for tests of dynamic import)
HolQue Nov 4, 2024
da95ec8
Merge pull request #378 from test-fullautomation/HolQue/task/selftest…
test-fullautomation Nov 4, 2024
9d01acd
Added further JSONP self test files (for tests of dynamic import, imp…
HolQue Nov 5, 2024
12da242
Merge pull request #379 from test-fullautomation/HolQue/task/selftest…
test-fullautomation Nov 5, 2024
728b8d8
Added FILE_IMPORTS self test cases
HolQue Nov 6, 2024
cd344e0
Merge pull request #384 from test-fullautomation/HolQue/task/selftest…
test-fullautomation Nov 7, 2024
cb510cd
Ticket 371 - Enhancement Dynamic import feature
namsonx Nov 7, 2024
13418c5
Updated self test
HolQue Nov 7, 2024
5be1b19
Merge pull request #386 from test-fullautomation/HolQue/task/selftest…
test-fullautomation Nov 7, 2024
cb3e03c
Enhance dynamic import feature based on test case 1104
namsonx Nov 11, 2024
65b94a8
Enhance and stabilize dynamic import feature
namsonx Nov 13, 2024
4dc0fd6
Enhance and stabilize dynamic import feature - continue
namsonx Nov 14, 2024
c9b9d40
Ticket 370 - Missing parameter in dynamic import
namsonx Nov 14, 2024
2099ab7
Self test adapted to latest changes in JsonPreprocessor code
HolQue Nov 14, 2024
0eab640
Merge pull request #388 from test-fullautomation/HolQue/task/selftest…
test-fullautomation Nov 14, 2024
ea28e95
Ticket 383 - Update error message for dynamic import feature
namsonx Nov 15, 2024
855d7cb
Ticket 383 - Tiny update due to typo.
namsonx Nov 15, 2024
2fc7b76
Ticket 381 and Enhancement - Invalid syntax freezes the JsonPreprocessor
namsonx Nov 15, 2024
cfc62de
Ticket 380 - Cyclic import with dynamic paths not detected
namsonx Nov 15, 2024
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
266 changes: 180 additions & 86 deletions JsonPreprocessor/CJsonPreprocessor.py

Large diffs are not rendered by default.

Binary file modified JsonPreprocessor/JsonPreprocessor.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions JsonPreprocessor/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
#
# Version and date of JsonPreprocessor
#
VERSION = "0.8.1"
VERSION_DATE = "28.10.2024"
VERSION = "0.8.2"
VERSION_DATE = "30.10.2024"

36 changes: 25 additions & 11 deletions config/robotframework_aio/release_items_JsonPreprocessor.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,28 +138,42 @@

* Added a naming convention check for key names within JSONP content processed by the **JsonPreprocessor**

Key names have to start with a character, digit, or underscore and must not contain these special characters ``!#$%^&()=[]{}|;',?`~``
Naming convention:

* Key names can only consist of letters, digits and the following special characters: ``_ + - * / \\`` (backslashes are allowed but must be masked).
* Key names must start with a letter, a digit or an underscore.
* Key names must not be empty strings. But leading and trailing blanks will be removed (and therefore do not cause errors).

**Example:**

Valid key names are: ``\"abcParam\"``, ``\"01_Param\"``, ``\"__param+1\"``, ``\"param-1\"``, ``\"[email protected]\"``, ...

Invalid key names are: ``\"+param01\"``, ``\"param$01\"``, ``\"abc#Param\"``, ...

* Checked absolute path when overwriting parameter
* Reworked handling of parameter scope

When overwriting a parameter, the absolute path of the parameter must be provided
To change the value of an existing parameter, an absolute path must be used always.

**Example:**

|``\u007b``
| ``\"params\" : \u007b\"001\" : \u007b\"002\" : \u007b``
| ``\"param\" : 1,``
| ``$\u007bparams.001.002.param\u007d : 2``
| ``\u007d``
| ``\u007d``
| ``\u007d``
|``\u007d``
| ``{``
| ``\u00a0\u00a0\u00a0\"params\"\u00a0:\u00a0{\"001\"\u00a0:\u00a0{\"002\"\u00a0:\u00a0{``
| ``\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"param\"\u00a0:\u00a01,``
| ``\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0${params.001.002.param}\u00a0:\u00a02``
| ``\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}``
| ``\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}``
| ``\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}``
| ``}``

* Enabled dynamic paths for imported JSON files (based on dollar operator expressions)

**Example:**

| ``{``
| ``\u00a0\u00a0\u00a0\"root_folder\" : \"imports\",``
| ``\u00a0\u00a0\u00a0\"json_file\"\u00a0\u00a0\u00a0: \"configuration.jsonp\",``
| ``\u00a0\u00a0\u00a0\"[import]\"\u00a0\u00a0\u00a0\u00a0: \"./${root_folder}/${json_file}\" ``
| ``}``
"
]
}
Expand Down
3 changes: 3 additions & 0 deletions packagedoc/additional_docs/History.tex
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,7 @@
- Prevented side effects of token string in error messages log\newline
- Checked absolute path when overwriting parameter}

\historyversiondate{0.8.2}{10/2024}
\historychange{- Enhanced import JSON file feature which allows dynamic path of imported file}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Son,

please rephrase to:

Enabled dynamic paths for imported JSON files (based on dollar operator expressions)

\end{packagehistory}
18 changes: 16 additions & 2 deletions test/JPP_TestUsecases.csv
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ JPP_0369|VALUE_DETECTION|BADCASE|JSON file with expression starting with '${' an
JPP_0370|VALUE_DETECTION|BADCASE|JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (not all nested) (invalid syntax 4)
JPP_0371|VALUE_DETECTION|BADCASE|JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (not all nested) (invalid syntax 5)
JPP_0400|NAMING_CONVENTION|GOODCASE|JSON file with several parameter names w.r.t. the naming convention
JPP_0450|NAMING_CONVENTION|BADCASE|JSON file with several invalid parameter names (1)
JPP_0451|NAMING_CONVENTION|BADCASE|JSON file with several invalid parameter names (2)
JPP_0452|NAMING_CONVENTION|BADCASE|JSON file with several invalid parameter names (3)
JPP_0453|NAMING_CONVENTION|BADCASE|JSON file with several invalid parameter names (4)
JPP_0454|NAMING_CONVENTION|BADCASE|JSON file with several invalid parameter names (5)
JPP_0455|NAMING_CONVENTION|BADCASE|JSON file with several invalid parameter names (6)
JPP_0500|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file with composite data structure (nested lists and dictionaries 1)
JPP_0501|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file with composite data structure (nested lists and dictionaries 2)
JPP_0502|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file with composite data structure (nested lists and dictionaries 3 / some key names with dots inside)
Expand Down Expand Up @@ -110,8 +116,16 @@ JPP_1055|IMPLICIT_CREATION|BADCASE|JSON file with implicit creation of data stru
JPP_1056|IMPLICIT_CREATION|BADCASE|JSON file with implicit creation of data structures based on parameters (6)
JPP_1057|IMPLICIT_CREATION|BADCASE|JSON file with implicit creation of data structures based on parameters (7)
JPP_1058|IMPLICIT_CREATION|BADCASE|JSON file with implicit creation of data structures based on parameters (8)
JPP_1150|CYCLIC_IMPORTS|BADCASE|JSON file with cyclic imports (JSON file imports itself)
JPP_1151|CYCLIC_IMPORTS|BADCASE|JSON file with cyclic imports (JSON file imports another file, that is already imported)
JPP_1100|FILE_IMPORTS|GOODCASE|JSON file import based on parameters (dynamic import (1))
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_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_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)
JPP_1160|FILE_IMPORTS|BADCASE|JSON file with error in imported file
JPP_1200|PATH_FORMATS|GOODCASE|Relative path to JSON file
JPP_1350|BLOCKED_SLICING|BADCASE|JSON file with blocked slicing notation (-1)
JPP_1351|BLOCKED_SLICING|BADCASE|JSON file with blocked slicing notation (-1)
Expand Down
Loading
Loading