Comments (14)
if you do a "gradle recordMode screenshotTests", it should generate the full pngs and "record" it to a directory.
from screenshot-tests-for-android.
Unfortunately that doesn't help. My use case is running on Google's Cloud Test Lab which lacks Gradle support.
Is there no Java API to take a full png screenshot (and delete the tiles/xml files)?
from screenshot-tests-for-android.
FYI the way cloud test lab currently works is it dumps everything from /sdcard/screenshots/
into a Screenshots view in the UI. The current screenshot-tests-for-android
makes a mess because there are a bunch of intermediary files and no full screenshots.
I guess the short term work around is for me to go back to Spoon which creates exactly one png per screenshot call. Ideally the facebook lib would have an on device stitching solution that doesn't depend on 3rd parties (gradle/python). It's a simple use case: take a screenshot.
from screenshot-tests-for-android.
Hmm, the stitching can't be done on device without external libraries. The reason for the stitching is that we can't store the whole bitmap in memory. (We support really large views)
There were some other libraries that directly constructed the result image files onto the filesystem without having it all stored in memory, but I didn't want an external dependency for that use case.
If you think your device/emulator has enough memory that such stitching isn't worthwhile, try increasing this to a larger number so that it can completely contain your screenshots: https://github.com/facebook/screenshot-tests-for-android/blob/master/core/src/main/java/com/facebook/testing/screenshot/internal/ScreenshotImpl.java#L56
from screenshot-tests-for-android.
we should also make that parameter configurable so you don't have to rebuild from source
from screenshot-tests-for-android.
There were some other libraries that directly constructed the result image files onto the filesystem without having it all stored in memory, but I didn't want an external dependency for that use case.
What libs are they? Might be better for my use case.
from screenshot-tests-for-android.
It's been a while since I've looked at that, I'm not able to find it/them at the moment. Do consider just increasing the tile size, that's really the easiest solution as long as you can give it enough heap.
from screenshot-tests-for-android.
Ok, even if I do that then there's still no option to prevent the xml files from being generated. I don't want random files in storage because I'm charged $$ for them.
from screenshot-tests-for-android.
Happy to accept a pull request to make the XML file configurable, but for now I'm renaming this task just to make the tile size configurable which I'll try to do soon
from screenshot-tests-for-android.
Happy to accept a pull request to make the XML file configurable
Something like this?
public interface RecordBuilder {
public RecordBuilder disableDumpFile();
from screenshot-tests-for-android.
nope, pass it as an instrumentation argument. I wouldn't want to expose this every time somebody is doing code completion while trying to create a screenshot.
from screenshot-tests-for-android.
Makes sense. Should the tile size be configured the same way (instrumentation argument)?
from screenshot-tests-for-android.
That would be my plan, yes. Feel free to send a pull request for that too though
from screenshot-tests-for-android.
Submitted #23 for the no dump flag.
from screenshot-tests-for-android.
Related Issues (20)
- verifyDebugAndroidTestScreenshotTest:RuntimeError HOT 1
- java.lang.OutOfMemoryError: Failed to allocate a 8781536 byte allocation with 4981712 free bytes and 4MB until OOM, max allowed footprint 536870912, growth limit 536870912 at java.util.Arrays.copyOf(Arrays.java:3260) HOT 2
- Library forces arbitrarily small image width HOT 1
- Found 0 Screenshots
- Recording a single test deletes all other screenshots
- Fail to execute runDebugAndroidTestScreenshotTest due to syntax error HOT 1
- Add support to Kotlin DSL
- RunScreenshotTestTask doesn't support configuration cache
- Performance?
- Value error: Operation on closed image when recording/verifying screenshots HOT 2
- Can't record very large view inside ScrollView HOT 4
- Screenshot record fails because of --> "Accessibility content change on non-UI thread"
- Is it possible to hideout dynamic content on the screen before capturing screenshot HOT 1
- Is it possible to vertical scroll and capture full screen
- Incorrect accessibility actions checks in `AccessibilityUtil`
- How to run plugin tests (plugin:check)
- How to install all the artifacts to local maven repository
- plugin id 'com.facebook.testing.screenshot:plugin' version '0.14.0' apply false Fail for android DSL files
- Add SurfaceView support
- test failure: Is your sdcard directory read-only?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from screenshot-tests-for-android.