espresso-using-pcloudy-utility

Varun Kumar | Posted on | 2 min Read

Run Espresso on pCloudy using pCoudy Utility

Espresso is a testing framework for Android which automatically synchronizes your test actions with the UI of your app. It also lets the test wait until all the background activities have finished.
 
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.
 
In pCloudy you don’t have to set up the environment. Just follow these simple steps.
 
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. Here are the steps for both
 
1. pCloudy UI Dashboard
a. In pCloudy UI there is a section called Automation where you will find multiple automation frameworks integrated to the platform.
b.Select the Espresso automation and to fill in the required details.

 
Espresso-on-pCloudy
c. pCloudy Support two TestRunners.
i. AndroidJUnitRunner (android.support.test.runner.AndroidJUnitRunner)
ii. AndroidXJUnitRunner (androidx.test.runner.AndroidJUnitRunner)
 
Espresso-on-pCloudy
d. Select your Application and Test Application.
 
Espresso-on-pCloudy
e. Select the required devices.
 
Espresso-on-pCloudy
f. Click on Next button and Schedule the automation by clicking on the Schedule button.
 
Espresso-on-pCloudy
g. You will get a dialog box. Click on Ok.
 
Espresso-on-pCloudy
Espresso-on-pCloudy
h. You will get the active session details on the Dashboard and you will also be able to see the Live view.
 
Espresso-on-pCloudy
i. Liveview will help you to see the live execution on your test cases. Click on the Liveview icon
 
Espresso-on-pCloudy
2.pCloudy Utility
 
a. Download the espresso starter pack from here and Unzip it
b. You will find two files,
i. pCloudy_Espresso.jar
ii.Config.properties
c. Place the config.properties file and pCloudy_Espresso.js file into the same directory.
d. Update the config.properties file as guided in the comments in the file.
e. In your workspace, run the command by typing the java -jar pCloudy_Espresso.jar
 
Espresso-on-pCloudy
f. This will upload the required files which you have mentioned inside the config.properties files.

g. You will get the status of the Automation in pCloudy Dashboard ActiveSession.
 
Espresso-on-pCloudy
 
h. Even on the pCloudy dashboard, you can use the Liveview by which you can see the running test cases.
 
Espresso-on-pCloudy
i. Once the test execution is over, You will get a URL of the test execution report on the terminal.
 
Espresso-on-pCloudy
j. You can open the report from the dashboard Report section also. In the report, all the test details will be there as shown in the screenshots below.
 
Espresso-on-pCloudy
 
k. You will also get individual device reports. Inside the test case level details, you will find performance details, test case logs, device logs, and video files.
 
Espresso-on-pCloudy
Espresso-on-pCloudy

Varun Kumar

Varun is an avid technologist. He has more than 4 years of experience in Android development and AI is his latest passion. In his free time he likes to acquire knowledge of emerging technologies and explore new trends in app development.