Closed hhpettersen closed 1 month ago
Sometimes the image from a URL loads correctly, but at other times the image appears blank, and occasionally, only the loading placeholder is displayed.
It sounds like a race condition, as the network is involved in your test setup. I'm not familiar with how Glide handles its networking stack, but for Picasso, we encourage faking the image request routing to ensure consistent test results. See here for an example: https://github.com/square/picasso/blob/master/picasso-paparazzi-sample/src/test/java/com/example/picasso/paparazzi/PicassoPaparazziTest.kt
Description
I am encountering inconsistent image loading results in screenshot tests using Paparazzi and Glide. (At this point I am uncertain if the issue lies with Paparazzi or Glide). Sometimes the image from a URL loads correctly, but at other times the image appears blank, and occasionally, only the loading placeholder is displayed. This variability in results makes reliable UI testing challenging.
Paparazzi-version: 1.3.3 Glide-version: 1.0.0-beta01
Steps to Reproduce
GlideImage
composable to load images.Composable Code:
Test Setup:
Expected behavior
The expected behavior is for the images to load consistently in each test case, either displaying the correct image, the placeholder, or the failure state without variance across test runs.
Additional information:
I also raised an issue on Glide since I am uncertain where the bug recides at the moment: https://github.com/bumptech/glide/issues/5402