XCUITest Testing Hub
Overview
XCUITest is Apple's native UI testing framework for iOS applications. RobusTest Hub's XCUITest integration enables you to run your XCUITest suites on real iOS devices in the cloud, eliminating the need to maintain local iOS device infrastructure.
Key Benefits:
- Real iOS Device Testing: Execute tests on actual iOS devices in the cloud
- No Local Setup Required: Eliminate the complexity of iOS device management
- Scalable Testing: Run tests across multiple iOS devices simultaneously
- CI/CD Integration: Seamlessly integrate with your development pipeline
- Enterprise Support: Full support for enterprise app testing
Prerequisites
Before running XCUITest tests on RobusTest Hub, ensure you have the following:
Required Components:
- iOS Application: Enterprise build of your iOS app (.ipa file)
- XCUITest Suite: Compiled XCUITest test bundle (zipped .xctest file)
- RobusTest Project: A project configured for iOS testing
- Access Credentials: Your RobusTest API access key
Development Environment:
- Xcode with XCUITest framework
- iOS enterprise provisioning profile
- Compiled test bundle ready for execution
Setup Process
Follow these steps to set up XCUITest execution on RobusTest Hub:
Step 1: Project Configuration
Identify or create a RobusTest project for your iOS testing:
- One-time Setup: This configuration is needed only once per project
- Project ID: Located in your project dashboard URL
- Format: Alphanumeric identifier (e.g.,
5d176ffef0238be8f3b7afa5)
Step 2: App Build Upload
Upload your iOS enterprise build to the project:
- Frequency: Required for each new app build
- File Format: Enterprise .ipa file
- Build ID: Generated automatically upon successful upload
Upload Methods:
- Manual Upload: Use the project dashboard upload interface
- API Upload: Use the remote build upload API
For detailed build upload instructions, see Project Dashboard
Step 3: Test Build Upload
Upload your compiled XCUITest bundle:
- Frequency: Required with each new app build or test changes
- File Format: Zipped .xctest file
- Test Build ID: Generated automatically upon successful upload
Test Bundle Preparation:
# Build your XCUITest bundle
xcodebuild -project MyApp.xcodeproj -scheme MyAppUITests -sdk iphoneos build-for-testing
# Zip the .xctest bundle
zip -r MyAppUITests.zip MyAppUITests.xctest/
Step 4: Access Key Retrieval
Obtain your RobusTest API access key:
- Location: Available in your user profile page
- Security: Keep your access key secure and never share it publicly
- Usage: Required for all API calls to RobusTest Hub
For detailed access key information, see User Profile
Step 5: Test Execution
Execute your XCUITest suite using the RobusTest API:
API Endpoint:
POST /v3/job/new?accesskey=<ACCESS_KEY>
HTTP Method: POST
Request Payload:
{
"project": "<PROJECT_ID>",
"type": "XCUITest",
"runMode": "distributed",
"build": {
"aut": "<BUILD_ID>",
"test": "<TEST_BUILD_ID>"
}
}
Step 6: When you run your job using the API above, the response will contain the job id and run id. Use the run id to get the JSON for the run report:
GET http://<RobusTest URL>/v3/report/<run id>/xcuitest
Step 7: To get the JSON report for an individual test case, use the id value for each test case run instance in the following URL:
GET http://<RobusTest URL>/v3/xcuitest/testcase/<test case instance ID>
