Skip to content

Commit

Permalink
Merge pull request #339 from test-fullautomation/namsonx/task/stabi_b…
Browse files Browse the repository at this point in the history
…ranch

Namsonx/task/stabi branch
  • Loading branch information
test-fullautomation authored Aug 12, 2024
2 parents d9639ef + e81e57e commit 21bed7e
Show file tree
Hide file tree
Showing 6 changed files with 373 additions and 209 deletions.
501 changes: 324 additions & 177 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.7.1"
VERSION_DATE = "20.06.2024"
VERSION = "0.8.0"
VERSION_DATE = "12.08.2024"

12 changes: 12 additions & 0 deletions config/robotframework_aio/release_items_JsonPreprocessor.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,18 @@
| ``jsonpStr = \u007b\"A\" : 1,\n \"[import]\" : \"./imported_file.jsonp\", // relative path of imported file \n \"B\" : 2\u007d``
| ``json_preprocessor = CJsonPreprocessor()``
| ``json_preprocessor.jsonLoads(jsonpStr, referenceDir=\"path_to_reference_dir\")``

* Added a naming convention check for key names within .jsonp files processed by the JsonPreprocessor

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

**Example:**

Valid key names could be \"abcParam\", \"01_Param\", \"__param+1\", \"param-1\", \"[email protected]\", etc.

Invalid key names could be \"+param01\", \"param$01\", \"abc#Param\", etc.

* Error handling deviation improvement.
"
]
}
Expand Down
5 changes: 5 additions & 0 deletions packagedoc/additional_docs/History.tex
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,9 @@
\historyversiondate{0.7.1}{06/2024}
\historychange{Maintained release workflow}

\historyversiondate{0.8.0}{08/2024}
\historychange{- Implemented a naming convention check for key names within .jsonp files processed by the JsonPreprocessor\newline
- Fixed issues related to error handling deviation\newline
- Updated error messages log}

