mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
27 lines
546 B
Go
27 lines
546 B
Go
package httpboomer
|
|
|
|
// implements IStep interface
|
|
type stepRequestExtraction struct {
|
|
runner *Runner
|
|
step *TStep
|
|
}
|
|
|
|
func (s *stepRequestExtraction) WithJmesPath(jmesPath string, varName string) *stepRequestExtraction {
|
|
s.step.Extract[varName] = jmesPath
|
|
return s
|
|
}
|
|
|
|
func (s *stepRequestExtraction) Validate() *stepRequestValidation {
|
|
return &stepRequestValidation{
|
|
TStep: s.step,
|
|
}
|
|
}
|
|
|
|
func (s *stepRequestExtraction) ToStruct() *TStep {
|
|
return s.step
|
|
}
|
|
|
|
func (s *stepRequestExtraction) Run() error {
|
|
return s.runner.runStep(s.step)
|
|
}
|