fix startswith endswith and unittest

Change-Id: I3e1c6fd82812d13b4e23ecd6b23c4d57170852e1
This commit is contained in:
buyuxiang
2022-02-15 17:05:39 +08:00
parent 3f5c6f7f5d
commit e6467dfc28
16 changed files with 23 additions and 96 deletions

View File

@@ -24,8 +24,9 @@ func TestCaseValidateStep(t *testing.T) {
Extract().
WithJmesPath("body.args.foo1", "varFoo1").
Validate().
AssertEqual("status_code", "$expectedStatusCode", "check status code"). // assert status code
AssertEqual("body.args.foo1", "bar1", "check args foo1"). // assert response json body with jmespath
AssertEqual("status_code", "$expectedStatusCode", "check status code"). // assert status code
AssertEqual("headers.\"Content-Type\"", "application/json; charset=utf-8", "check header Content-Type"). // assert response header, with double quotes
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.NewStep("get with params").