I'm running into an <issue where I can't use papar...
# squarelibraries
e
I'm running into an issue where I can't use paparazzi in a source set that has Robolectric tests . I'm hoping I can make a
snapshotTest
source set to work around that, but would
recordPaparazzi
still depend on the Robolectric tests from the unit test source set? Any other issues that might come up with making a custom
snapshotTest
source set?
e
custom sourceset doesn't sound like a solution either. test and androidTest are handled directly inside AGP and there isn't an API to create new variants for test
j
This is unsupported
Paparazzi and Robolectric are rivals and when they get together they fight
e
😓 Would you recommend ditching Robolectric and only using Paparazzi snapshot tests? This was our first set of tests for this project so we're still trying to get a feel on how we want to do it. These particular tests are for a composable component in isolation, and we were just using Robolectric so that we could use
ComposeContentTestRule
. I'm getting the feeling that all of the things that we test for explicitly with Robolectric would get implicitly tested for with Paparazzi, but I'm not sure if that would scale to all of our future use cases.
j
I’d recommend structuring your modules to split paparazzi tests from Robolectric tests
e
So a separate module for paparazzi tests (or vice versa)?
j
Yep
e
Thanks! Any thoughts on having one mega module for all paparazzi tests? A few folks on my team want to consider that, but to me it feels like a step back in terms of our modularization efforts.