facebook / screenshot-tests-for-android

Generate fast deterministic screenshots during Android instrumentation tests
http://facebook.github.io/screenshot-tests-for-android
Apache License 2.0
1.74k stars 229 forks source link

Screenshot generated but in small chunks of images instead of a full size image #284

Closed tarolechaitanya closed 3 years ago

tarolechaitanya commented 3 years ago

Hi All,

  1. I have added screenshot test core.aar file in AOSP project.
  2. Imported core.aar library in AOSP project android.bp file
  3. Captured screenshot of fragment using Screenshot.snap()
  4. Screenshot got captured but in small small portions ( e.g image_1_0.png, image_1_1.png )

Is it expected output ? I was expecting to get entire screenshot in a single png image.

Thanks.

gabrielleonardozup commented 3 years ago

Same behavior here.

xiphirx commented 3 years ago

Yes this is the expected output. The library does this to relieve memory pressure and avoid potential ooms when generating screenshots for large views. These images can be combined pretty easily and there is logic in the pull script to show you how: https://github.com/facebook/screenshot-tests-for-android/blob/master/plugin/src/py/android_screenshot_tests/pull_screenshots.py#L363