You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to issue #193, it would be good if users had a straightforward way of running arbitrary code before and after the test run, but while the emulator is running and in a healthy state.
Additional feature considerations
Exposing adb binary location or command execution helpers
Example
This is not a proposal for implementation but suggests one way this could look to consumers
androidEmulator {
onBeforeTestRun {
// adb is a function defined in the scope of these
adb("push", file(project.projectDir, "scripts/instrumentation-test-setup.sh"), "/sdcard/setup.sh")
adb "shell", "bash /sdcard/setup.sh"
}
onAfterTestRun {
// Any arbitrary code could be run// Retrieve files generated by the tests
adb "pull", "/sdcard/test_output.json", file(project.buildDir, "test_output.json")
result = adb "logcat", "-d"
project.logger.debug("logcat stdout: "+ result.stdout)
project.logger.debug("logcat stderr: "+ result.stderr)
}
}
The text was updated successfully, but these errors were encountered:
Similar to issue #193, it would be good if users had a straightforward way of running arbitrary code before and after the test run, but while the emulator is running and in a healthy state.
Additional feature considerations
Example
This is not a proposal for implementation but suggests one way this could look to consumers
The text was updated successfully, but these errors were encountered: