init: move from httprunner/httprunner

This commit is contained in:
lilong.129
2025-02-05 21:32:44 +08:00
commit f4860de5ad
104 changed files with 12602 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
# NOTE: Generated By HttpRunner v4.3.5
# FROM: validate.yml
from httprunner import HttpRunner, Config, Step, RunRequest
class TestCaseValidate(HttpRunner):
config = Config("basic test with httpbin").base_url("${get_httpbin_server()}")
teststeps = [
Step(
RunRequest("validate response with json path")
.get("/get")
.with_params(**{"a": 1, "b": 2})
.validate()
.assert_equal("status_code", 200)
.assert_equal("body.args.a", "1")
.assert_equal("body.args.b", "2")
),
Step(
RunRequest("validate response with python script")
.get("/get")
.with_params(**{"a": 1, "b": 2})
.validate()
.assert_equal("status_code", 200)
),
]
if __name__ == "__main__":
TestCaseValidate().test_start()