mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-16 23:47:37 +08:00
change: use NewStep to construct a new test step
This commit is contained in:
@@ -14,7 +14,7 @@ func TestCaseValidateStep(t *testing.T) {
|
||||
Verify: false,
|
||||
},
|
||||
TestSteps: []hrp.IStep{
|
||||
hrp.Step("get with params").
|
||||
hrp.NewStep("get with params").
|
||||
WithVariables(map[string]interface{}{
|
||||
"var1": "bar1",
|
||||
"agent": "HttpRunnerPlus",
|
||||
@@ -32,7 +32,7 @@ func TestCaseValidateStep(t *testing.T) {
|
||||
AssertEqual("body.args.foo1", "bar1", "check args foo1"). // assert response json body with jmespath
|
||||
AssertEqual("body.args.foo2", "bar2", "check args foo2").
|
||||
AssertEqual("body.headers.\"user-agent\"", "HttpRunnerPlus", "check header user agent"),
|
||||
hrp.Step("get with params").
|
||||
hrp.NewStep("get with params").
|
||||
WithVariables(map[string]interface{}{
|
||||
"var1": "bar1",
|
||||
"agent": "HttpRunnerPlus",
|
||||
|
||||
Reference in New Issue
Block a user