Often, there is an inherent need to capture the playback when we execute a test so that we can actually see how the scenario fared. There can be a few reasons for this, one of which is the documentation. It might also be for demonstration purposes in the product team, or to see what happened on the device in the case of any failure.
Android ADB gives screen recording functionality only and not the audio capture. This should suffice for most functional test automation needs, which doesn't really require the audio component to be captured. ADB gives you a way to capture the display of Android devices, running Android 4.4 (API Level 19) or upward. The API is adb shell screenrecord [options] <filename>
.
- Let's look at a usage example--
adb shell screenrecord /sdcard/demoVideo.mp4
:- The screen recording automatically stops after 3 minutes or by the
--time-limit
option, if set API usage for time limits--adb shell screenrecord --time-limit <TIME_IN_SECONDS>
.
- The screen recording automatically stops after 3 minutes or by the
- The...