Integrating pCloudy with Continuous Integration Platforms

pCloudy has developed plugins to make it easy to integrate testing in our cloud platform with many of the most popular CI platforms. These integrations are directly supported by pCloudy. 



Logging a bug in JIRA
pCloudy plugin for JENKINS

pCloudy plugin for ECLIPSE IDE

pCloudy plugin for Android Studio

pCloudy plugin for Cordova



 Logging a bug in JIRA


An Overview

We understand the pains a tester goes through and that’s why we have introduced this feature to bring an end to all your woes! Now you can log bugs directly to JIRA while you are testing your application on pCloudy. You can attach relevant data in one single click.

 

Let’s see how this feature can help you log bugs in JIRA:

 

Provide your credentials once and we store the authentication cookie provided by JIRA.

(Note : we don’t store your credentials)



After logging in you will come across a JIRA Task pop up where you can easily log a Bug or Task to JIRA along with relevant attachments (screenshots, logs or video links). No need to download a file and then upload it separately to JIRA.




pCloudy plugin for JENKINS


An Overview: 

pCloudy has released a plugin for Jenkins which provides you access to the platform for performing automation testing of mobile apps from within Jenkins on real 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. Jenkins installed on local machine
  5. Download Jenkins pCloudy plugin


Preparation:


How to install the plugin:



Download the 
Jenkins plugin for pCloudy



Launch Jenkins in a Web Browser -> Navigate to Manage Jenkins




Navigate to Manage Plugins


Navigate to Advanced Tab


Scroll down to Upload Plugin -> Click Choose File -> Browse for pCloudyJenkinsPlugin.hpi




Click on Upload, and w

ait for the pCloudy plugin to be installed.





How to run automation test execution from Jenkins using pCloudy’s mobile device Cloud?

Launch Jenkins in a Web Browser

Select New Item


Enter a Name for a project, select Project Type and Click OK


Navigate to Build -> Add build step -> select Execute Test Suite on pCloudy



Execute Test Suite on pCloudy will open a form


In Step 1, enter Authentication details for pCloudy




In Step 2, enter Execution details

a) CLI Path is a path where the test scripts are located. It can be in exe or jar format.

  i.  CLI Path for exe "C:\xyz.exe %USERNAME% %CLOUDURL%"

  ii.  CLI Path for jar "java -jar C:\xyz.jar %USERNAME% %CLOUDURL%"

Eg:

java -jar C:/Users/user/Desktop/pCloudy/Jenkins/TestMunk-Automation.jar %CLOUDURL% %USERNAME% %APIKEY% %APPPATH% %DURATION% %DEVICES%

b) App Path is the location of the .apk or .ipa file

c) Duration is the total time required to execute the entire test script


In Step 3, Select Devices


Finally, once configuration is complete click Save or Apply


Running Automation Execution

The Build can be triggered automatically to start a build as soon as a change is made, or can be manually triggered by clicking Build Now


Viewing Console Output


Select the Project you are working on



Select a Build from the Build History



Select Console Output



View the Reports

The complete execution reports can be viewed in the HTML format


Scroll down to the end of a Build's Console Output


The complete execution report will be available in the path provided in the Console Output



pCloudy plugin for ECLIPSE IDE



An Overview: 

pCloudy provides a plugin for Eclipse IDE. Using the plugin you can perform both manual and automation testing of mobile apps. The plugin provides a user interface to connect to the pCloudy platform. You can upload apps, book devices and perform your testing right from your IDE.


For Manual Testing: Upload your app to the cloud drive, select the device, and perform the manual testing of your app right from Eclipse.


For Automation Testing: This plugin helps you get a pseudo code for your Test Scripts to run on multiple pCloudy Real Devices in Parallel. Just install the plugin, login to pCloudy.com, upload your app, select devices and get the pseudo code.


Prerequisites:


  • You have an account over pCloudy with enough credits.
  • Latest web browsers on local machine
  • Latest version of Eclipse
  • Eclipse pCloudy plugin



Preparation:




Downloads:






Steps to be followed:


Launch Eclipse > go to Help menu of Eclipse > click Install New Software > Copy and paste the below Eclipse plugin address in Work with textbox.

http://eclipseplugin.pcloudy.s3-website-us-east-1.amazonaws.com/ 


  • Click on Add, a new pop up window of Add Repository will open
  • Enter Name and Location, click on OK
  • Check pCloudy checkbox and then click on Next.


  







Now, you need to install pCloudy Eclipse Connector. Click on Next to begin pCloudy Eclipse Connector installation. 





 

Further, check I accept the terms of the license agreements checkbox and click on Finish.





 

 Installation of pCloudy Eclipse Connector begins.


  


On completion of pCloudy Eclipse Connector installation successfully, an alert message appears. Click on OK to proceed pCloudy plugin.


 


Now, enter Cloud URL of pCloudy along with registered Username and Access Key over pCloudy to login successfully. Click on Apply and then OK.


 


Now, you are able to perform Automation/Manual testing of apps based on Appium TestScripts/pCloudy/OpKey or Test as per your requirement.


Automation Testing of App



To perform automation testing of your app, here's a checklist you need to prepare for Automation


Here, we are discussing about Test Automation of apps by over pCloudy.

Select Automation & pCloudy and then upload your app to be tested.

Click on Next to proceed.




