How a one-line import change exposes timing assumptions your test suite has quietly relied on for years
1. “My tests passed yesterday and nothing changed”
The diff that turned your CI red usually looks harmless. Maybe it’s one line per file:
- import androidx . compose . ui . test . junit4 . createComposeRule + import androidx . compose . ui . test . junit4 . v2 . createComposeRule
Enter fullscreen mode
Exit fullscreen mode
Someone accepted an IDE quick-fix for a deprecation warning. Or a Compose BOM bump plus allWarningsAsErrors = true made the deprecation fail the build, and a teammate ran a find-and-replace across the test source set. The production code didn't change, and neither did any assertions. Even so, 140 UI tests that had been green for two years now fail with messages like these:
java . lang . AssertionError : Expected : [ paywall_viewed ] but was : [ ] java . lang . AssertionError : Failed to assert the following : ( Text + EditableText contains 'Saved' ) expected : < Ready ( . . .…