-
Notifications
You must be signed in to change notification settings - Fork 34
reportportal.listener don't transfer screenshots provided by Browser library #191
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
Generally, your problem is links that are relative to HTML report location. I have a similar problem with different libraries. I already asked for the right solution in the Robot Framework forum. Nobody answers me to now. You have generally two possible solutions.
2 - has code similar to: The way 2 for screenshot library: |
By the way, I understand the idea and will automate way one or two. Currently, I am writing a listener for RF that parses log messages. When it finds an image or link, it will update/upload the relevant items to the report portal. This functionality could be integrated into the report portal listener by default - maybe I will contribute this to the report portal listener. (this will solve the situation for all libs that attach something to logs... ) |
you can name your screenshot as EMBED : https://marketsquare.github.io/robotframework-browser/Browser.html#Take%20Screenshot : than it works ans screenshot is embedded into the RP failed keyword context. like resource config and kw config:
|
@IlkkaKoskinen, @petr-kus, Seamless logging for Selenium and Browser libraries implemented in this release: https://github.com/reportportal/agent-Python-RobotFramework/releases/tag/5.5.8 |
@keef78 I do not recommend to do like that. I had such examples in the past, but deleted them by a good reason. In this case you just put these images inside your DB, instead of binary storage. This makes your DB bigger and puts additional pointless load on Analyzer (more CPU consumption) to process larger messages. And if we talk about managed services in Clouds, then DB space is usually more expensive, than binary storage. |
Yes, on the other hand, it’s not an issue if the retention period is set to a few weeks. In this case, if you don’t need results from long ago, the base64 data is automatically deleted, so there are no database space issues. You could save screenshots as attachments (we do this as well), but it’s not very user-friendly to link the correct "failed" screenshot( in the case of multiple screenshots taken) to the test case, even if it’s named after the test case or keyword. This is simply because it isn’t in the context of the report. if the new release 5.5.8 is the solution, I will update it of course .) |
To communicate with GUI we are using Browser library instead of SeleniumLibrary. When some error occurs, Browser library (like SeleniumLibrary) takes a screenshot about GUI, stores it into image file and links image file into Robot Framework log file.
Everything works fine locally, but when the whole bunch is transferred into ReportPortal by using robotframework_reportportal.listener -component, image files are dropped out and only dead links remain in the log file.
I assume that the core reason for the problem is the location of screenshots files, because Browser library stores them into path ./browser/screenshots while at SeleniumLibrary time the path was something different (unfortunately I can't remember it exactly any more)
If my assumption is correct, is anybody able to add support also for screenshots of Browser library into reportportal.listener?
The text was updated successfully, but these errors were encountered: