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
Relative order of messages and keywords is not preserved in log #2086
If a keyword has both messages and child keywords, they are always show in logs so that keywords are first. The reason this issue isn't typically seen is that most of the time keywords only have either child keywords or messages, not both. There are, however, at least two cases where both keywords and messages exists:
When using --loglevel trace, all keywords get trace level messages logging arguments and return values. With user keywords both of these messages are listed after child keywords although arguments are logged before executing them.
Wait Until Keyword Succeeds and some other special keywords that execute other keywords also log messages. All these messages are shown after all executed keywords.
Notice that a related problem that Rebot messed up the order when reading output.xml (#1867) has already been fixed. Fixing logs may unfortunately be a lot harder.
Reacted by Sergey Khomutinin, cjnewman, Stavros Ntentos and Laurent Bristiel
No time for this in 3.0. Changes to log aren't backwards incompatible so this can be considered also in 3.0.x minor versions. The main problem is that required changes to Javascript code are quite big and thus need to be tested with various browsers and on various operating systems. Good thing is that we ought to be able to forget about IE 8 at this point.
changed the title [-]Relative order of messages and keywords are not preserved in logs[/-][+]Relative order of messages and keywords is not preserved in log[/+]on Feb 10, 2020
Of course kws/msgs should be in the order they occurred, that's what this issue is all about, but it's hard to fix and nobody has done it yet. Changing logic so that msgs are before kws would be trivial.
Recent refactoring to the internal model (#3749) has made fixing this problem relatively easy. Tests and keywords nowadays have generic body that contains keywords and control structures (FOR and IF). On the execution result side we can use the same body to store also messages then order of all body items is automatically preserved on the Python side. After that we need to change converting the Python model to JS model so that the whole body is stored in one structure keeping items in order. Then log.html needs to be changed so that it can handle the new model and also draw body items in correct order.
I already have a prototype working locally but it still needs some cleanup work. I'll target this to RF 4.0 scope and hope to get it into beta 2.
RF 4.0 isn't out yet and these changes aren't yet even in any beta. There's still some work left with #3749 but then it's definitely time for RF 4.0 beta 2.
Activity
pekkaklarck commentedon Dec 29, 2015
No time for this in 3.0. Changes to log aren't backwards incompatible so this can be considered also in 3.0.x minor versions. The main problem is that required changes to Javascript code are quite big and thus need to be tested with various browsers and on various operating systems. Good thing is that we ought to be able to forget about IE 8 at this point.
[-]Relative order of messages and keywords are not preserved in logs[/-][+]Relative order of messages and keywords is not preserved in log[/+]stdedos commentedon Feb 12, 2020
Well ... not exactly.
Why not have them at the order they arrived i.e. Arguments first, Return last, and everything else in-between?
pekkaklarck commentedon Feb 12, 2020
Of course kws/msgs should be in the order they occurred, that's what this issue is all about, but it's hard to fix and nobody has done it yet. Changing logic so that msgs are before kws would be trivial.
stdedos commentedon Feb 12, 2020
I guess it could be a workaround; I'd prefer, however, that applying the workaround doesn't mean that this issue is abandoned.
pekkaklarck commentedon Jan 12, 2021
Recent refactoring to the internal model (#3749) has made fixing this problem relatively easy. Tests and keywords nowadays have generic
bodythat contains keywords and control structures (FOR and IF). On the execution result side we can use the samebodyto store also messages then order of all body items is automatically preserved on the Python side. After that we need to change converting the Python model to JS model so that the whole body is stored in one structure keeping items in order. Then log.html needs to be changed so that it can handle the new model and also draw body items in correct order.I already have a prototype working locally but it still needs some cleanup work. I'll target this to RF 4.0 scope and hope to get it into beta 2.
stdedos commentedon Jan 12, 2021
I wish I could've updated to v4 😕 😞
Thank you for pursuing this anyway 😀
pekkaklarck commentedon Jan 14, 2021
RF 4.0 isn't out yet and these changes aren't yet even in any beta. There's still some work left with #3749 but then it's definitely time for RF 4.0 beta 2.
Regenerate data used by Jasmine tests.
Fix Jasmine tests broken due to changes to log's model.