Back in the old days I could drop something like t...
# compose
t
Back in the old days I could drop something like this into my custom test runner onStart
Copy code
Espresso.setFailureHandler { error, viewMatcher ->
    val scan = Radiography.scan(viewStateRenderers = DefaultsIncludingPii)
    error.addSuppressed(RuntimeException("\n$scan"))
    error.addSuppressed(RuntimeException(idlingRegistryStatus))
    DefaultFailureHandler(targetContext).handle(error, viewMatcher)
}
Is there a good way to do similar with the compose rule + testing apis?
z
Compose testing uses Espresso itself so I would expect this to also work for compose? But I haven’t tried it
t
It deff uses idling resources, but can't seem to find a single case of a test failure hitting the error handler. may need to just play with junit listeners and see if logging at that point is early enough marathon hasn't already stopped the tail