Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
The new Espresso Device API looks very useful, but it's hard to get started with it. If you're a developer who followed the official documentation for setting up UI tests, those tests will not work with Espresso Device API because of incompatibility with Activity recreations .
AndroidComposeTestRule
'sIt's unfortunate that the official doc sets us up for a failure. It's usinghttps://developer.android.com/studio/test/espresso-api .
composeTestRule
in its code samples, but is conveniently skipping how the rule is instantiated:Can Google provide samples or additional information on this page to solve these challenges? FWIW I was able to workaround this by creating a new test activity that calls
setContent
itself, but it's not super convenient to use.