change: use NewStep to construct a new test step

This commit is contained in:
debugtalk
2021-12-07 11:11:03 +08:00
parent 5de87ac875
commit b8573c2ea9
11 changed files with 47 additions and 42 deletions

View File

@@ -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",