feat: set step loops with expression variable

This commit is contained in:
lilong.129
2025-05-14 14:49:05 +08:00
parent d145784910
commit c71ac5c3cd
5 changed files with 157 additions and 12 deletions

View File

@@ -25,6 +25,7 @@ import (
"github.com/httprunner/httprunner/v5/internal/httpstat"
"github.com/httprunner/httprunner/v5/internal/json"
"github.com/httprunner/httprunner/v5/uixt/option"
"github.com/httprunner/httprunner/v5/uixt/types"
)
type HTTPMethod string
@@ -559,7 +560,9 @@ func (s *StepRequest) HTTP2() *StepRequest {
// Loop specify running times for the current step
func (s *StepRequest) Loop(times int) *StepRequest {
s.Loops = times
s.Loops = &types.IntOrString{
IntValue: &times,
}
return s
}