-
-
Notifications
You must be signed in to change notification settings - Fork 33
Description
Is your feature request related to a problem?
While developing and maintaining the library, it's difficult to visually confirm that UI components behave correctly across different changes or environments. Manual verification is time-consuming and prone to human error, especially in a multiplatform context.
Describe the solution you'd like:
Introduce screenshot testing using Roborazzi to automatically verify the visual correctness of UI components.
Phase 1: Apply Roborazzi to Android targets to ensure UI consistency and catch regressions early.
Phase 2: Extend screenshot testing support to Kotlin Multiplatform (KMP), including both Android and iOS targets, as infrastructure matures.
Updated Solution:
After investigation, we discovered that Roborazzi cannot load native libraries (RenderScript Toolkit) which are essential for the Cloudy library's blur functionality. Therefore, we have implemented screenshot testing using Dropshots with real Android emulators to ensure proper testing of native blur effects.
Phase 1: ✅ Implemented
- Screenshot testing using Dropshots with real Android emulators
- Multi-API level testing (API 27, 30, 33) for comprehensive coverage
- Cross-platform support with architecture-aware emulator configuration
- CI/CD integration with GitHub Actions for automated testing
This implementation ensures reliable testing of the Cloudy library's native RenderScript functionality while maintaining the goal of automated visual regression testing.
Phase 2: Future Consideration
- iOS target support when appropriate testing infrastructure is available
Describe alternatives you've considered:
We've considered relying on existing unit and integration tests, but they do not capture visual regressions. Manual testing is also an option, but it's time-consuming and not scalable, especially for multiplatform UI development.
Additional Context:
The initial Roborazzi approach was abandoned due to technical limitations with native library loading in Roborazzi's testing environment. The Cloudy library heavily relies on RenderScript Toolkit for blur effects, which requires actual Android runtime environment to function properly. The Dropshots + real emulator approach provides the necessary environment while maintaining the benefits of automated screenshot testing.