idevice
Developer Tools

XCTest

Run XCTest and XCUITest sessions through DVT.

XCTest support builds on DVT, Installation Proxy, AFC, RSD, and CoreDevice Proxy. The public types include TestConfig, XCUITestService, and WDA run handles.

Use It For

  • Build XCTest configuration payloads.
  • Start XCUITest flows.
  • Run WDA-backed test sessions.
  • Bridge WDA ports when needed.

Feature Flag

Cargo.toml
[dependencies]
idevice = { version = "0.1.64", features = ["usbmuxd", "xctest"] }

Service Names

PathValue
DVT Lockdowncom.apple.instruments.remoteserver
DVT RSDcom.apple.instruments.dtservicehub

Rust Example

src/main.rs
use idevice::dvt::xctest::{TestConfig, XCUITestService};

let config = TestConfig::from_installation_proxy(
    &mut installation_proxy,
    "com.example.Runner",
).await?;
let service = XCUITestService::new(provider).await?;

CLI Equivalent

Terminal
idevice-tools xctest

Common Errors

ErrorWhat to check
Channel creation failedThe DVT remote server did not accept the channel identifier.
Protocol decode errorCheck that the client and device service are using the expected DTX payload shape.
Developer service unavailableStart from the iOS 17+ tunnel path or a device state that exposes developer services.

Source

On this page