-
Notifications
You must be signed in to change notification settings - Fork 215
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
Mocks fail with Paparazzi plugin, NoClassDefFoundError, IllegalArgumentException etc. #1331
Comments
The key part of this (and any stack trace) is the last cause of the chain, i.e.,
I've run the repro locally and also see:
This is unfortunately a bit of whack-a-mole...I wonder if class loader isolation would help here. |
I have the same issue with a few of my unit tests (using Mockk), mostly |
I'm getting the same error
|
I'm running into the same issue with a bunch of tests using Mockito:
Is there any workaround for this? |
Description
Mocks inside unit tests seem to fail when adding the paparazzi plugin. Errors such as:
java.lang.NoClassDefFoundError: Could not initialize class android.view.accessibility.AccessibilityNodeInfo
java.lang.IllegalArgumentException: Could not create type
Steps to Reproduce
Test repo here:
https://github.com/connected-whunt/PaparazziMockitoTest
See ExampleUnitTest fails with the above errors, but if you remove Paparazzi (+ MainScreenScreenshotTest) it will run as expected, mocks won't error out.
Expected behavior
Hoping to be able to use mocks in those instances along with Paparazzi tests.
Additional information:
Screenshots
Example error dump:
The text was updated successfully, but these errors were encountered: