mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
feat: step setup hook
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# NOTE: Generated By HttpRunner v3.0.9
|
||||
# NOTE: Generated By HttpRunner v3.0.10
|
||||
# FROM: examples/httpbin/hooks.yml
|
||||
|
||||
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
||||
@@ -11,6 +11,8 @@ class TestCaseHooks(HttpRunner):
|
||||
Step(
|
||||
RunRequest("headers")
|
||||
.with_variables(**{"a": 123})
|
||||
.setup_hook("${setup_hook_add_kwargs($request)}")
|
||||
.setup_hook("${setup_hook_remove_kwargs($request)}")
|
||||
.get("/headers")
|
||||
.validate()
|
||||
.assert_equal("status_code", 200)
|
||||
|
||||
Reference in New Issue
Block a user