'Screen Shoot testing for android component test

I need to make a screenshoot for each component test when we start the task "./gradlew connectedDebugAndroidTest"

I can't find solution to do it. Any help ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source