linkedin espresso android Archives - pCloudy

Run Espresso on pCloudy using pCoudy Utility

Varun Kumar
By Varun Kumar
October 23, 2019
3 min Read
Share This Article
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 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.

Related Articles

April 28, 2020
Test Local And Internal Servers Before Deployment Using Wildnet

Some testing teams set up their own staging environment to test internal servers but as there is no public access which makes it difficult to perform local testing on remote devices. So how would you test your app which can…

Learn More Arrow

April 19, 2020
What’s New In pCloudy 5.6?

pCloudy is committed to delivering the best solutions in mobile app testing and therefore we come up with product updates at regular intervals. This time we are thrilled to announce the release of pCloudy 5.6 with exciting new features to…

Learn More Arrow

February 24, 2020
5 Best Practices To Avoid Test Automation Failure

Automation testing forms the core of any CI/CD pipeline and enterprises are keen to practice test automation to enhance the efficiency of the development process. Test automation saves resources and reduces the cost of any project in the long run.…

Learn More Arrow

Run Espresso in pCloudy Using Gradle

Suyash Dubey
By Suyash Dubey
April 5, 2019
4 min Read
Share This Article
Run Espresso in pCloudy Using Gradle

Do you know why Google has selected Gradle as the build system for Android Studio? Many Android developers work in a heterogeneous environment with different technology stacks. Gradle solves some of the hardest problems faced by the developers like how to automate the testing of apps and how to manage dependencies and variations that allow professional developers to develop variations of their app with one click. This is why pCloudy came up with a new update where you can now run Espresso with Gradle on pCloudy devices. Let’s get a brief introduction about Espresso and Gradle before we learn how to run Espresso with Gradle on pCloudy devices.

Espresso is a testing framework for Android which automatically synchronizes your test actions with the UI of your app. It also let the test wait until all the background activities have finished.

Gradle is an open source advanced build tool that allows seamless execution of tasks. It uses domain specific language and it is based on Groovy and Kotlin. It is a plugin based system so if you want to automate the task of building some package from sources then you can write the complete plugging in Java and share it with the world.

Gradle allows efficient and repeatable use of espresso and Test Orchestrator which allows automated yet fine-tuned control of the way you run your test. You can decide which specific test suites to be run to distribute the test cases across different devices. It is preferred by developers as it allows deep unit and functional testing rigs.

Power up your DevOps with Espresso and Gradle on pCloudy

You would be running Espresso on your machine using Android Studio and Gradle. However, the test would be running on pCloudy device. There is a pCloudy Espresso script that is provided by us and you need to put that espresso script in the workspace of the project. Along with the Gradle script, you will also get a config file. The gradle script will read input parameters from this config file.

Then you run Gradle to invoke the script which will upload your Application APK, test APK and other APK files to pCloudy. It would acquire a device to run your test on, it would execute those tests it will report back the status of what is happening into the Android Studio. After the test cases are run you can see the detailed reports and after that gradle script will release the device for other users to use.

There is a one-time setup that you need to do to place the gradle script in the workspace and you need to fill in the configuration file. So when you run the gradle script it will complete all the task for you and generate the report.

Steps to run Espresso with Gradle on pcloudy


1. Download the espresso starter pack from here and Unzip it
2. You will find three files,
a. pCloudy_Espresso.jar
b. Config.properties
c. build.gradle.SAMPLE
(This is a sample build.gradle that shows how to change your build.gradle to add the pCloudy Espresso jar.)
3. Copy the contents of the file build.gradle.Sample to the build.gradle file of your Android Application to register the new Gradle task and update as appropriate (see the image below)

33

4. Place the config.properties file in your android workspace in the same directory as your build.gradle file.

sdgef
5. Update the config.properties file as guided in the comments in the file.

6. In your Android workspace run the command by typing the name of the gradle task as below.

tttt
7. Once the test execution is complete you will get a URL of the test execution report. Some fields in the report are empty right now. We will fix them in subsequent phases.

rrr
The use of gradle has made it easier to run Espresso test on pCloudy devices. We can just use the configuration file and easily run the test scripts on pCloudy devices. This will save time and effort as it further simplifies the app testing process in pCloudy.

You can watch our webinar for more information.


