-
Notifications
You must be signed in to change notification settings - Fork 17
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
Compatibility with Gradle Managed Devices #31
Comments
An official sample project from Google has some answers: |
Are there any updates on this? It looks like the screenshots location for Gradle Managed Devices will differ from where Dropshots stores screenshots BUT from the linked Google project it does look like screenshots work. Would it be possible to configure the gradle plugin to check for a different output folder to retrieve the screenshots? |
Based on the answer here
|
I've been doing some investigation here and I think I've got a plan to complete support for Gradle Managed Devices, while also fixing several other issues and cleaning up some of the plugin's artifact collection. I'm documenting my thoughts and plan here for feedback and review. While the location of additional test data is correct (for the most part), access to that is actually provided by a
For Dropshots, my plan is to use the registered Ideally we'd be able to also use this service for reference screenshot input, but the input streams are currently not supported for Gradle, therefore we'll stick with the existing addition of reference images to the assets source set. This change means that the record task no longer needs to connect to the device via ADB, as it can simply copy the reference images from the additional test output directory into the correct screenshot directory. Speaking of "correct screenshot directory", this change would also allow for support of storage of reference images for multiple devices. You could have different versions and configurations of test devices configured as Gradle Managed Devices and run Dropshots tests across all of them without issue. In order to support this, I'm planning to update the reference image directory structure to include the device name, with "connected" serving as the default name for connected emulators (which don't have names).
The updated reference image directory structure would look something like this:
In order for this to work, I need to be able to pass information from a gradle task to the Dropshots runtime. I'd love to add instrumentation arguments that can be read from To work around that I plan to use the same To summarize, here are the steps I'm planning to support this feature and fix many other issues.
|
Sounds good, thanks for the progress update! |
@rharter would it help if we met with the GMD folks? |
Android-Testify already suppors GMD, so I leave the link to the corresponding PRs in case it helps 😊 @JoseAlcerreca GMD noticeably speeds up test execution, fixing this test sharding issue would be a great extra boost 😉 |
Thanks, everyone. I've got a work in progress on my work machine that I'm getting finished up to push for review. I'm hoping to get that moving in the coming week, as things seem to be progressing pretty well. I'll mention here when I have something to share. |
I've just created #82 in draft form. This is what I'm thinking of, though I'd love some feedback about how this is looking. I think it provides the basis for Gradle Managed Device support, along with things like Firebase Test Lab support, but there are still a couple of things to clear up. @JoseAlcerreca, if your offer of connection with the GMD folks is still on the table, I have some open questions about things like additional test input, contributing to instrumentation arguments, and the preferred way to access managed test device configuration from a plugin. As for the draft PR, I'll work to test more thoroughly with this, but I'd also welcome any thoughts or feedback. |
Dropshots doesn't seem to be able to generate snapshots when tests are run on managed devices. This can be reproduced in the sample app. Any ideas what might be happening?
The text was updated successfully, but these errors were encountered: