-
Notifications
You must be signed in to change notification settings - Fork 45
Conversation
} | ||
|
||
if (second == null) null else first to second | ||
} | ||
.filterNotNull() | ||
.map { (first, second) -> | ||
InstrumentationTest( | ||
index = first.current, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Printing test index and total test count sharded to particular device really helps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
Exception("Instrumentation was unable to run tests using runner $runner.\n" + | ||
private fun String.throwIfError(output: File) = when { | ||
contains("INSTRUMENTATION_RESULT: shortMsg=Process crashed") -> { | ||
throw Exception("Application process crashed. Check Logcat output for more details.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
.takeWhile { !it.startsWith("INSTRUMENTATION_CODE") } | ||
.map { it.throwIfError(output) } | ||
.takeWhile { | ||
// `INSTRUMENTATION_CODE: <code>` is the last line printed by instrumentation, even if 0 tests were run. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx for fix
) | ||
} | ||
adbDevice.log( | ||
"Test ${test.index}/${test.total} $status in " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super nice, I actually wanted this in #82
@yunikkk can you ship a release with this please? |
Fixes issue when
Composer
fails to recognize that app process under the test is crashed that leads to successful completion.