Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExpectedError ¶
type ExpectedError struct {
Code int `yaml:"code"` // Error code
Message string `yaml:"message,omitempty"` // Error message (optional, can be partial match)
Data interface{} `yaml:"data,omitempty"` // Error data (optional)
}
ExpectedError represents an expected JSON-RPC error
type StageSpec ¶
type StageSpec struct {
Stage string `yaml:"stage"`
Title string `yaml:"title"`
Description string `yaml:"description"`
Background string `yaml:"background"`
TestCases []TestCase `yaml:"test_cases"`
}
StageSpec represents the specification for a test stage
func LoadStageSpec ¶
LoadStageSpec loads a stage specification from a YAML file
type TestCase ¶
type TestCase struct {
Slug string `yaml:"slug"`
TesterLogPrefix string `yaml:"tester_log_prefix"`
Title string `yaml:"title"`
Description string `yaml:"description"`
Hint string `yaml:"hint"`
Tags []string `yaml:"tags"`
Steps []TestStep `yaml:"steps"`
Summary []string `yaml:"summary,omitempty"`
}
TestCase represents a single test case with multiple steps
type TestStep ¶
type TestStep struct {
// JSON-RPC request
Method string `yaml:"method"` // JSON-RPC method name (e.g., "init", "check")
Params map[string]interface{} `yaml:"params,omitempty"` // JSON-RPC params (optional)
// Expected response
Expected interface{} `yaml:"expected"` // Expected result (can be object, string, number, etc.)
ExpectError *ExpectedError `yaml:"expect_error,omitempty"` // Expected JSON-RPC error (optional)
// Metadata
Description string `yaml:"description"` // Human-readable description
Delay int `yaml:"delay,omitempty"` // Delay in milliseconds before this step (optional)
}
TestStep represents a single test step (JSON-RPC request + expected response)
Click to show internal directories.
Click to hide internal directories.