Enumeration
TestKind
Runs unit and UI tests.
enum TestKindOverview
iOS: Uses
xcodebuild test. Supports running against one or more destinations in a single invocation, aggregating pass/fail/skip counts.Android: Uses
./gradlew test(JVM unit tests) orconnectedAndroidTest(instrumented on-device tests).
When multiple destinations are provided (iOS), ShipIt runs a separate xcodebuild test pass for each destination, aggregating pass/fail/skip counts across all runs.
If destinations is empty or nil and no destination fallback is provided (iOS), the action throws ShipItError.invalidConfiguration rather than inventing a simulator name that may not exist on the current machine. Use DestinationDiscovery to enumerate valid destinations before configuring this action.
Usage
// iOS
let result = try await TestAction().run(
with: .init(
scheme: "MyApp",
destinations: ["platform=iOS Simulator,name=iPhone 16 Pro,OS=18.2"],
enableCodeCoverage: true
),
context: context
)
print("Passed: \(result.passCount), Failed: \(result.failCount), Skipped: \(result.skipCount)")
// Android
let result = try await TestAction().run(
with: .init(kind: .unit, scope: .module, module: "app"),
context: androidContext
)
print("Passed: \(result.passCount), Failed: \(result.failCount)")What category of test is being run.
This drives whether ShipIt needs to orchestrate devices before executing.
unit: JVM/host tests — no device needed.instrumented: Tests requiring the Android framework (emulator or physical device).e2e: Full user-journey tests via an external tool (Maestro, Detox, etc.) — reserved for future use.
Topics
Enumeration Cases
Initializers
Default Implementations
Relationships
Conforms To
Swift.CaseIterableSwift.DecodableSwift.EncodableSwift.EquatableSwift.HashableSwift.RawRepresentableSwift.SendableSwift.SendableMetatype