Step 1: Goto my Github repository - https://github.com/rajeevcode/TestAutomation_using_Espresso
Step 2: Clone the entire source code repository to your local machine
Step 3: Open the Android Studio on your local machine
Prerequisite -
1. Android studio should be installed on your local machine
2. Java 7 above version installed on your machine with set environment variables
Step 4: Select the option 'Open an existing Android Studio Project' in Android Studio'
https://www.screencast.com/t/llX5oGkVrX2w
Step 5: Add the Path to the downloaded source code project
Step 6: Click on next -> Next -> finish
Step 7: Wait till Gradel build is finished
Step 8: Goto folder path ->
//git/SCB_QAAutomate_Quiz_v2/app/src/androidTest/java/com/sourcey/materiallogindemo
https://www.screencast.com/t/FINNEgAL7Wj8
Step 9: Right click on com.sourcey.materiallogindemo
https://www.screencast.com/t/pJNMrVAZ
Step 10: Click on Run 'Test in' com.sourcey.materiallogindemo
https://www.screencast.com/t/pJNMrVAZ
Step 11: It will ask option to run on Andorid Emulator, Geny Motion or Real devices
https://www.screencast.com/t/r9wXcv6teL
Step 12: Trigger the Test run
Step 13: You can see the automation script running in the console and on the target AUT(Application Under Test) Device
https://www.screencast.com/t/wmj9GdYytC
https://www.screencast.com/t/iszCYOdK4F9
Step 14: Failed and Passed execution can be seen in the console and test script running can be seen on the target device.
Step 15: You can see the Test script execution logs and status in Console
Step 16: You can even run each Test Suite individually
Step 17: Right click on the Test Suite(Say 'Login Test') -> Click on Run 'Login Test'
https://www.screencast.com/t/hkMCLNOdar
Step 18: Each Test Suite can be run individually
Step 19: You can even run each and every test scenario seperately or can debug by clicking on green arrow as shown -
https://www.screencast.com/t/pBUpo4aBL5c
Step 1: Goto Run console
Step 2: Hover the mouse 'Export Test Result' (Box with Green Arrow pointing upward) -
https://screencast.com/t/HhteVZ1VAUrq
Step 3: Click on Export Test Results as shown in screenshot -
https://gyazo.com/871148715512e6186ff6895921a9087f
Step 4: Select Export Test Results in either of the below mentioned format i.e. -
- HTML
- XML
- Custom, apply XSLT
https://www.screencast.com/t/ajL3vVq9
Step 5: Check the option 'Open exported file in browser' and Click on 'OK'
Step 6: Now the status of Test Execution can be viewed in any browser as shown in below screenshot -