-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Collapse long failure messages in log and report #4931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
If implementing this turns out to be too big a task in RF 7.0, we need to decide how to otherwise solve the issue with the same failure message being shown with tests, keywords and control structures in the log file. It would be easy to include the failure message only with tests, but then the extra notes added with |
Issue #4883 added `message` to keywords and control structures in the result model and they were also added to the log file. With nested structures, it is possible that multiple keywords or control structures have the same message that is also shared by the test case. This is somewhat annoying in general and especially problematic with longer messages. This commit removes writing normal keyword and control structure messages to the log file. Only messages that are written are notes about keywords being removed or flattened with `--remove-keywords` or `--flatten-keywords`. These notes are now wrapped with `<span class="robot-note"></span>` to make it possible to recognize them. Issue #4931 proposes collapsing long messages in log and report. If/when that's implemented, we can consider including also keyword and control structure messages in the log file.
The above commit removed writing normal keyword and control structure messages to the log file. Only messages that are written are notes about keywords being removed or flattened with Collapsing long messages would still be convenient, but it doesn't have such a high priority. If it is done, we can consider including also keyword and control structure messages in the log file again. They may be annoying even if they are collapsed, though. |
As explained above, the situation is now the same as earlier. We are running out of time with RF 7.0 so moving this forward. |
Currently long failure messages (over 40 lines by default, configurable with
--max-error-lines
(#2576)) are cut from the middle. This is done to avoid huge messages messing up logs and reports, but the problem is that some valuable information may be lost. Another issue is that even the resulting messages are somewhat long and take lot of space.The above is an old problem, but the situation is getting worse in RF 7.0 due failure messages being shown not only with tests,but also with each keyword and control structure. Earlier keywords and control structures in the result model didn't have a message at all, but it was added as part of the result model cleanup (#4883). The motivation was this:
--flatten-keywords
and--remove-keywords
) we want to add some extra notes to result objects. Earlier we used documentation for that, but it was odd because control structures such as FOR loops cannot otherwise have a documentation. Using the message for this purpose works much better.Now that also keywords and control structures also have a message, the same message can be shown on multiple levels in the log file. That's rather annoying in general, but gets especially irritating if the message is long. To mitigate this issue, and to fix the old issue with long messages, I propose we do the following:
The text was updated successfully, but these errors were encountered: