Category Page

App Testing

If recent past has been any indication, then it is a certainty there are growing expectations from Testers and Developers alike, to take quality head on, as a joint feature. More so in the Mobile App Testing projects where changes are required faster than ever.

 

As part of DevOps practices, it’s has become imperative for developers to run as many tests as possible with every code check-in. These tests could be automated functional, API or Unit Tests. Some of the popular tools to used by Developers to create their tests are Espresso, XCTest and Appium.

 

Following are some the Challenges faced by developers:

  • Developers need access of right set of devices across different versions to be able to run their tests.
  • Debugging capability on those devices so that they can fix issues quickly.
  • Access to a specific model of devices to debug production issues.

Try taking a look at a typical developer’s cubicle and you will see a series of mobile devices connected with several long USB cables running into computers. It does get frustrating to see others furiously plugging USB cables in and out of the mobile devices for App Testing on various devices.

 

Many of the organizations are shifting to device cloud to provide their teams access of right Mobile Devices. Device cloud are solving the need of test teams but provide limited debugging capabilities and hence not preferred by Developers.

 

To directly address need of Developers, pCloudy recently introduced DeviceTunnel, which fully allows developers to take complete control of the device in cloud. This unique solution provides access of cloud devices through the Android Studio or Eclipse IDE and the command line tool installed in your computer.

 

It works as if Device is connected directly to your computer through a USB cable. From the point of view of tools like Android Studio or Eclipse, a cloud-based device appears physically attached. In reality, the Device Tunnel communicates with pCloudy’s servers over Internet.

 

App Testing

Access devices directly from your terminal

 

Once a connection is established, the developers can perform the following actions on these devices:

  • Issuing a range of ADB commands for debugging, shell creations, port forwarding, and viewing general information about any cloud-based Android device
  • Copying and pushing files to connected cloud-based devices
  • Installing and uninstalling applications
  • Debugging apps during development or testing by adding breakpoints, inspecting variables, analyzing run-time metrics to optimize your app and more
  • Run their tests on the device directly from their IDE

To know more on how to connect any device on pCloudy using Device Tunnel Click Here.

It is undeniable that developers and testers need quicker access to diverse devices for the brisk evaluation of app and debugging. Device Tunnel enables both sets of engineers to instantly connect to any device hosted on cloud and run faster debug sessions and thereby, maximize the quality of their build cycles.

Plugin for Android Studio

 

An Overview

pCloudy has released a plugin for Android Studio which provides you access to the platform for performing manual and automation testing of mobile apps from within Android Studio IDE.

For Manual Testing

Now you can build and upload your Android Apps to pCloudy devices directly from your Android Studio project workspace.

For Automation Testing

If you are using Appium as automation tool and have created your Automation scripts as a project in Android Studio, you can run the scripts directly on pCloudy devices.

Prerequisites

1. An account in pCloudy with enough credits.
2. An API Access key for authentication with pCloudy.com
3. Chrome Browser on local machine
4. Android Studio IDE
5. Android Studio pCloudy plugin

Preparation

Reference the JAR files to Eclipse
Make a note the API Username and API Access Key

How to Install the Plugin

1. Download the Android Studio plugin for pCloudy
2. Open your Android Studio > go to Setting icon of Android Studio > Select Plugins > All available plugins are shown which can be filtered with the help of Show feature as per requirement.
3. Click on Install plugin from disk > Browse and select location of your downloaded Android Studio plugin of pCloudy
4. Click on OK
5. Now, you can see that pCloudy plugin has been successfully integrated to Android Studio.

Select pcloudy plugin and click on OK to proceed. Here, we are going to install pCloudy plugin for Android Studio from local disk. Click on Install plugin from disk
install-plugin-from-disk

pCloudy plugin for Android Studio has been integrated successfully.

pcloudy-plugin-over-android-studio

Click on pCloudy plugin icon shown on Android Studio. pCloudy Login page opens. Enter your Username and Access Key and click on Login. Your login credentials are verified. Click on OK to proceed.
pcloudy-plugin-over-android-studio

Note: This is one-time task. Credentials will be valid until you logout.
Now, you are ready to use the Android Studio Plugin for pCloudy.
Manual Functional Testing of App

After successful login, upload your app screen appears. Workspace page helps you to select application path of your local machine.
successfully-authenticated

Cloud Drive page lets you to select app from the list and click on Next to proceed.
upload-your-app

Local Drive lets you to upload your app from your local machine to perform testing.
upload-a-project-file

Mobile Browser enables you to use mobile browser for testing.
use-mobile-browser-for-testing

After selecting app, the next step is choosing a device. Select and Connect to devices page provides you list of devices which can be filtered by using filter parameters (Android/iOS, Manufacturer, and OS version). Select duration of your testing. The device will get booked for selected time duration.

When you click on Next, you get a message “Please wait while we open the pCloudy Platform on your default browser for Manual Testing. Please advised that…”
select-and-connect-to-devices

Just after few seconds, you will be redirected to the connected device page over pCloudy to perform manual functional testing of your app on selected device.
briefing

Automation Testing of App

Similarly, the first step towards performing automation testing is selecting an app from workspace/cloud drive/local drive or use mobile browser.
my-application

Select your desired device; select duration of automation testing. You can filter devices displaying devices by using filter options (Android/iOS, Manufacturer, and OS version). Click onNext to proceed.
choose-devices

Note: Here, you can select multiple devices as well.

Finally, you get corresponding pseudo code for performing Automation testing of app. You can copy this pseudo code to clipboard and use it within your Automation script…
paste-the-code-and-proceed

You will need the pCloudy java connector jar file for the above code to work. The pCloudy-java-conector.jar contains the API wrappers, classes & methods to use the pCloudy RestfulAPIs (without knowing how to call rest webservices from java). The gson.jar is a well known, opensource google library. You should add the pCloudy-java-connector.jar in its build path as a reference within your java project containing appium scripts.