mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-11 18:11:21 +08:00
fix: missing setup/teardown hooks for referenced testcase
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# NOTE: Generated By HttpRunner v3.1.0
|
||||
# NOTE: Generated By HttpRunner v3.1.2
|
||||
# FROM: request_methods/request_with_functions.yml
|
||||
|
||||
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
||||
|
||||
@@ -13,7 +13,11 @@ teststeps:
|
||||
variables:
|
||||
foo1: testcase_ref_bar1
|
||||
expect_foo1: testcase_ref_bar1
|
||||
setup_hooks:
|
||||
- ${sleep(0.1)}
|
||||
testcase: request_methods/request_with_functions.yml
|
||||
teardown_hooks:
|
||||
- ${sleep(0.2)}
|
||||
export:
|
||||
- foo3
|
||||
-
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# NOTE: Generated By HttpRunner v3.1.0
|
||||
# NOTE: Generated By HttpRunner v3.1.2
|
||||
# FROM: request_methods/request_with_testcase_reference.yml
|
||||
|
||||
import sys
|
||||
@@ -33,7 +33,9 @@ class TestCaseRequestWithTestcaseReference(HttpRunner):
|
||||
.with_variables(
|
||||
**{"foo1": "testcase_ref_bar1", "expect_foo1": "testcase_ref_bar1"}
|
||||
)
|
||||
.setup_hook("${sleep(0.1)}")
|
||||
.call(RequestWithFunctions)
|
||||
.teardown_hook("${sleep(0.2)}")
|
||||
.export(*["foo3"])
|
||||
),
|
||||
Step(
|
||||
|
||||
Reference in New Issue
Block a user