appium-xcuitest-driver
Version:
Appium driver for iOS using XCUITest for backend
39 lines • 2.13 kB
TypeScript
import type { XCUITestDriver } from '../driver';
import type { RunXCTestResult } from './types';
import type { StringRecord } from '@appium/types';
/**
* Run a native XCTest script.
*
* Supported only on **real devices** running **iOS/tvOS 18+** with the optional **appium-ios-remotexpc**
* package installed. UI and app test types use RemoteXPC. Logic tests are not supported. This API does
* not run XCTest bundles on simulators.
*
* @param testRunnerBundleId - Test app bundle (e.g.: `io.appium.XCTesterAppUITests.xctrunner`)
* @param appUnderTestBundleId - App-under-test bundle
* @param xcTestBundleId - XCTest bundle ID
* @param args - Launch arguments to start the test with (see [reference documentation](https://developer.apple.com/documentation/xctest/xcuiapplication/1500477-launcharguments))
* @param testType - XC test type
* @param env - Environment variables passed to test
* @param timeout - Timeout (in ms) for session completion
* @returns The array of test results
* @throws {Error} Error thrown if XCTest execution fails
*/
export declare function mobileRunXCTest(this: XCUITestDriver, testRunnerBundleId: string, appUnderTestBundleId: string, xcTestBundleId: string, args?: string[], testType?: 'app' | 'ui' | 'logic', env?: StringRecord, timeout?: number): Promise<RunXCTestResult>;
/**
* Installs an XCTest bundle to the device under test.
*
* Supported only on real devices running iOS/tvOS 18+ with appium-ios-remotexpc. Use a `.app` or `.ipa`;
* bare `.xctest` bundles are not supported via RemoteXPC.
*
* @param xctestApp - Path of the XCTest app (URL or filename with extension `.app`)
*/
export declare function mobileInstallXCTestBundle(this: XCUITestDriver, xctestApp: string): Promise<void>;
/**
* List XCTest bundles that are installed on the device.
*
* Supported only on real devices running iOS/tvOS 18+ with appium-ios-remotexpc.
*
* @returns List of XCTest bundles (e.g.: `XCTesterAppUITests.XCTesterAppUITests/testLaunchPerformance`)
*/
export declare function mobileListXCTestBundles(this: XCUITestDriver): Promise<string[]>;
//# sourceMappingURL=xctest.d.ts.map