Skip to main content

Prerequisites

Before you can run tests on iOS devices, you’ll need to set up Appium and the iOS-specific dependencies:
  1. Install Appium Server and dependencies:
  2. Verify your Appium installation:
    This command will check your system specifically for iOS testing requirements and highlight any issues that need to be fixed.
  3. Start the Appium server:
    You’ll need to keep this server running in a separate terminal window while executing your tests.

Setting Up an iOS Simulator

Testpilot works with iOS simulators managed through Xcode. Here’s how to set one up:
  1. Install Xcode from the Mac App Store (requires macOS)
  2. Open Xcode and accept any license agreements
  3. Open the simulator by going to Xcode → Open Developer Tool → Simulator
  4. Create a new simulator device:
    • In Xcode, go to Window → Devices and Simulators
    • Click the ”+” button to add a new simulator
    • Choose a device type (iPhone 13 or newer recommended)
    • Select the latest iOS version
    • Give your simulator a descriptive name and click “Create”

Creating an iOS Test

Create a test file (e.g., ios-test.pilot.yaml) with the platform_config specifying your iOS app bundle identifier:

Running iOS Tests

To run a test on an iOS simulator or device, use the following command. You must specify the --driver, --os, --runtime, --os-version, and --udid flags to ensure the test runs correctly on your iOS simulator:
You can find your device’s UDID using
To get a list of running sims, use:
For testing web content in Safari on an iOS device:

Test Platform Configuration

The platform_config section of your test file is crucial for iOS testing:
  • Use url for browser-based tests on iOS Safari
  • Use ios_bundle for native iOS app tests

iOS-Specific Considerations

When testing iOS applications, keep in mind:
  1. Permissions: iOS will prompt for permissions (camera, microphone, etc.). Your test steps should account for these permission dialogs.
  2. Security Features: iOS has stricter security than Android. Your app must be properly signed and provisioned for testing.
  3. App Installation: For simulators, you’ll need an .app file; for physical devices, you’ll need a signed .ipa file.