diff --git a/v2/pkg/protocols/http/http.go b/v2/pkg/protocols/http/http.go index c54ea92fb..0d354a065 100644 --- a/v2/pkg/protocols/http/http.go +++ b/v2/pkg/protocols/http/http.go @@ -109,9 +109,12 @@ func (r *Request) Compile(options *protocols.ExecuterOptions) error { // Requests returns the total number of requests the YAML rule will perform func (r *Request) Requests() int { - if len(r.Payloads) > 0 { + if r.generator != nil { payloadRequests := r.generator.NewIterator().Total() return len(r.Raw) * payloadRequests } + if len(r.Raw) > 0 { + return len(r.Raw) + } return len(r.Path) }