mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-07 16:59:34 +08:00
add each parameter selection strategy.
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jinzhu/copier"
|
"github.com/jinzhu/copier"
|
||||||
|
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
|
|
||||||
"github.com/httprunner/hrp/internal/boomer"
|
"github.com/httprunner/hrp/internal/boomer"
|
||||||
|
|||||||
@@ -105,8 +105,8 @@ func (r *hrpRunner) Run(testcases ...ITestCase) error {
|
|||||||
log.Error().Interface("parameters", cfg.Parameters).Err(err).Msg("parse config parameters failed")
|
log.Error().Interface("parameters", cfg.Parameters).Err(err).Msg("parse config parameters failed")
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
// 在runner模式下,指定整体策略,cfg.ParametersSetting.Iterators仅包含一个CartesianProduct的迭代器
|
||||||
for it := cfg.ParametersSetting.Iterators[0]; it.HasNext(); {
|
for it := cfg.ParametersSetting.Iterators[0]; it.HasNext(); {
|
||||||
// iterate through all parameter iterators and update case variables
|
|
||||||
// iterate through all parameter iterators and update case variables
|
// iterate through all parameter iterators and update case variables
|
||||||
for _, it := range cfg.ParametersSetting.Iterators {
|
for _, it := range cfg.ParametersSetting.Iterators {
|
||||||
if it.HasNext() {
|
if it.HasNext() {
|
||||||
|
|||||||
Reference in New Issue
Block a user