Vinay Gaba
06/08/2020, 12:29 AMAndroidComposeTestRule
to start a custom activity to test it. The individuals tests work fine but they fail when running them together. This is because I’m not doing anything in the @Before
method to clean and restart the activity. That causes the state to be shared between the test cases. I know in Espresso I’ve used a custom test rule for avoiding this. Can I get any direction on whether something like that already exists in compose?testInstrumentationRunnerArguments clearPackageData: 'true'
More details here - https://developer.android.com/training/testing/junit-runner