mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
refactor: use step export to export session variables from referenced testcase
This commit is contained in:
@@ -11,7 +11,7 @@ teststeps:
|
||||
variables:
|
||||
foo1: override_bar1
|
||||
testcase: request_methods/request_with_functions.yml
|
||||
extract:
|
||||
export:
|
||||
- session_foo2
|
||||
-
|
||||
name: post form data
|
||||
|
||||
@@ -26,7 +26,7 @@ class TestCaseRequestWithTestcaseReference(HttpRunner):
|
||||
RunTestCase("request with functions")
|
||||
.with_variables(**{"foo1": "override_bar1"})
|
||||
.call(RequestWithFunctions)
|
||||
.extract(*["session_foo2"])
|
||||
.export(*["session_foo2"])
|
||||
),
|
||||
Step(
|
||||
RunRequest("post form data")
|
||||
|
||||
Reference in New Issue
Block a user