takahirom / roborazzi

Make JVM Android integration test visible 🤖📸
https://takahirom.github.io/roborazzi/
Apache License 2.0
655 stars 25 forks source link

Transparent image when use robolectric.screenshot.hwrdr.native and build activity by Robolectric #300

Closed dalapenko closed 3 months ago

dalapenko commented 3 months ago

Tried to use option robolectric.screenshot.hwrdr.native after new Robolectric release for resolve issue with shadows https://github.com/takahirom/roborazzi/issues/271 but faced with new problem. When I build some activity only for test and don't register it in AndroidManifest.xml manually - I got transparent image. I found your comment with similar problem https://github.com/robolectric/robolectric/issues/8081#issuecomment-1968280166 but may be you found any resolution or trick except add test only activity to AndroidManifes file in app?

I made sample with problem:

And try your test from issue - it failed too.

Test with robolectric 4.12.1 && roborazzi 1.11.0

takahirom commented 3 months ago

I don't have a good solution for this. You might consider looking into some alternatives. https://github.com/robolectric/robolectric/pull/4736#issuecomment-1831034882