XcTestRunner class
Builds, starts and drives glint's XCUITest runner on one simulator.
Constructors
- XcTestRunner({required String udid, required String projectPath, required String cacheDir, int? port, RunnerHttp? http})
Properties
-
buildWarnings
→ List<
String> -
Problems met while building that did not stop it, for the attach reply.
final
- cacheDir → String
-
Holds the build (per Xcode version) and the runner's log.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- identity → String
-
The stamp the runner was started with: its sources and the Xcode its build is keyed to.
latefinal
- port → int
-
final
- projectPath → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- udid → String
-
final
Methods
-
build(
{void onPhase(String phase)?}) → Future< String> - The runner's .xctestrun, building it first when this Xcode has none for these sources; one build per source stamp at a time, across simulators and glint processes, and a caller that joins one running hears its phases too.
-
buildDirFor(
String stamp) → String - A build per runner source stamp, so another glint version's runner is never rebuilt over this one.
-
call(
String method, String path, {Map< String, Object?> ? body, Duration timeout = const Duration(seconds: 30)}) → Future<Map< String, Object?> > -
Calls
pathon the runner withintimeout; throws XcTestRunnerError with the runner's own reason on failure. A slow call only makes the runner suspect: the next call first waits for it to answer, and replaces it only if it stays silent, is stopped or is gone. -
ensureStarted(
{void onPhase(String phase)?, Duration timeout = const Duration(seconds: 180)}) → Future< void> -
Reuses a runner already answering from these same sources, else builds (once per Xcode) and starts one;
onPhasenames each slow step. -
frontmost(
List< String> bundleIds) → Future<String?> -
The first of
bundleIdsthat is in the foreground, or null when none is. -
isCurrent(
) → Future< bool> - Whether a runner answering on port speaks this protocol and was started from these sources on this Xcode.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
screenPoints(
) → Future< ({double h, double w})?> - The screen size in points, or null when the runner does not say.
-
sourcesStamp(
) → String - A hash of the runner's Swift sources, so a glint update with a changed runner rebuilds it.
-
stop(
) → Future< void> - Asks the runner to finish its test, then ends the xcodebuild process glint started.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
Constants
- buildCeiling → const Duration
- The longest a runner build may run before its xcodebuild is stopped.
- runnerPurpose → const String
- The registry purpose of the runner's xcodebuild.