-
Notifications
You must be signed in to change notification settings - Fork 9
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
Console logging for statuschecker #10
base: master
Are you sure you want to change the base?
Conversation
Hello, I have submitted a second commit. I found that Unfortunately I just read this in the
Anyway, here are various tests with the results.
|
In commit e8addb9 I added options to suppress console logging. From the command line:
In combination with robot and rebot:
Programmatic use:
|
Are you still interested to work with this PR? If you are could you explain what problem you are trying to solve, because for me it is not quite clear. |
This reverts commit 552ea52.
- message index ':*' - log level 'ANY'
# Conflicts: # robotstatuschecker.py
…or_the_log_verification_#32 Wild card support for log verification
…schecker into console_logging
Hello,
I would like robotstatuschecker to show some console logging with regard to passed and failed test cases. When running tests with Robot Framework I usually only look at the console logging and will only open log.html if I see that tests have not passed.
This pull request is a proof of concept and not a fully implemented feature. Also, I am not a professional developer and apart from writing a keyword library I am not very familiar with the programmatic structure of Robot Framework.
My aim was to reproduce the console output of Robot Framework when running the test. This PoC does that quite well already.
I ran into the following issues:
start_result
method of the StatusChecker class (implementation of ResultVisitor) because I assumed result is the highest level in the test results hierarchy. That did not work, so I have put it under__init__
. That works, but I have no idea if that is the best way to do it.LOGGER
inrobot.output
. I realize that this is not part of the robot.api. It works very well forstart_suite
endend_suite
. Unfortunately it does not forend_test
, because ofAttributeError: 'TestCase' object has no attribute 'template'
.I guess this is because of a difference between the result model and the suite model. Could making a slightly different implementation ofThis is because I ran it with RIDE Test Runner Plugin that uses a listener version 2 interface which is not compatible withLOGGER
be a solution?robot.result.model
.LOGGER
is using. I have found that the settings are passed toLOGGER
as '**settings.console_output_config' in for example run.py. Is it possible to access those settings from robotstatuschecker.py if you are using it as --prerebotmodifier option? I am using RIDE and I have noticed that RIDE varies the consolewidth it is passing to robot.LOGGER
is still using that settings when called from robotstatuschecker.py.- I have tried to mimicLOGGER.end_test
myself. I do not think this is the way. An alternative is to leave it out and just see the numbers of errors per suite. Disadvantage of that is that you cannot see if statuschecker has added an error message to a testcase that already failed.