You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Arguments to keywords executed with 'Run Keyword' variants should be resolved later #67
We have several 'Run Keyword' keywords ('Run Keyword', 'Run Keyword If',
'Wait Until Keyword Succeeds', ...) that execute other keywords internally.
All these keywords take the name and arguments of the actual keyword to
execute as last arguments, and most take some other arguments before them.
Currently all these arguments are resolved (i.e. variables in them
converted to their real values) when the top level 'Run Keyword' variant is
called.
The current approach of resolving all the arguments early has two major
problems.
Arguments to actual executed keywords are shown in the log file in
resolved format. This easily makes log files really big if keywords are
used with variables that contain big values. This has caused real life
problems with output files growing so big that they can't be processed.
This problem is really nasty since it doesn't have any easy workaround.
With 'Run Keyword If' and 'Run Keyword Unless', arguments are resolved
even if they would never be used. See the discussion in issue Too earlier evaluate the keyword's arguments of Run keywork if #62 for more
information. This problem has workarounds, but it's still an inconvenience.
To make things more complicated, some external libraries use build-in 'Run
Keyword' variants internally. We should make it possible that those
keywords could also defer argument resolving but they should also keep
working unmodified.
We have a pretty good idea how to solve the problem. It's very much in line
with the solution proposed in issue #62, but we need handle all 'Run
Keyword' variants (and they have different number of args that must be
resolved) also need to add a possibility for external keywords to somehow
register themselves so that also they are handled correctly. The fix will
be latest in 2.1, but we also have 2.0.2 before that.
Started with this issue. The fix proposed in issue 62 is not working in all cases so
there was need to find other solution for this problem. More details later when this
new solution is tested properly.
Fix seems to work well in our own tests. Still TODO:
Wait for results on using the fixed version in an internal project.
Comment to BuiltIn.RunKeyword helper library that if these kws are used internally
by keywords from other libraries, those kws should register themselves.
Proofreading docs for registering method.
This is such a special case that there's no need to add any documentation to user guide.
Otherwise done, but we just realized that there can be problems if all the args to
the keyword are given with a list variable containing something that should be
escaped. Need to create a test for this case, and if there really is problem it must
obviously be fixed too.
Fixed the situation described in previous comment in r603 and comment to that
modification is fixed in r616.
Now keywords register as run keyword variant get the registered number of arguments
resolved and other arguments evaluation is postponed.
In case @{list} variable contains also the first arguments, it needs to be unpacked
and the arguments going over the registered count of arguments needs to be escaped as
those will be unescaped later.
There is still some special cases that needs to be taken into account. In case there
are multiple list variables given and the first one does not provide needed amount of
arguments, the keyword execution fails.
One of the new test for Set Variable If (builtin/set_variable_if.html) fails due to
the newly found problem (that test actually found the problem in the first place).
This test is not enough the test the underlying problem fully, but it should
obviously pass after the issue is fixed.
Activity
spooning commentedon Jun 29, 2014
Started with this issue. The fix proposed in issue 62 is not working in all cases so
there was need to find other solution for this problem. More details later when this
new solution is tested properly.
spooning commentedon Jun 29, 2014
This starts to be done. See r552 for the code changes and r553 and r554 for test
changes. See the documentation from the end of libraries/BuiltIn.py.
Documentation needs to be reviewed and all tests needs to be executed with Jython.
After that, this task should be done.
spooning commentedon Jun 29, 2014
Fix seems to work well in our own tests. Still TODO:
by keywords from other libraries, those kws should register themselves.
This is such a special case that there's no need to add any documentation to user guide.
spooning commentedon Jun 29, 2014
Otherwise done, but we just realized that there can be problems if all the args to
the keyword are given with a list variable containing something that should be
escaped. Need to create a test for this case, and if there really is problem it must
obviously be fixed too.
spooning commentedon Jun 29, 2014
Fixed the situation described in previous comment in r603 and comment to that
modification is fixed in r616.
Now keywords register as run keyword variant get the registered number of arguments
resolved and other arguments evaluation is postponed.
In case @{list} variable contains also the first arguments, it needs to be unpacked
and the arguments going over the registered count of arguments needs to be escaped as
those will be unescaped later.
spooning commentedon Jun 29, 2014
There is still some special cases that needs to be taken into account. In case there
are multiple list variables given and the first one does not provide needed amount of
arguments, the keyword execution fails.
spooning commentedon Jun 29, 2014
One of the new test for Set Variable If (builtin/set_variable_if.html) fails due to
the newly found problem (that test actually found the problem in the first place).
This test is not enough the test the underlying problem fully, but it should
obviously pass after the issue is fixed.
spooning commentedon Jun 29, 2014
Finally this should be ready. See r676 for code changes and r677 for added tests.