Documentation ¶
Index ¶
- Constants
- func Main(args []string, opts *Options) error
- type BaseRequest
- type DebugDestroyRequest
- type DebugPollRequest
- type DebugPollResponse
- type DebugRequest
- type DebugResponse
- type DestroySessionRequest
- type DetailRequest
- type DetailResponse
- type Event
- type GoConfig
- type HideType
- type Options
- type PollSessionRequest
- type PollSessionResult
- type RunContext
- type RunRequest
- type RunResult
- type RunStatus
- type StartSessionRequest
- type StartSessionResult
- type TestConfig
- type TestEvent
- type TestEventAction
- type TestingItem
- type TestingItemEvent
- type TestingItemKind
- type TestingItemState
Constants ¶
View Source
const ( TestingItemKind_Dir = "dir" TestingItemKind_File = "file" TestingItemKind_Case = "case" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseRequest ¶
type DebugDestroyRequest ¶ added in v1.0.38
type DebugDestroyRequest struct {
ID string `json:"id"`
}
type DebugPollRequest ¶ added in v1.0.38
type DebugPollRequest struct {
ID string `json:"id"`
}
type DebugPollResponse ¶ added in v1.0.38
type DebugPollResponse struct {
Events []*TestingItemEvent `json:"events"`
}
type DebugRequest ¶ added in v1.0.38
type DebugRequest struct { Item *TestingItem `json:"item"` Path []string `json:"path"` }
type DebugResponse ¶ added in v1.0.38
type DebugResponse struct {
ID string `json:"id"`
}
type DestroySessionRequest ¶ added in v1.0.38
type DestroySessionRequest struct {
ID string `json:"id"`
}
type DetailRequest ¶
type DetailRequest struct { *BaseRequest Line int `json:"line"` }
type DetailResponse ¶
type DetailResponse struct {
Content string `json:"content"`
}
type PollSessionRequest ¶
type PollSessionRequest struct {
ID string `json:"id"`
}
type PollSessionResult ¶
type PollSessionResult struct {
Events []*TestingItemEvent `json:"events"`
}
type RunContext ¶ added in v1.0.38
type RunRequest ¶
type RunRequest struct { *BaseRequest Path []string `json:"path"` Verbose bool `json:"verbose"` }
type StartSessionRequest ¶
type StartSessionRequest struct { Item *TestingItem `json:"item"` Path []string `json:"path"` Debug bool `json:"debug"` }
type StartSessionResult ¶
type StartSessionResult struct {
ID string `json:"id"`
}
type TestConfig ¶
type TestConfig struct { Go *GoConfig GoCmd string Exclude []string Env map[string]interface{} // test flags passed to go test // common usages: // -p=12 parallel programs // -parallel=12 parallel test cases within the same test // according to our test, -p is more useful than -parallel Flags []string }
func (*TestConfig) CmdEnv ¶
func (c *TestConfig) CmdEnv() []string
func (*TestConfig) GetGoCmd ¶ added in v1.0.38
func (c *TestConfig) GetGoCmd() string
type TestEvent ¶
type TestEvent struct { Time time.Time // encodes as an RFC3339-format string Action TestEventAction Package string Test string Elapsed float64 // seconds Output string }
from go/cmd/test2json
type TestEventAction ¶
type TestEventAction string
see https://pkg.go.dev/cmd/test2json#hdr-Output_Format
const ( TestEventAction_Start TestEventAction = "start" TestEventAction_Run TestEventAction = "run" TestEventAction_Pass TestEventAction = "pass" TestEventAction_Pause TestEventAction = "pause" TestEventAction_Cont TestEventAction = "cont" TestEventAction_Bench TestEventAction = "bench" TestEventAction_Output TestEventAction = "output" TestEventAction_Fail TestEventAction = "fail" TestEventAction_Skip TestEventAction = "skip" )
type TestingItem ¶
type TestingItem struct { Key string `json:"key"` Name string `json:"name"` BaseCaseName string `json:"baseCaseName"` // the base case's name NameUnderPkg string `json:"nameUnderPkg"` // the name under pkg RelPath string `json:"relPath"` File string `json:"file"` Line int `json:"line"` Kind TestingItemKind `json:"kind"` Error string `json:"error"` // only if Kind==dir // indicating any file ends with _test.go // go only HasTestGoFiles bool `json:"hasTestGoFiles"` // valid for Kind==dir,file // indicating any cases belongs to this item // go only HasTestCases bool `json:"hasTestCases"` State *TestingItemState `json:"state"` Children []*TestingItem `json:"children"` }
func (*TestingItem) CloneSelf ¶ added in v1.0.41
func (c *TestingItem) CloneSelf() *TestingItem
clone excluding children
type TestingItemEvent ¶
type TestingItemKind ¶
type TestingItemKind string
func (TestingItemKind) Order ¶ added in v1.0.41
func (c TestingItemKind) Order() int
type TestingItemState ¶ added in v1.0.41
type TestingItemState struct { Selected bool `json:"selected"` Expanded bool `json:"expanded"` Status RunStatus `json:"status"` Debugging bool `json:"debugging"` Logs string `json:"logs"` HideType HideType `json:"hideType"` }
func (*TestingItemState) Clone ¶ added in v1.0.41
func (c *TestingItemState) Clone() *TestingItemState
Click to show internal directories.
Click to hide internal directories.