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

Tests are very noisy, 3 #1842

Open
BernadetteTh opened this issue Feb 21, 2025 · 4 comments
Open

Tests are very noisy, 3 #1842

BernadetteTh opened this issue Feb 21, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@BernadetteTh
Copy link

Hi team!

Description
When running Paparazzi screenshot tests with xml layouts, I constantly get the same STANDARD_ERROR in log outputs that was already mentioned in previous issues.

StartScreenTest > testMultiple STANDARD_ERROR
    Feb 21, 2025 10:33:08 AM app.cash.paparazzi.internal.PaparazziLogger logAndroidFramework
    INFO: ResourcesCompat [3]: Failed to inflate ColorStateList, leaving it to the framework
    java.lang.NullPointerException: Cannot invoke "org.xmlpull.v1.XmlPullParser.next()" because "parser" is null
    ...

Note: As suggested, resetting the LogManager is a valid workaround, but quite tedious because it has to be done for almost every single test case.

Additional information:

  • Paparazzi Version: 1.3.5
  • OS: Mac Sonoma 14.6.1
  • Compile SDK: 35
  • Gradle Version: 8.9
  • Android Gradle Plugin Version: 8.7.3

Screenshots
See error log above, can provide additional if necessary

@BernadetteTh BernadetteTh added the bug Something isn't working label Feb 21, 2025
@emartynov
Copy link

This looks like working for me

        val logger = getLogger(Paparazzi::class.java.name)
        logger.level = if (fullLogging) Level.INFO else Level.OFF

@emartynov
Copy link

This looks like working for me

        val logger = getLogger(Paparazzi::class.java.name)
        logger.level = if (fullLogging) Level.INFO else Level.OFF

My bad, it looks like it is not working. It looks like working locally, but still a lot of logs on CI.

@BernadetteTh
Copy link
Author

@emartynov thanks for the suggestion!

Yes, you can definitely play around with the logging and either block everything / only expose certain logs / etc..., but that means there is a risk of potentially missing some actual errors.

@emartynov
Copy link

@emartynov thanks for the suggestion!

Yes, you can definitely play around with the logging and either block everything / only expose certain logs / etc..., but that means there is a risk of potentially missing some actual errors.

True! But this is my compromise from the experience that I never found any error from the paparazzi log, and these logs are producing so much output that it is hard to find which modules test failed. So, I would love to do an experiment where I disable all these logs and see if I'm missing something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants