mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-02 22:39:42 +08:00
refactor: post data with body
This commit is contained in:
@@ -39,7 +39,7 @@ var demoTestCase = &TestCase{
|
||||
AssertEqual("body.args.foo2", "34.5", "check args foo2"), // notice: request params value will be converted to string
|
||||
Step("post json data").
|
||||
POST("/post").
|
||||
WithJSON(map[string]interface{}{
|
||||
WithBody(map[string]interface{}{
|
||||
"foo1": "$varFoo1", // reference former extracted variable
|
||||
"foo2": "${max($a, $b)}", // 12.3; step level variables are independent, variable b is 3.45 here
|
||||
}).
|
||||
|
||||
Reference in New Issue
Block a user