Running Espresso Scripts
Espresso is a testing framework for Android which automatically synchronizes your test actions with the UI of your app. The platform allows you to write concise and reliable Android UI tests.It also lets the test wait until all the background activities have finished.
After the test cases are run you can see the detailed reports. Once automation ends, the device under test will be released automatically so that you or other users can use it later.
There are two ways you can execute espresso test cases.
1. pCloudy UI Dashboard
Here are the steps for running your Test Scripts on multiple Android Devices:
- Login over
www.pcloudy.comwith your registered Email ID & Password.
- Choose Instrumentation Type based on your Test Scripts you’ve written. pCloudy provides support for Instrumentation Type (InstrumentationTestRunner, AndroidJUnitRunner, AndroidXJUnitRunner) for Android. For more information, see Instrumentation in the Testing Fundamentals section of the Android Developer Tools documentation.
- To schedule "Espresso" over pCloudy, follow the below mentioned steps-
- Go to the Automation page and Select the Automation tool as "Espresso"
- Select "Instrumentation Type" based on your Test Scripts you've written
- Upload .apk and test.apk file
- Select device on which test needs to be performed
- Click on Schedule
- Login to pcloudy platform,goto REPORTS page ,click on My Active Session and then click on live-View icon
- Users are able to see live execution on the Live-View page,Liveview will help you to see the live execution on your test cases.
- Once execution is over ,users can check the report.To see the report goto “REPORTS” page ,click on “All Reports”.Here click on view icon as shown in below screenshot
2. pCloudy Utility / Espresso Orchestrator
The pCloudy utility uploads your Application APK, test APK and other APK files to pCloudy. It will then acquire a device to run your test on, execute those tests and report back the status and test report.
- Download the espresso starter pack from here and Unzip it,You will find two files
- a. pCloudy_Espresso.jar
- b. iConfig.properties