appium-ios-device
Version:
Appium API for dealing with iOS devices
79 lines • 3.36 kB
TypeScript
export default Xctest;
export type XCTestConfigurationProperties = {
productModuleName: string | null;
targetApplicationArguments: string[] | null;
testsToRun: string[] | null;
testsToSkip: string[] | null;
};
export type XctestOption = {
/**
* properties to override in XCTestConfiguration
*/
conf: XCTestConfigurationProperties;
/**
* key-value pairs to append in xctest app environment
*/
env: object;
};
/**
* @typedef {Object} XCTestConfigurationProperties
* @property {string?} productModuleName
* @property {string[]?} targetApplicationArguments
* @property {string[]?} testsToRun
* @property {string[]?} testsToSkip
*/
/**
* @typedef {Object} XctestOption
* @property {XCTestConfigurationProperties} conf properties to override in XCTestConfiguration
* @property {object} env key-value pairs to append in xctest app environment
*/
/**
* Allows invoking pre-installed xctest app from iOS devices. No Xcode installation is required.
* This class simulates the procedure which xcode uses to invoke xctests.
*/
export class Xctest {
/**
* @param {string} udid Device udid.
* @param {string} xctestBundleId Bundle Id of xctest app on device. The app must be installed on device.
* @param {string?} targetBundleId test target bundle id.
* @param {Partial<XctestOption>} opts addition options to specific XCTestConfiguration and app launch env
*/
constructor(udid: string, xctestBundleId: string, targetBundleId?: string | null, opts?: Partial<XctestOption>);
/** @type {import('./testmanagerd').TestmanagerdService|undefined} */
_initialControlSession: import("./testmanagerd").TestmanagerdService | undefined;
/** @type {import('./testmanagerd').TestmanagerdService|undefined} */
_execTestPlanSession: import("./testmanagerd").TestmanagerdService | undefined;
udid: string;
running: boolean;
_executing: boolean;
xctestBundleId: string;
targetBundleId: string | null;
_conf: {};
_env: any;
/**
* @param {number} majorVersion first part of iOS version 9/10/11/12/13/14/15/16
* @param {string} sessionIdentifier uuid with format: 00000000-0000-0000-0000-000000000000
*/
_launchAppRunner(majorVersion: number, sessionIdentifier: string): Promise<number>;
_instrumentService: import("./instrument").InstrumentService | undefined;
/**
* @param {XCTestConfiguration} xctestConfiguration plist contains
* @param {string} xctestPath where xctestConfiguration should be place in app sandbox.
*/
_writeConfigurationToDevice(xctestConfiguration: XCTestConfiguration, xctestPath: string): Promise<void>;
_startInitialSession(majorVersion: any): Promise<void>;
_startExecSession(sessionIdentifier: any): Promise<void>;
_notifyTestProcessId(pid: any, majorVersion: any): Promise<import("./instrument/headers").DTXMessage>;
/**
* Start xctest process. If this method has been called before and the `stop()` method has not been called,
* calling this again would return directly.
* @throws If xctest bundle id invalid or not installed.
*/
start(): Promise<void>;
/**
* Stop xctest process.
*/
stop(): void;
}
import { XCTestConfiguration } from './instrument/transformer/nskeyed';
//# sourceMappingURL=xctest.d.ts.map