Related Articles:

  • How to Run Espresso Test on Remote Devices
  • Appium vs Espresso: The Most Popular Automation Testing Framework in 2019
  • Run Espresso on pCloudy using pCoudy Utility
  • Automated Testing Using Espresso
  • Espresso with pCloudy.com
  • Suyash Dubey
    Suyash Dubey

    Suyash is a content strategist at pCloudy. He is a frequent contributor to the world's leading mobile technology blogs and tech forums. In his spare time, you will find him reading detective novels, watching a documentary or exploring a new destination.

    Related Articles

    April 28, 2020
    Test Local And Internal Servers Before Deployment Using Wildnet

    Some testing teams set up their own staging environment to test internal servers but as there is no public access which makes it difficult to perform local testing on remote devices. So how would you test your app which can…

    Learn More Arrow

    April 19, 2020
    What’s New In pCloudy 5.6?

    pCloudy is committed to delivering the best solutions in mobile app testing and therefore we come up with product updates at regular intervals. This time we are thrilled to announce the release of pCloudy 5.6 with exciting new features to…

    Learn More Arrow

    March 17, 2020
    Ensure Continuous Productivity By Leveraging Remote Devices For Mobile App Testing

    Remote working is going to be a new normal and remote access tools and platforms will play a key role in maintaining productivity. Working from home has many advantages both for enterprises and teams. There are many tools that help…

    Learn More Arrow

    Espresso with pCloudy.com

    Avinash
    By Avinash
    May 17, 2016
    2 min Read
    Share This Article
    Espresso with pCloudy.com

    Espresso with pCloudy


    Now, run your Espresso Scripts on hundreds of Mobile devices and build quality apps faster than ever.

    Several Mobile Automation Frameworks like Robotium, Calabash, Appium , KIF & uiautomator have been developed in recent years. Among a few popular ones, Espresso is one of them.

    You probably know, Espresso is a testing framework for Android apps. It is predominantly used by developers and testers for testing user interactions (UI) to ensure that users do not encounter crashes or unexpected results while using an app.

    There are several benefits of using Espresso, the primary ones are:

    • It automatically synchronises test actions with the UI of the app being tested. Meaning? To improve the reliability of tests, it detects when the main thread is idle and runs the test commands at the appropriate time.
    • This capability also relieves you from having to add any timing workarounds, such as a sleep period in your test code.
    • Espresso has an API that is small, easy to learn and built on top of the Android instrumentation framework.
    • It also supports testing activities outside the app like camera, browser and dialer etc which Appium does not support.

    However, when you have limited time and money it is a challenge to take full advantage of your Espresso scripts in improving the quality of your apps. Luckily, there are ways to overcome this.

    Conventionally, you would spend a huge amount of money to purchase several Android devices, and spend endless hours running your scripts independently on each device. Today, thankfully you don’t have to do this anymore, there is good news. With the help of a cloud-based testing platform like pCloudy.com, you can run your scripts on hundreds on real mobile devices in parallel.

    Yes, using pCloudy.com you can test your apps on any device of your choice and pay a just minimum price for the time you’ve used the device. You can not only save money, but you can also save your time by running your test scripts on multiple devices in parallel and get a detailed execution report.

    Here’s how you can use Espresso on pCloudy devices:

    Avinash
    Avinash

    Avinash Tiwari is a thought leader, a recognized keynote speaker, and the co-founder of pCloudy.com. He has 15+ experience in Product development and Testing. He brings with him a passion for emerging technology and quick adoption, both of which have solidified his reputation as a leader in the mobile app testing field.

    Related Articles

    October 23, 2019
    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,…

    Learn More Arrow

    April 5, 2019
    Run Espresso in pCloudy Using Gradle

    Do you know why Google has selected Gradle as the build system for Android Studio? Many Android developers work in a heterogeneous environment with different technology stacks. Gradle solves some of the hardest problems faced by the developers like how…

    Learn More Arrow

    March 27, 2019
    Appium vs Espresso: The Most Popular Automation Testing Framework in 2019

    Appium vs Espresso   Mobile app automation testing has evolved as a crucial aspect of the mobile app development process to help deliver better quality solutions, under controlled time cycles and cost schedules. But for delivering bug-free app, choosing the…

    Learn More Arrow

    Experience pCloudy Today

    Tickmark No Credit Card Required
    Tickmark Exceptional Security

    Copyright All Rights Reserved © 2020