\end{packagehistory}
60 changes: 30 additions & 30 deletions test/testconfig/TestConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,7 @@
dictUsecase['HINT'] = "Checklist rule 2 / pattern 1"
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0353.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Invalid parameter format"
dictUsecase['EXPECTEDEXCEPTION'] = "Invalid syntax! One or more than one closed curly bracket is missing in expression"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand All @@ -1533,7 +1533,7 @@
dictUsecase['HINT'] = "Checklist rule 2 / pattern 2"
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0354.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Invalid parameter format"
dictUsecase['EXPECTEDEXCEPTION'] = "Invalid syntax! One or more than one closed curly bracket is missing in expression"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand All @@ -1547,7 +1547,7 @@
dictUsecase['HINT'] = "Checklist rule 2 / pattern 3"
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0355.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Invalid parameter format"
dictUsecase['EXPECTEDEXCEPTION'] = "Invalid syntax! One or more than one closed curly bracket is missing in expression"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand All @@ -1561,7 +1561,7 @@
dictUsecase['HINT'] = "Checklist rule 2 / pattern 4"
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0356.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Invalid syntax! One or more than one opened or closed curly bracket is missing"
dictUsecase['EXPECTEDEXCEPTION'] = "Invalid syntax! One or more than one closed curly bracket is missing in expression"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand Down Expand Up @@ -1589,7 +1589,7 @@
dictUsecase['HINT'] = "Checklist rule 2 / pattern 6"
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0358.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Invalid syntax! One or more than one opened or closed curly bracket is missing" # wording to be improved (issues/109)
dictUsecase['EXPECTEDEXCEPTION'] = "Invalid syntax! One or more than one closed curly bracket is missing in expression" # wording to be improved (issues/109)
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand Down Expand Up @@ -1617,7 +1617,7 @@
dictUsecase['HINT'] = "Checklist rule 2 / pattern 8"
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0360.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Invalid syntax! One or more than one opened or closed curly bracket is missing"
dictUsecase['EXPECTEDEXCEPTION'] = "Invalid syntax! One or more than one closed curly bracket is missing in expression"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand Down Expand Up @@ -1645,7 +1645,7 @@
dictUsecase['HINT'] = "Checklist rule 3 / pattern 2"
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0362.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Invalid parameter format"
dictUsecase['EXPECTEDEXCEPTION'] = "Invalid expression found"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand All @@ -1659,7 +1659,7 @@
dictUsecase['HINT'] = "Checklist rule 3 / pattern 3"
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0363.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Invalid parameter format"
dictUsecase['EXPECTEDEXCEPTION'] = "Invalid expression found"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand All @@ -1673,7 +1673,7 @@
dictUsecase['HINT'] = "Checklist rule 3 / pattern 4"
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0364.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Invalid parameter format"
dictUsecase['EXPECTEDEXCEPTION'] = "Invalid expression found"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand All @@ -1687,7 +1687,7 @@
dictUsecase['HINT'] = "Checklist rule 3 / pattern 5"
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0365.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Invalid parameter format"
dictUsecase['EXPECTEDEXCEPTION'] = "Invalid expression found"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand All @@ -1701,7 +1701,7 @@
dictUsecase['HINT'] = "Checklist rule 3 / pattern 6"
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0366.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Invalid parameter format"
dictUsecase['EXPECTEDEXCEPTION'] = "Invalid expression found"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand Down Expand Up @@ -2671,7 +2671,7 @@
dictUsecase['HINT'] = None
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1053.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "only simple data types are allowed to be substituted inside"
dictUsecase['EXPECTEDEXCEPTION'] = "The parameter '${somethingnotexisting}' is not available!"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand All @@ -2685,7 +2685,7 @@
dictUsecase['HINT'] = None
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1054.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "only simple data types are allowed to be substituted inside"
dictUsecase['EXPECTEDEXCEPTION'] = "Invalid dictionary key in expression '${testdict.${testdict}}['${name}']'. The datatype of parameter '${testdict}' has to be 'str'."
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand All @@ -2699,7 +2699,7 @@
dictUsecase['HINT'] = None
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1055.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "only simple data types are allowed to be substituted inside"
dictUsecase['EXPECTEDEXCEPTION'] = "Invalid list index in expression '${testlist.${testlist}}['${name}']'. The datatype of parameter '${testlist}' has to be 'int'."
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand Down Expand Up @@ -2809,7 +2809,7 @@
dictUsecase['HINT'] = None
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1350.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported!"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand All @@ -2823,7 +2823,7 @@
dictUsecase['HINT'] = None
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1351.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported!"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand All @@ -2837,7 +2837,7 @@
dictUsecase['HINT'] = None
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1352.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported!"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand All @@ -2851,7 +2851,7 @@
dictUsecase['HINT'] = None
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1353.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported!"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand All @@ -2865,7 +2865,7 @@
dictUsecase['HINT'] = None
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1354.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported!"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand All @@ -2879,7 +2879,7 @@
dictUsecase['HINT'] = None
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1355.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported!"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand All @@ -2893,7 +2893,7 @@
dictUsecase['HINT'] = None
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1356.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported!"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand All @@ -2907,7 +2907,7 @@
dictUsecase['HINT'] = None
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1357.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported!"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand All @@ -2921,7 +2921,7 @@
dictUsecase['HINT'] = None
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1358.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported!"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand All @@ -2935,7 +2935,7 @@
dictUsecase['HINT'] = None
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1359.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported!"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand All @@ -2949,7 +2949,7 @@
dictUsecase['HINT'] = None
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1360.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported!"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand All @@ -2963,7 +2963,7 @@
dictUsecase['HINT'] = None
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1361.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported!"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand All @@ -2977,7 +2977,7 @@
dictUsecase['HINT'] = None
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1362.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported!"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand All @@ -2991,7 +2991,7 @@
dictUsecase['HINT'] = None
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1363.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported!"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand All @@ -3005,7 +3005,7 @@
dictUsecase['HINT'] = None
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1364.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported!"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand All @@ -3019,7 +3019,7 @@
dictUsecase['HINT'] = None
dictUsecase['COMMENT'] = None
dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1365.jsonp"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported!"
dictUsecase['EXPECTEDEXCEPTION'] = "Slicing is not supported"
dictUsecase['EXPECTEDRETURN'] = None
listofdictUsecases.append(dictUsecase)
del dictUsecase
Expand Down

0 comments on commit 21bed7e

Please sign in to comment.