feat: data-driven.

This commit is contained in:
徐聪
2022-01-04 20:34:43 +08:00
parent 42b2e7d91e
commit 380f70bb1a
6 changed files with 98 additions and 67 deletions

View File

@@ -76,8 +76,10 @@ func (b *hrpBoomer) convertBoomerTask(testcase *TestCase) *boomer.Task {
if err := copier.Copy(caseConfig, cfg); err != nil {
log.Error().Err(err).Msg("copy config data failed")
}
if it := cfg.ParametersSetting.Iterator; it.HasNext() {
caseConfig.Variables = mergeVariables(it.Next(), caseConfig.Variables)
for _, it := range cfg.ParametersSetting.Iterator {
if it.HasNext() {
caseConfig.Variables = mergeVariables(it.Next(), caseConfig.Variables)
}
}
startTime := time.Now()
for index, step := range testcase.TestSteps {