Screnshot library and ReportPortal

We tring integrate ReportPortal with Roboto Framework usage.

We would like to see in reportportal the imagies from standart screenshot library.

I doubt what is the right apporach for attaching Screenshots - standard library - to reportportal.

  • **Does anybody solve the same problem? **
  • Do you have any recommandations?

I considered two solutions…

  1. put absolute path to logs to the storage where are stored images (according to me bad idea - breaking ‘breaking self-sustaining principle for logs’)
  2. Wrap ‘Take Screenshot’ in my Resource/Library and put there kind of this code for uploud screenshot to reportportal. (according to me not ideal idea - a lot of re-wraping things and too much internal code…)

Just thinking if there is a way to use decorators. Or RF Decorators API https://robot-framework.readthedocs.io/en/stable/_modules/robot/api/deco.html.

Becouse decorate all keywords that return a path to file… is exactly what would be nice to have and i could just take it and log these data to reportportal.

I get the idea, I 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… )

1 Like