mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-05 07:49:37 +08:00
feat: data-driven.
This commit is contained in:
@@ -131,6 +131,9 @@ func (r *hrpRunner) runCase(testcase *TestCase) error {
|
||||
cfg := config.ToStruct()
|
||||
log.Info().Str("testcase", config.Name()).Msg("run testcase start")
|
||||
parameters := getParameters(config)
|
||||
if parameters == nil {
|
||||
parameters = []map[string]interface{}{{}}
|
||||
}
|
||||
for _, parameter := range parameters {
|
||||
cfg.Variables = mergeVariables(parameter, cfg.Variables)
|
||||
r.startTime = time.Now()
|
||||
|
||||
Reference in New Issue
Block a user