DiagnosticsOnFailureRule
Saves a screenshot and the window hierarchy when a test fails, so a CI failure shows what was on screen.
Files are written to <directory>/<TestClass>/<testMethod>.png and .xml. The default directory is in the instrumentation app's external files, which adb pull can read. Capturing never masks the test's own failure.
@get:Rule val diagnostics = DiagnosticsOnFailureRule()Content copied to clipboard