Documentation ¶
Index ¶
- func GetToken(t Token, print bool) string
- type Coverage
- type Criteria
- type Dependency
- type DependencyInfo
- type DependencyItem
- type DependencyPost
- type DependencyPostItem
- type DependencySource
- type HsuanFuzz
- type InputCriteria
- type OutputCriteria
- type PathInfo
- type PathInfoMethod
- type PathInfoParameter
- type ResponseInfo
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Coverage ¶
type Coverage struct {
Levels []int
}
Coverage records the test coverage level of each path.
type Criteria ¶
type Criteria struct { Input InputCriteria Output OutputCriteria }
Criteria is used to verify the test coverage model.
type Dependency ¶
type Dependency struct { Count int `yaml:"count"` Paths map[string]*DependencyInfo `yaml:"paths"` Posts map[string]*DependencyPost `yaml:"posts"` }
Dependency is used to manually enter the dependency of the path.
type DependencyInfo ¶
type DependencyInfo struct {
Items []*DependencyItem `yaml:"items"`
}
DependencyInfo presents the dependency of the path.
type DependencyItem ¶
type DependencyItem struct { Key string `yaml:"key"` Source *DependencySource `yaml:"source"` }
DependencyItem presents the ID and source required by the current path.
type DependencyPost ¶
type DependencyPost struct {
Flows []*DependencyPostItem `yaml:"flows"`
}
DependencyPost is used to define test coverage level 7.
type DependencyPostItem ¶
DependencyPostItem presents the required request method and path.
type DependencySource ¶
DependencySource presents the source path and the ID field of the response.
type HsuanFuzz ¶
type HsuanFuzz struct { Token Token // contains filtered or unexported fields }
HsuanFuzz is the main structure of fuzzer.
func (*HsuanFuzz) SendRequest ¶
func (x *HsuanFuzz) SendRequest(node *base.Node, decode bool) *ResponseInfo
SendRequest uses our grammar to send the request.
type InputCriteria ¶
InputCriteria is used to verify the input of the test coverage model.
type OutputCriteria ¶
type OutputCriteria struct { Types map[string]int CodeClasses map[int]int Codes map[int]int Properties map[string]int }
OutputCriteria is used to verify the output of the test coverage model.
type PathInfo ¶
type PathInfo struct {
Paths map[string]*PathInfoMethod `yaml:"paths"`
}
PathInfo is used to display request information more easily.
type PathInfoMethod ¶
type PathInfoMethod struct {
Method map[string][]*PathInfoParameter `yaml:"methods"`
}
PathInfoMethod presents methods of the path.
type PathInfoParameter ¶
type PathInfoParameter struct { Name string `yaml:"name,omitempty"` In string `yaml:"in,omitempty"` Value interface{} `yaml:"value"` }
PathInfoParameter presents parameters of the path.
type ResponseInfo ¶
type ResponseInfo struct { Code int Type string Body string // contains filtered or unexported fields }
ResponseInfo is used to carry request and response information.
type Token ¶
type Token struct { URL string `yaml:"url"` Method string `yaml:"method"` Key string `yaml:"key"` Bearer string `yaml:"bearer"` // is empty when initial ContentType string `yaml:"type"` Body interface{} `yaml:"body"` Hardcode bool `yaml:"hardcode"` In string `yaml:"in"` }
Token is used to manually enter service authorization information.