Added KillApp command to reproduce System-initiated Process Death on Android #1727
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed Changes
This PR allows to test a screen against what is called a System-initiated Process Death which is something very specific to the Android platform, but gives a very strong proposal value to Maestro for Android developers 👍
Currently, only
stopApp
is available as a command to try to reproduce it but it fails to as it uses theforce-stop
adb command:To trigger System-initiated Process Death properly, Android developers need to be able to call the
kill
command on adb:I suggest doing so by adding a
killApp
command:Different behaviors per platform:
adb shell am kill
under the hoodstopApp
(synonym command) as there is no such thing as a Process Death on iOSstopApp
(synonym command) as there is no such thing as a Process Death on WebUsing this new command, an Android developer can really test for this use case by doing the following:
A test to detect the Process Death issue can be found there and running it does manage to detect the issue properly:
Testing
killApp
commandLet me know what you think or if something missing! 😊
Thank you 🙏