Skip to content
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

Screenshots not appearing in ReportPortal #91

Open
mjnohai opened this issue Jul 9, 2020 · 2 comments
Open

Screenshots not appearing in ReportPortal #91

mjnohai opened this issue Jul 9, 2020 · 2 comments

Comments

@mjnohai
Copy link
Contributor

mjnohai commented Jul 9, 2020

For some reason, screenshots aren't getting saved correctly in ReportPortal, even those the screenshots are saved locally using the Capybara.current_session.save_screenshot method and I can pull them up using Finder.

Screen Shot 2020-07-09 at 3 01 48 PM

  • after clicking the thumbnail

Screen Shot 2020-07-09 at 3 01 57 PM

  • I even tried clicking the link for attachment and just a black screen comes up.

  • the code to generate screenshot in framework

Screen Shot 2020-07-09 at 3 03 42 PM

Note: the text file gets saved correctly without any issue.

@abotalov
Copy link
Member

abotalov commented Jul 10, 2020

Here is code that is called from embed and that sends a file to Report Portal - https://github.com/reportportal/agent-ruby/blob/master/lib/reportportal.rb#L82
Embedding screenshots worked fine for me (though we use embed(base64_string, 'image/png;base64'). You can try to put breakpoints in the local copy of the gem to understand what's going on.

@mjnohai
Copy link
Contributor Author

mjnohai commented Jul 10, 2020

Here is code that is called from embed and that sends a file to Report Portal - https://github.com/reportportal/agent-ruby/blob/master/lib/reportportal.rb#L82
Embedding screenshots worked fine for me (though we use embed(base64_string, 'image/png;base64'). You can try to put breakpoints in the local copy of the gem to understand what's going on.

Thank you for the quick response!!! I did try and debug it, everything appears to be fine, however, I'm just not familiar with the octet-stream that is in the payload that gets sent or multipart for that matter. Here is some more screenshots. Any additional help is welcomed :)

On the left is the file saved locally after Capybara saved it. Also, here is the object in the HTTP::FormData::File
Screen Shot 2020-07-10 at 3 01 57 PM

Next, here is the send_file method with what appears to be all the correct values:
Screen Shot 2020-07-10 at 3 03 04 PM

Also, the file that appears in the mini-io data folder is corrupt when I try and open it. Running everything locally in docker, not sure if that matters.

@mjnohai mjnohai mentioned this issue Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants