XCUITest is a mobile automation framework provided by Apple that helps user write UI tests for your iOS applicationsThis guide will help you run your first XCUI test on pCloudy.
Pre-requisites
- User should be registered on pCloudy platform. Sign up for a free trial or purchase a plan.
- Need access to .zip file
If User do not have .ipa files and are looking to simply try App Automate, user can download our sample zip file - To download sample zip file click the link below.
- Upload the sample zip file in the MyData section manually or using API.
- Upload your iOS app (.ipa) file on the pCloudy platform using an API request.
curl --location --request POST URL format:
Steps To Execute XCtest
After the user uploads the app and test suite on the pCloudy platform, Use the below mentioned API's
1.Get Device list for iOS-This api is used to get iOS device list
Endpoint: request POST: {{URL}}/api/devices
Sample request
{
"token": "jmxbd3jvrdt74nzcjc43ccth",
"duration": 15,
"platform": "ios",
"available_now": "true"
}
Sample response
}
2.Book Device API
This api book the devices for XCTest automation execution.
Sample request
{
"token":"s85zmqdv3wfxgrp9x3btynbn ","devices":[783],"booking_duration": "30","automation_type": "XCUITest"}
Sample response
{
"result": "Devices are reserved successfully for the automation execution",
"statuscode": "200",
"data": {
"automationId": 440916
}
}
3.Initialize Automation
This API initiates the XCTest on devices for that test suite. The test suite you had to upload by using upload API which is available in Generic API.
}/api/api/initautomation
Sample response
}
4.Start Device Services
This API helps to initialize device services on the device like device log, performance log, and session video recording.
Sample request
{"token":"s85zmqdv3wfxgrp9x3btynbn","automationId": "440925","startDeviceLogs": "true","startPerformanceData": "true","startSessionRecording": "true"}
Sample response
}
- Automation Report Shareable Link
Note: Change the format of shreable link to JSON format.
Sample request
Sample response
}
- Release Device
This API helps you to release the XCTest automation devices.
Sample request
View test results
After you start an XCUI test-suite execution visit your Reports section to view your test results