feat: data-driven.

This commit is contained in:
徐聪
2022-01-04 20:34:43 +08:00
parent 70cf171ee3
commit 6fd07a4388
6 changed files with 98 additions and 67 deletions
+4 -2
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 {