mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-08 07:51:25 +08:00
refactor: IStep interface
This commit is contained in:
12
extract.go
12
extract.go
@@ -1,5 +1,7 @@
|
||||
package httpboomer
|
||||
|
||||
import "fmt"
|
||||
|
||||
// implements IStep interface
|
||||
type stepRequestExtraction struct {
|
||||
runner *Runner
|
||||
@@ -13,12 +15,16 @@ func (s *stepRequestExtraction) WithJmesPath(jmesPath string, varName string) *s
|
||||
|
||||
func (s *stepRequestExtraction) Validate() *stepRequestValidation {
|
||||
return &stepRequestValidation{
|
||||
TStep: s.step,
|
||||
step: s.step,
|
||||
}
|
||||
}
|
||||
|
||||
func (s *stepRequestExtraction) ToStruct() *TStep {
|
||||
return s.step
|
||||
func (s *stepRequestExtraction) Name() string {
|
||||
return s.step.Name
|
||||
}
|
||||
|
||||
func (s *stepRequestExtraction) Type() string {
|
||||
return fmt.Sprintf("request-%v", s.step.Request.Method)
|
||||
}
|
||||
|
||||
func (s *stepRequestExtraction) Run() error {
|
||||
|
||||
Reference in New Issue
Block a user