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

Embedding made screenshot into cucumber json report #234

Open
andreypetrenko82 opened this issue Jan 25, 2018 · 13 comments · May be fixed by #329
Open

Embedding made screenshot into cucumber json report #234

andreypetrenko82 opened this issue Jan 25, 2018 · 13 comments · May be fixed by #329

Comments

@andreypetrenko82
Copy link

Could you implement embedding possibility of made screenshot into cucumber json report when scenario step failed?

@Vic152
Copy link

Vic152 commented Nov 23, 2018

+1

@bubenkoff
Copy link
Member

@andreypetrenko82 this is already possible if you use pytest-splinter: https://github.com/pytest-dev/pytest-splinter/#automatic-screenshots-on-test-failure

@jeduden
Copy link

jeduden commented Nov 25, 2018

splinter only outputs them into a directory.
in order to view the screens as part of the cucumber report they need to be embedded.

@bubenkoff
Copy link
Member

did you check the mentioned jenkins plugin? https://wiki.jenkins-ci.org/display/JENKINS/JUnit+Attachments+Plugin
it attaches screenshots to exact test, not just to some folder

@jeduden
Copy link

jeduden commented Nov 26, 2018

i am not sure why this plugin is relevant ? May be there are work arounds for some use cases where this is useful.

However, pytest bdd is missing a feature that other cucumber implementations have, embeddeding screenshots in the cucumber json:

https://relishapp.com/cucumber/cucumber/docs/formatters/json-output-formatter#embedding-screenshot

@bubenkoff
Copy link
Member

@jeduden sorry I didn't know about cucumber supports screenshots
then it has to be implemented as a hook.

@bubenkoff bubenkoff reopened this Nov 26, 2018
@kenhosr kenhosr linked a pull request Sep 17, 2019 that will close this issue
@kenhosr
Copy link

kenhosr commented Oct 9, 2019

hey @bubenkoff , can you please provide some more details as to how to implement it as a hook? I want to implement it but want to make sure I am on the right path.

@bubenkoff
Copy link
Member

looked at https://github.com/pytest-dev/pytest-bdd/blob/master/pytest_bdd/cucumber_json.py, maybe no need in the hooks indeed, just use the screenshot paths and add to the json

@kenhosr
Copy link

kenhosr commented Oct 9, 2019

what if we want to add some comments into the test report, in addition to screenshots?

comments

@bubenkoff
Copy link
Member

bubenkoff commented Oct 9, 2019 via email

@kenhosr
Copy link

kenhosr commented Oct 9, 2019

which hook(s) would you suggest if I do need this embedded message rather than assertion message?

@iramisvalentincapco
Copy link

Has there been any movement on implementation on this?

@bubenkoff You mentioned this could be implemented as a hook, how would someone go about doing that?

@NickSwainston
Copy link

I could also use this functionality. Has anyone started working on this feature?

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

Successfully merging a pull request may close this issue.

7 participants