Open test-fullautomation opened 4 months ago
allows any key names that are allowed by JSON
Hi Son, as discussed. The idea is that jsonpreprocessor validates key names by default against JSON specification. If used by testsuites-management, then you need to hand-over a new regexp which validates key names against RobotFramework core specification for variable names. Thank you, Thomas
Hello Thomas,
I pushed the new commit 4dc80cfc2b6a to check key names of jsonp file, this validation is based on the key name rules of JSON. This will check is there any control characters in key names of jsonp file.
Thank you, Son
Please also consider:
https://github.com/test-fullautomation/python-jsonpreprocessor/issues/262
I am confused. In the JsonPreprocessor code I cannot find the class VariableNameChecker mentioned above. Also in TestsuitesManagement I cannot find the possibility to overwrite the default regular expression by a regular expression for parameter names, that is specific for the TestsuitesManagement.
What does this mean? Is this part of the concept not wanted any more? Or not required any more? Does this mean that there are no differences between JsonPreprocessor requirements and TestsuitesManagement requirements w.r.t. parameter names?
What is the status of this CRQ?
I can do this:
"------------" : 123,
"param" : {"------------" : 456}
And I get:
{'------------': 123, 'param': {'------------': 456}}
If such a name is allowed, it should be possible to use this on the right hand side of the colon - to get access to the value.
But
"param" : ${------------}
causes
Error: 'Expression '${------------}' cannot be evaluated. Reason: A pair of curly brackets is empty or contains not allowed characters.'!
The same in quotes:
"param" : "${------------}"
works:
{'------------': 123, 'param': '123'}
What does this mean now: Shall such characters like minus characters be allowed inside key names or not?
Hi Son,
Task is still valid. Implementation is expected in jsonpreprocessor. Ticket is also here located. Testsuitesmanagement shall handover regexp requirement as per Robot Framework.
We need to talk again about the requirement. Seems to be some confusion here.
Don't change for 0.11.n anymore. Rest we do in 0.12.n
Thank you, Thomas
Validity pre-check for variable names need to be introduced.
validity check of variable names
^[a-zA-Z_][a-zA-Z0-9_]*$
Goal is to have early error messages if the parameter contains not allowed characters.
Error message should be e.g.
Parameter name
xyz
is invalid. Expected format:<current_regexp>
.Out of this description generated code fragment: