Documentation
¶
Overview ¶
Package iostest is the harness of the iOS Simulator tests (SPEC §30.11): it keeps a device set of its own in `.ios-test/devices` at the root of the module (git-ignored, made with `xcrun simctl --set`), makes an iPhone and an iPad of the newest installed runtime on first use, boots them, installs and launches apps, reads their console and screenshots, and shuts everything down when the test ends. A test that uses it carries the glutter_ios build tag and runs with `-p 1`: two tests in one Simulator at a time. It imports `testing`, so no program imports it.
Flutter: no counterpart
Index ¶
Constants ¶
const ( // TagIOSSimulatorFailed is the tag of the error for a Simulator command of the harness that cannot run, a device that cannot be made // or booted, or an app that does not print what the test waits for. // // Flutter: no counterpart TagIOSSimulatorFailed = "IOSSimulatorFailed" )
The tags of the errors that this file makes (rm4n0s/errors, R5).
Variables ¶
This section is empty.
Functions ¶
func ModuleRoot ¶
ModuleRoot is the directory of the module: the first directory up from the working directory that has a go.mod. It fails with IOSSimulatorFailed when there is none.
Flutter: no counterpart
Types ¶
type Harness ¶
type Harness struct {
Simctl iostool.Simctl
Runtime iostool.Runtime
// contains filtered or unexported fields
}
Harness is the Simulator of a test: the device set, the runtime and the devices it has booted. It shuts them down and stops what it launched when the test ends (tb.Cleanup).
Flutter: no counterpart
func New ¶
New makes the harness of a test: it checks Xcode and the runtime, and skips the test, with the instruction, when either is missing, as the tests of the other platforms skip without their tools. The device set is `.ios-test/devices` of the module.
Flutter: no counterpart
func (*Harness) Device ¶
Device returns the booted device of the family, "iphone" or "ipad": it makes the device the first time (named glutter-iphone or glutter-ipad) and boots it, and the test's end shuts it down. It fails with IOSSimctlFailed when the device cannot be made or booted.
Flutter: no counterpart
type Launched ¶
type Launched struct {
// contains filtered or unexported fields
}
Launched is an app that was started with its console attached.
Flutter: no counterpart
func (*Launched) Ended ¶
Ended says whether the app has ended (it exited, crashed or was terminated).
Flutter: no counterpart
func (*Launched) Stop ¶
func (l *Launched) Stop()
Stop terminates the app and the command that holds its console. It is called at the end of the test; calling it again does nothing.
Flutter: no counterpart
Directories
¶
| Path | Synopsis |
|---|---|
|
Command behaviorapp is the app of the framework-behavior tests of step 35.9: a Cupertino app that shows one thing in the mode that the environment names, and prints a line when it happens, so that the Simulator test reads it:
|
Command behaviorapp is the app of the framework-behavior tests of step 35.9: a Cupertino app that shows one thing in the mode that the environment names, and prints a line when it happens, so that the Simulator test reads it: |
|
Package behaviorlines holds the lines that the app of the framework-behavior tests (internal/iostest/behaviorapp) prints and the tests read.
|
Package behaviorlines holds the lines that the app of the framework-behavior tests (internal/iostest/behaviorapp) prints and the tests read. |
|
Command fieldapp is the app of the text input tests of step 35.5: a text field that takes the focus and prints a line with its text each time it changes, so that the Simulator test reads what the framework's field got from the text input (UITextInput) of the script.
|
Command fieldapp is the app of the text input tests of step 35.5: a text field that takes the focus and prints a line with its text each time it changes, so that the Simulator test reads what the framework's field got from the text input (UITextInput) of the script. |
|
Command hello is the app of the Simulator tests of step 35.1: it starts UIKit through package ios and prints a line when the app has launched and a line when the scene has connected, so that the test sees them in the console of the app.
|
Command hello is the app of the Simulator tests of step 35.1: it starts UIKit through package ios and prints a line when the app has launched and a line when the scene has connected, so that the test sees them in the console of the app. |
|
Package hellolines has the lines that the app of the Simulator tests prints, which the test looks for.
|
Package hellolines has the lines that the app of the Simulator tests prints, which the test looks for. |
|
Command inputapp is the app of the input tests of step 35.4: a view that takes the focus and prints a line for each tap, each pan and each key event, so that the Simulator test reads what the framework got from the touches and the keys of a script (GLUTTER_DEV_EVENTS).
|
Command inputapp is the app of the input tests of step 35.4: a view that takes the focus and prints a line for each tap, each pan and each key event, so that the Simulator test reads what the framework got from the touches and the keys of a script (GLUTTER_DEV_EVENTS). |
|
Package inputlines holds the lines that the app of the input tests (internal/iostest/inputapp) prints and the tests read, so that the two cannot drift apart.
|
Package inputlines holds the lines that the app of the input tests (internal/iostest/inputapp) prints and the tests read, so that the two cannot drift apart. |
|
Command issueapp is the app of the Simulator tests of reported issues (steps 47.1 and 50.1); it runs on iOS only.
|
Command issueapp is the app of the Simulator tests of reported issues (steps 47.1 and 50.1); it runs on iOS only. |
|
Command sceneapp is the app of the Simulator tests of step 35.2; it runs on iOS only.
|
Command sceneapp is the app of the Simulator tests of step 35.2; it runs on iOS only. |
|
Package scenelines holds the lines that the app of the scene tests (internal/iostest/sceneapp) prints and the test reads, so that the two cannot drift apart.
|
Package scenelines holds the lines that the app of the scene tests (internal/iostest/sceneapp) prints and the test reads, so that the two cannot drift apart. |
|
Package serviceslines holds the lines that the app of the services tests (internal/iostest/serviceapp) prints and the test reads, and the names of its steps, so that the two cannot drift apart.
|
Package serviceslines holds the lines that the app of the services tests (internal/iostest/serviceapp) prints and the test reads, and the names of its steps, so that the two cannot drift apart. |
|
Command spinner is the app of the Metal background test of step 35.3: a progress indicator that animates for ever, so that the app draws a frame on every tick of the display until it is sent to the background.
|
Command spinner is the app of the Metal background test of step 35.3: a progress indicator that animates for ever, so that the app draws a frame on every tick of the display until it is sent to the background. |