Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sergio-sastre opened this issue Nov 1, 2023 · 2 comments

Comments

@sergio-sastre
Copy link
Owner

sergio-sastre commented Nov 1, 2023

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 sergio-sastre changed the title Feature request: Generate screenshot tests from Compose preview annotations Feature request: Generate screenshot tests from Compose preview annotations, that can run with ANY screenshot library Nov 1, 2023
@sergio-sastre sergio-sastre changed the title Feature request: Generate screenshot tests from Compose preview annotations, that can run with ANY screenshot library Generate screenshot tests from Compose preview annotations, that can run with ANY screenshot library Nov 1, 2023
@sergio-sastre
Copy link
Owner Author

sergio-sastre commented Jul 14, 2024

This will use ComposablePreviewScanner but it is currently blocked by this issue

@sergio-sastre sergio-sastre changed the title Generate screenshot tests from Compose preview annotations, that can run with ANY screenshot library Cross-Library: support Google's Compose Preview Screenshot Testing Tool Jul 18, 2024
@sergio-sastre
Copy link
Owner Author

This is blocked by sergio-sastre/ComposablePreviewScanner#32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant