mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-07 23:41:22 +08:00
feat: data-driven.
This commit is contained in:
@@ -14,6 +14,7 @@ var Functions = map[string]interface{}{
|
||||
"gen_random_string": genRandomString, // call with one argument
|
||||
"max": math.Max, // call with two arguments
|
||||
"md5": MD5,
|
||||
"getAppVersion": getAppVersion, // test
|
||||
}
|
||||
|
||||
func init() {
|
||||
@@ -44,3 +45,7 @@ func MD5(str string) string {
|
||||
hasher.Write([]byte(str))
|
||||
return hex.EncodeToString(hasher.Sum(nil))
|
||||
}
|
||||
|
||||
func getAppVersion() []float64 {
|
||||
return []float64{3.1, 3.3}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user