Documentation
¶
Overview ¶
Package qa is the QA hook of a gowt app. A build with -tags gowtqa and GOWT_QA_SOCKET in the environment makes gowt.Run listen on that socket; package qa/qatest drives the app from go test. Without the tag the app has no server and no network code: Handle does nothing.
Index ¶
Constants ¶
const ( EnvSocket = "GOWT_QA_SOCKET" // unix socket path; a QA build listens only when it is set EnvData = "GOWT_QA_DATA" // a private data directory for the app to use instead of the user's )
Environment of a QA run, set by qatest.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Args ¶
type Args struct {
// contains filtered or unexported fields
}
Args are the key-value arguments a test passes to a handler.
func NewArgs ¶
func NewArgs(raw json.RawMessage) (Args, error)
NewArgs wraps the raw JSON object a request carried; an empty or null raw is no arguments.
type Job ¶
type Job struct {
Name string `json:"name"`
Background bool `json:"background,omitempty"`
Track bool `json:"track,omitempty"`
ElapsedMS int64 `json:"elapsed_ms"`
Done int `json:"done,omitempty"`
Total int `json:"total,omitempty"`
Text string `json:"text,omitempty"`
}
Job is one running Job or Track of the app, as the "jobs" command reports it; it mirrors gowt.JobInfo.
type Node ¶
type Node struct {
ID string `json:"id,omitempty"`
Class string `json:"class"`
Text string `json:"text,omitempty"`
Enabled bool `json:"enabled"`
Visible bool `json:"visible"`
Focused bool `json:"focused,omitempty"`
Bounds [4]int `json:"bounds"` // x, y, width, height in the coordinates of its window
Checked *bool `json:"checked,omitempty"`
Selected []int `json:"selected,omitempty"`
Value string `json:"value,omitempty"`
Path string `json:"path"`
Children []Node `json:"children,omitempty"`
}
Node is one control or item in a dump; it mirrors internal/qatree.Node.
type Selector ¶
type Selector struct {
ID string `json:"id,omitempty"`
Class string `json:"class,omitempty"`
Text string `json:"text,omitempty"`
Within *Selector `json:"within,omitempty"`
}
Selector picks controls; it mirrors internal/qatree.Selector, which the client cannot import without linking the toolkit. An empty field matches anything.