XCTest is Apple's official framework for testing applications using Xcode. This framework supports both Swift and Objective C. Using XCTest for your testing needs across iOS devices is made easy as pCloudy provides an interface to run the XCTest on multiple iOS devices simultaneously.
Objective of this document
This help guide will help you to understand the APIs that pCloudy platform provides to integrate your existing XCTest Projects with pCloudy. After the integration, you will be able to execute your XCTest Projects from your PC directly to the pCloudy real device cloud.
- XCTest Project
- pCloudy Account
Important Note - Steps to get the API Key on the platform have been given below for both the Old and New Interface, please scroll down to access the instructions for the same in the old UI.
Steps to get the API key in the New User Interface (New UI)
Step 2 - Click on your initals given at the top right corner of the screen and click on Profile
Step 3 - You can find your API access key here. You can copy the same or click on Regenerate to get a new one.
Steps to get the API key in the Old User Interface (Old UI)
Step 2: Click on your name given at the top right corner of the screen and click on Settings
Step 3: You can find your API access key here. You can copy the same or click on Regenerate to get a new one.
Steps to prepare XCTest package to run on pCloudy platform:
To run your "XCTests" over pCloudy, follow the below mentioned steps and execute it through API.
Step 1: Open your XCTest project in Xcode and select
Step 2: Open project settings (goto File -> Project Settings)
Step 3: Select iOS Development Target in Build Settings for TestSuits
Step 4: Change Derived Data Path (Change Default Location to Custom Location and give Derived data path) and Press Done.
Step 5: Clean Build Folder ( Go to Project setting and Clean Build Folder)
Step 6: Build Project for Testing (Goto Project and build for testing)
Step 7: Open Finder Select Go to Folder
Step 8: Open Derived Data folder which you set in Project Setting
Step 9: Select Debug-iphoneos and .xctestrun
Step 10: Compress Selected file
Step 11: Use compressed in pCloudy for run XCTest automation
Integrating pCloudy with your XCTest project:
You can integrate your XCTest project with pCloudy using APIs.
The basic steps to integrate your XCTest project using pCloudy APIs are given below. For a more detailed information on the same, kindly refer our
API documentation link
- Authenticate the pCloudy token to get an auth token
- Get the list of device(s)
- Book the device(s)
- Upload the Test suite zip file from your local system or get the Test suite zip file from pCloudy My app/data
- Resign the uploaded test suite zip file if it is not resigned before initialising the automation
- Initialize the automation
- Start the device services (Optional)
To check the status of the Automation, Login to pcloudy platform, goto “REPORTS” page, click on “My Active Session” and then click on the live-View icon.Live View on the New UI
Users will be able to see live execution on the Live-View page, it helps users to see the live execution on your test cases.Live View on the Old UI
Users will be able to see live execution on the Live-View page, it helps users to see the live execution on your test cases.
Once the test execution is completed, you can see the reports on pCloudy platform, goto “REPORTS” page, click on “All Reports”. In the report, all the test details will be made available as shown in the screenshot below
Users can also see individual device reports. They can view test case level details such as performance details, test case logs, device logs, and video files.