AndroidUiTestingUtils icon indicating copy to clipboard operation
AndroidUiTestingUtils copied to clipboard

Cross-Library: support Google's Compose Preview Screenshot Testing Tool

Open sergio-sastre opened this issue 2 years ago • 1 comments

The idea is that one can generate screenshot tests automatically from the previews, and run them with the Screenshot test library of his choice!

For that, one can use a solution similar to the one described in the blog post automate-screenshot-testing-for-compose-previews-via-reflection together with the capability of AndroidUiTestingUtils of writing Cross-Library screenshot tests

Moreover, it'd be good to wait till Google releases its own solution to see how this solution would complement it, e.g.

  • run auto-generated tests from previews together with other existing screenshot tests
  • this would also allow you to run screenshot tests on devices
  • use library specific features, like "screenshot tests for accessibility"

On the other hand, it might also have some limitations, e.g. not all libraries might support everything the previews can.

sergio-sastre avatar Nov 01 '23 20:11 sergio-sastre