mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-15 04:19:28 +08:00
Merge branch 'main' into chore/support-rich-interface-request-result-verification-mechanism
This commit is contained in:
@@ -3,6 +3,7 @@ package builtin
|
||||
import (
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
"github.com/httprunner/hrp"
|
||||
"math"
|
||||
"math/rand"
|
||||
"time"
|
||||
@@ -14,7 +15,8 @@ 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
|
||||
"parameterize": hrp.LoadFromCSV,
|
||||
"P": hrp.LoadFromCSV,
|
||||
}
|
||||
|
||||
func init() {
|
||||
@@ -45,7 +47,3 @@ 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