= XCTest - pCloudy documentation

XCTest

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.

Pre-requisites

  • XCTest Project
  • pCloudy Account

Steps to get the API key

Step 1: Login to your registered account on device.pcloudy.com

Step 2: Click on your name given at the top right corner of the screen and click on Settings

Monkey Test

Step 3: You can find your API access key here. You can copy the same or click on Regenerate to get a new one.

Monkey Test

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

Monkey Test

Step 2: Open project settings (goto File -> Project Settings)

Monkey Test

Step 3: Change Derived Data Path (Change Default Location to Custom Location and give Derived data path) and Press Done.

Monkey Test

Step 4: Clean Build Folder ( Go to Project setting and Clean Build Folder)

Monkey Test

Step 5: Build Project for Testing (Goto Project and build for testing)

Monkey Test

Step 6: Open Finder Select Go to Folder

Monkey Test

Step 7: Open Derived Data folder which you set in Project Setting

Monkey Test

Step 8: Select Debug-iphoneos and .xctestrun

Monkey Test

Step 9: Compress Selected file

Monkey Test

Step 10: Use compressed in pCloudy for run XCTest automation

Monkey Test

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 apk/ipa from your local system or get the apk/ipa from pCloudy My app/data
  • 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.

Monkey Test

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.

Monkey Test

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

Monkey Test

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.

Monkey Test Monkey Test