mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-21 04:22:30 +08:00
add hook feature:
1, setup_hook: call function before request 2, teardown_hook: call function after request
This commit is contained in:
@@ -230,7 +230,7 @@ class VariableBindsUnittest(ApiServerUnittest):
|
||||
|
||||
def test_exec_content_functions(self):
|
||||
test_runner = runner.Runner()
|
||||
content = "${sleep(1)}"
|
||||
content = "${teardown_hook_sleep_1_secs(1)}"
|
||||
start_time = time.time()
|
||||
test_runner.context.eval_content(content)
|
||||
end_time = time.time()
|
||||
|
||||
Reference in New Issue
Block a user