-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Hi Son,
the stabi branch changes from 15.03.2024 solved some issues. But these changes also caused a lot of side effects.
Some of them are improvements, some of them are a deterioration, some of them are neutral.
I have no idea what is the best way to handle this.
Please find below a list of some more striking differences:
(1)
"testlist" : [1,2,3],
"value" : ${testlist}[]
Previous result:
'Expression '${testlist}[]' cannot be evaluated. Reason: Empty pair of square brackets detected.'
New result:
[DICT] (2/1) > {testlist} [LIST] (3/1) > [INT] : 1
[DICT] (2/1) > {testlist} [LIST] (3/2) > [INT] : 2
[DICT] (2/1) > {testlist} [LIST] (3/3) > [INT] : 3
[DICT] (2/2) > {value} [STR] : '[1, 2, 3][]'
First result is the better one.
(2)
"testlist" : [1,2,3],
"value" : ${testlist}[${}]
Previous result:
'Invalid parameter format: ${testlist}[${}]'
New result:
'Infinity loop detection while handling the parameter '${testlist}[${}]'.'
When it's already possible to detect an endless loop, I would prefer an "invalid expression" error.
At least the AIO version 0.11 should not contain "Infinity loop detection" any more.
(3)
"dict_param" : {"A" : 1 , "B" : 2}
"list_param" : ["A", "B", "C"]
"val1" : "${list_param[1]}"
Previous result:
'Invalid syntax: Found index inside curly brackets in line '"val1" : "${list_param[1]}"'. Indices in square brackets have to be placed outside the curly brackets.'
New result:
Expecting ',' delimiter: line 3 column 4 (char 43)'
The new result makes no sense. The previous result is completely fine. Please recover.
(4)
"testlist" : ["A", "B", "C", "D"],
"index1" : 1,
"index2" : 3,
"param3" : ${testlist}[${index1}:${index2}]
Previous result:
'Invalid nested parameter format: ${testlist}[${index1} - The double quotes are missing!!!'
New result:
Expecting ',' delimiter: line 5 column 39 (char 116)'
Expected: Slicing not supported
(5)
"testlist" : ["A", "B", "C", "D"],
"param2" : ${testlist}[+1]
Previous result:
'Invalid nested parameter format: ${testlist}[+1] - The double quotes are missing!!!'
New result:
[DICT] (2/1) > {testlist} [LIST] (4/1) > [STR] : 'A'
[DICT] (2/1) > {testlist} [LIST] (4/2) > [STR] : 'B'
[DICT] (2/1) > {testlist} [LIST] (4/3) > [STR] : 'C'
[DICT] (2/1) > {testlist} [LIST] (4/4) > [STR] : 'D'
[DICT] (2/2) > {param2} [STR] : '['A', 'B', 'C', 'D'][+1]'
Expected: '+' character should not harm the index
(6)
"param1" : "value1",
"param2" : ${param1
Previous result:
'Invalid parameter format in line: "param2" : ${param1'
New result:
'Invalid nested parameter format: ${param1 - The double quotes are missing!!!'
This is not 'nested' (see #239).
The problem here is not a missing double quote but a missing closed curly bracket.
(7)
"param1" : "value1",
"param2" : "${param1"
Previous result:
'Invalid parameter format in line: "param2" : "${param1"'
New result:
'Invalid nested parameter format: ${param1 - The double quotes are missing!!!'
Here the double quotes are set, not missing. A closing curly bracket is missing instead.
(8)
"listparam" : ["A","B","C"],
"param" : ${listparam}0]
Previous result:
'Invalid nested parameter format: ${listparam}0 - The double quotes are missing!!!'
New result:
Expecting ',' delimiter: line 3 column 29 (char 62)'
In case of extra content '0]' outside dollar operator expressions, this expression has to be set in quotes.
Therefore the first error message is the better one. The new error message makes no sense.
(9)
"listparam" : ["A","B","C"],
"param" : "${${listparam}[0]"
Previous result:
'Invalid syntax! One or more than one opened or closed curly bracket is missing in expression '${${listparam}[0]'.
Please check the configuration file of the executed test!'
New result:
'Invalid nested parameter format: ${${listparam}[0]'
Previous result is completely fine. Please recover.
(10)
"listparam" : ["A","B","C"],
${listparam}0] : "value"
Previous result:
'Invalid nested parameter format: ${listparam}0 - The double quotes are missing!!!'
New result:
Expecting ':' delimiter: line 3 column 16 (char 49)'
Please recover the first result. The new result makes no sense.
(11)
"indexP" : 0,
"keyP" : "A",
"dictP" : {"A" : 0, "B" : 1},
"listP" : ["A", "B"],
"params" : {${indexP} : "002",
"003" : ["004", {"005" : "006",
...
Previous result:
'Invalid nested parameter format: {${indexP} - The double quotes are missing!!!'
New result:
Expecting ',' delimiter: line 6 column 28 (char 125)'
The new result makes no sense. The first result is mostly OK. A dollar operator expression at the position of a key inside a dictionary makes no sense. Therefore must be encapsulated in quotes. But this would be the creation of a key based on a parameter - and it is already decided that this should not be allowed.
And this part '{${indexP}' is not directly the part that causes the problem, because the first opening curly bracket belongs to the dictionary, and not to the dictionary key.
Expected is something like: Definition of key names based on parameters, are not allowed (${indexP}).
(12)
"params" : {"001" : ${keyP,
"003" : ["004", {"005" : "006",
...
Previous result:
'Invalid parameter format in line: "params" : {"001" : ${keyP,'
New result:
'Invalid nested parameter format: ${keyP - The double quotes are missing!!!'
Because '${keyP,' is not wrapped in double quotes, I would expect that the trailing comma is part of the syntax. In this case it's obvious that a closing curly bracket is missing at end of 'keyP'.
And with double quotes "${keyP" it's the same.
(13)
"params" : {"001" : "002",
"003" : [${keyP, {"005" : "006",
...
Previous result:
'Invalid parameter format in line: "003" : [${keyP, {"005" : "006",'
New result:
A list element '${keyP' as string.
Like in (12) a closing curly bracket is missing. This is invalid. Therefore the previous result is the better one.
An opening element '${' should always require a corresponding closing element '}'.
(14)
"params" : {"${dictP}[${keyP]" : "002",
"003" : ["004", {"005" : "006",
...
Previous result:
'Invalid syntax! One or more than one opened or closed curly bracket is missing in expression '${dictP}[${keyP]'.
Please check the configuration file of the executed test!'
New result:
'Invalid nested parameter format: ${dictP}[${keyP]'
A closing curly bracket is missing. Please recover the previous result.
Metadata
Metadata
Assignees
Labels
Projects
Status