Run Tests using Jenkins
Overview
pCloudy has released a plugin for Jenkins which provides access to the platform for performing automation testing of mobile apps from within Jenkins on real devices.
Pre-requisites
- An account in pCloudy with enough credits.
- An API Access key for authentication with pCloudy.com
- Chrome Browser on local machine
- Jenkins installed on local machine
- Download Jenkins pCloudy plugin
- Make a note the API Username and API Access Key
Steps to install the plugin:
Steps 1.Launch Jenkins in a Web Browser.
Steps 2.Navigate to Manage Plugins.
Steps 3.Click on the Advanced Tab.
Steps 4.Scroll down to Upload Plugin -> Click Choose File -> Browse for pCloudyJenkinsPlugin.hpi
Steps 5.Click on Upload, and wait for the pCloudy plugin to be installed.
Steps 6.To run automation test execution from Jenkins using pCloudy’s mobile device Cloud
Steps 7.Launch Jenkins in a Web Browser.
Steps 8.Select New Item.
Steps 9.Enter a Name for a project, select Project Type and Click on "OK".
Steps 10.Navigate to Build -> Add build step -> select Execute Test Suite on pCloudy.
Steps 11.Execute Test Suite on pCloudy will open a form.
Steps 12. enter the Authentication details for pCloudy.
Steps 13. 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
Steps 14. Select Devices.
Finally, once configuration is complete click on "Save" or "Apply".
Running Automation Execution
The Build can be triggered automatically as soon as a change is made, or can be manually triggered by clicking on "Build Now".
Viewing Console Output
Select the current project.
Select a Build from the Build History.
Select Console Output.
View the Reports.
The complete execution reports can be viewed in 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.