Select duration and filter list of devices by using given filter parameters (Android/iOS, Manufacturer, and Version). Select desired device (Ex. Samsung) and click on Next.




Finally, you get pseudo code for performing Test Automation. You can copy it to clipboard or copy it manually by selecting entire pseudo code.



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. See this link to learn how to add reference in eclipse.

 

You can download pCloudy-java-connector.jar & gson.jar(a dependancy of the pCloudy-java-connector.jar)

 



Manual Testing of App


If you want to perform Manual Testing of apps over pCloudy through Eclipse then select Manual way and pCloudy and upload app to be tested. Click on Next to proceed.




Select duration and filter list of devices by using given filter parameters (Android/iOS, Manufacturer, and Version). Select desired device (Ex. Samsung) and click on Next.


 


Now, you are recommended to open pCloudy in browser. Click on Open in browser and then on Finish.


 


When you click on Finish, pCloudy login page opens in eclipse. Now, you can login and perform manual testing on selected device as well.

 



pCloudy plugin for Android Studio


Overview:


Users can connect any pCloudy device using DeviceTunnel as if the device is connected physically with their Local Machine with USB. This can be used by Developers to control a device using ADB commands and debug their apps in real time.


Here are the steps to use DeviceTunnel

Prerequisites:

Install pCloudy plugin on Eclipse IDE or Android Studio


Steps for Android Studio:

  1. Click the pCloudy icon to open the plugin
  2. Select "DeviceTunnel" option.
  3. Select Device Location.





4. Select a device with which the DeviceTunnel connection should be established





5. Click  Generate DeviceTunnel Command to initiate the connection



6. The plugin provides an ADB connect command with Port number. Please copy the URL by using the Copy to ClipBoard button.

   


7. Open terminal/cmd in your computer

8. Enter the DeviceTunnel(adb connect localhost:xxxxx) command

        NOTE: If you unable to do adb connect localhost:xxxx, try adb connect 127.0.0.1:xxxx instead


9. You can also view the device screen by click on View Device Screen button

10. Login with your credentials.

 


11. After login, you will get the device screen. If you see any trust popup on device please accept it.

12. Once the connection is established you can push ADB commands to the device

 




pCloudy plugin for Cordova


pCloudy being a unified mobile app testing platform is used both by developers and testers. pCloudy offers DeviceTunnel feature for developers to connect to a real device on cloud and use the device as if it’s connected to their local USB. Currently the DeviceTunnel is possible through Android Studio/Eclipse and XCode plugins. Although developers could create builds perfectly using any of the IDEs on the platform, Cordova developers looked for a seamless way of creating apps on a command line tool.

 

As mentioned earlier, Cordova is a popular open source app development framework among developers and there was a need of command line DeviceTunnel Interface to pCloudy so that developers could build their Android or iOS apps and put it to test on a real device on pCloudy. Now, pCloudy real devices on cloud can be accessed by running few commands on the command line interface.

 

Let’s see how this works with Cordova.

 

Note: pCloudy command Line DeviceTunnel Interface is only available for Android devices on Public cloud. It is available for both Android and iOS on private and on-premise cloud.

 

Pre-requisites

 

  • JDK 8 and above.
  • android-sdk latest version.

 

Jar download path

 

http://pcloudy-content-distribution.s3.amazonaws.com/index.html?prefix=Android%20Device%20Tunnel/

 

This will be a one-time activity and need not be repeated again.

 

Steps to Run the Jar

 

Step 1: Run the DeviceTunnel jar by passing the cloud url, user name and api key

 

Example: java –jar pCloudy_DeviceTunnel.jar https://device.pcloudy.com test@pcloudy.com skdflj4tlko46lsa

 

Note: Mention the device tunnel jar path where you store the downloaded pCloudyDeviceTunnel.jar

 

Example: Here, the jar is saved in desktop so the path would be like

 

java –jar /Desktop/pCloudy_DeviceTunnel.jar https://device.pcloudy.com test@pcloudy.com skdflj4tlko46lsa

 

Cordova Plugins

 

Step 2: It will display a list of available devices in that cloud. Select any one device by mentioning the device number and press enter.

 

selct-any-device-press-enter

 

samsung grand quattro

 

Step 3: Enter the duration (in minutes) for which you want to book the device, then press enter.

 

enter id

 

Step 4: Selected device gets connected to your system.

 

get connected to your system

 

Step 5: Open another terminal and check if the device is connected or not

 

open another terminal

 

If the device list shows as unauthorized then copy the url displayed by the jar and paste it in the browser.

 

Device List

 

connect to a device

 

Step 6: Click on ok option on the device and check device list again in terminal.

 

Ok Option

 

Ok Option

 

Now device is connected to your system. You can use this device like a local device.

 

Now use the connected device in Cordova app Debugging. Build the cordova app for android.

 

run cordova android

 

Step 7: Cordova build process

 

cordova build process

 

Deploying to device

 

Step 8: After the successful build, check if the app gets installed on pcloudy device which you had connected to your system.

 

After Successful Build

 

Cordova app is installed on pcloudy device.

 

Step 9: You can debug this through chrome debugger.

 

Chrome Debugger

 

DevTools

 

pcloudy-devtools

 

Note: If you want to exit from the device tunnel jar, please type ‘EXIT/exit’.

 

exit

 

Conclusion

No matter if you are a developer or a tester, just sign up on pCloudy to make the most of your app testing.