Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoTestConfig ¶
type AutoTestConfig struct {
Global struct {
WorkerNum int `yaml:"worker_num"`
IgnoreTestCaseFail bool `yaml:"ignore_testcase_fail"`
Debug bool `yaml:"debug"`
RequestTimeout time.Duration `yaml:"request_timeout"`
// 重试配置
Retry struct {
MaxAttempts int `yaml:"max_attempts"`
RetryDelay time.Duration `yaml:"retry_delay"`
RetryOnStatusCodes []int `yaml:"retry_on_status_codes"`
} `yaml:"retry"`
// 并发控制
Concurrency struct {
MaxConcurrentRequests int `yaml:"max_concurrent_requests"`
RateLimitPerSecond int `yaml:"rate_limit_per_second"`
} `yaml:"concurrency"`
// 缓存配置
Cache struct {
Enabled bool `yaml:"enabled"`
TTL time.Duration `yaml:"ttl"`
MaxSize int `yaml:"max_size"`
} `yaml:"cache"`
Logger struct {
Level string `yaml:"level"`
FilePath string `yaml:"file_path"`
} `yaml:"logger"`
Report struct {
DirPath string `yaml:"dir_path"`
Formats []string `yaml:"formats"`
TemplatePath string `yaml:"template_path"`
} `yaml:"report"`
// 通知配置
Notifications struct {
Enabled bool `yaml:"enabled"`
WebhookURL string `yaml:"webhook_url"`
OnFailure bool `yaml:"on_failure"`
OnSuccess bool `yaml:"on_success"`
} `yaml:"notifications"`
} `yaml:"global"`
HttpRuleFiles []string `yaml:"http_rule_files"`
GrpcRuleFiles []string `yaml:"grpc_rule_files"`
Environments map[string]map[string]string `yaml:"environments"`
}
type RequestGrpc ¶ added in v0.0.6
type RequestHttp ¶ added in v0.0.6
type TestCaseGrpc ¶ added in v0.0.6
type TestCaseGrpc struct {
ID uint64 `yaml:"id"`
Desc string `yaml:"desc"`
// Delay for a while before executing
Delay time.Duration `yaml:"delay,omitempty"`
Request RequestGrpc `yaml:"request"`
OriginRules []map[string]any `yaml:"rules" json:"-"`
DependOnIDs []uint64 `yaml:"dependOnIDs,omitempty"`
Export *Export `yaml:"export"`
VerifyRules []rule.VerifyRuleGrpc
}
func (*TestCaseGrpc) GetID ¶ added in v0.0.6
func (t *TestCaseGrpc) GetID() uint64
type TestCaseHttp ¶ added in v0.0.6
type TestCaseHttp struct {
ID uint64 `yaml:"id"`
Desc string `yaml:"desc"`
// Delay for a while before executing
Delay time.Duration `yaml:"delay,omitempty"`
Request RequestHttp `yaml:"request"`
OriginRules []map[string]any `yaml:"rules" json:"-"`
DependOnIDs []uint64 `yaml:"dependOnIDs,omitempty"`
Export *Export `yaml:"export"`
VerifyRules []rule.VerifyRule
}
func (*TestCaseHttp) GetID ¶ added in v0.0.6
func (t *TestCaseHttp) GetID() uint64
Click to show internal directories.
Click to hide internal directories.