1 year ago

#118994

test-img

AaronMT

What is the new preferred approach to running code before and after activity finishes with ActivityScenarioRule?

Previously with ActivityTestRule, one was able to override beforeActivityLaunched and afterActivityFinished to control app state before and after all tests (e.g, implementing a custom rule Class that extended ActivityTestRule that would be used in all tests). With ActivityScenarioRule marked final and without these protected methods, where/how is this logic now moved to with regard to how one controls before and after an activity? What's the recommended approach now if one were to write a custom rule to be applied to all tests?

android

kotlin

android-espresso

androidx-test

0 Answers

Your Answer

Accepted video resources