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

Add screenshots for compose @Preview #399

Open
VladislavSumin opened this issue Oct 25, 2022 · 1 comment · May be fixed by #700
Open

Add screenshots for compose @Preview #399

VladislavSumin opened this issue Oct 25, 2022 · 1 comment · May be fixed by #700
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@VladislavSumin
Copy link
Collaborator

Add ability to automatically screenshots all @Preview in compose

@AzamatCherchesov AzamatCherchesov added enhancement New feature or request good first issue Good for newcomers labels Oct 25, 2022
@sergio-sastre
Copy link
Contributor

sergio-sastre commented Oct 25, 2022

@VladislavSumin
I personally believe this is out of scope of Kaspresso.

For that to happen one needs an annotation processor that

  1. reads the preview annotations and its parameters and creates a bitmap out of them
  2. generate test classes for it.

There is already a solution for the first step and it is called Airbnb/showkase

  • It generates a bitmap and creates a list with the bitmaps with all previews

Then one can use

  1. A parameterized runner like AndroidTestParameterInjector from Google or Parameterized from Junit4. The idea is that every item in the list is a parameter -> each parameter is a test
  2. Any screenshot testing framework, could be Paparazzi, Facebook, Shot, Dropshots or even Kaspresso

this is already done here for Paparazzi and Facebook:
https://github.com/davidvavra/showkase-screenshot-tests

Should be trivial to do the same for Kaspresso...

@Areyana Areyana mentioned this issue Aug 15, 2023
5 tasks
@Nikitae57 Nikitae57 linked a pull request Jan 28, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants