Skip to content
This repository has been archived by the owner on Dec 7, 2019. It is now read-only.

Support for screenshot? #114

Closed
ripunjayasaran opened this issue Nov 16, 2017 · 7 comments
Closed

Support for screenshot? #114

ripunjayasaran opened this issue Nov 16, 2017 · 7 comments

Comments

@ripunjayasaran
Copy link

Is there any way to take screenshot and embed it in the Composer report? I did not see anything specific pertaining to this in the readme file (apart from the fact that it was mentioned that screenshot support is there for Composer).
Spoon has a method to take screenshots and they show up in the report. I was wondering if something similar has been implemented for Composer or not? This is not a bug, but more of an inquiry.

@plastiv
Copy link
Contributor

plastiv commented Nov 17, 2017

Composer is compatible with Spoon screenshot file structure. Just use spoon dependency to create screenshot and it will show up at the report.

@yunikkk yunikkk closed this as completed Nov 21, 2017
@artem-zinnatullin
Copy link
Collaborator

Or write custom screenshoter that'll follow Spoon directory structure :)

@loveshjain
Copy link

We were using spoon before this and taking screenshots was working absolutely fine with that but when I added composer plugin and running the tests, it is creating a folder with package name but not adding any screenshots. I believe it is not taking screenshot at the first place using Composer. Could you please let me know is there anything I am missing here.

I even added Snapshot version of Spoon but no luck.

@artem-zinnatullin
Copy link
Collaborator

Composer does not control how the screenshots are taken, it just pulls them from expected folders

Would be great to verify screenshots are taken in the first place, maybe the easiest way would be to run tests without Composer (ie with Gradle or Android Studio) and check if there are screenshots on the device/emulator

@ripunjayasaran
Copy link
Author

@loveshjain : screenshot feature is broken in the new (2.0) version of Spoon. See square/spoon#484 (comment) for a solution for this.

@loveshjain
Copy link

HI @ripunjayasaran @artem-zinnatullin Thanks for the reply. I did tried square/spoon#484 (comment) but with no luck. I also tried taking the screenshot using spoon only and it worked so I don't think it is an spoon issue. Could you please let me know how you guys are taking the screenshot and folder structure using spoon and composer

@artem-zinnatullin
Copy link
Collaborator

Sure, Composer just pull screenshots from Spoon-compatible folder structure, here is the code https://github.com/gojuno/composer/blob/v0.3.3/composer/src/main/kotlin/com/gojuno/composer/TestRun.kt#L157

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants