mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
fix: save extracted variables to session variables
This commit is contained in:
@@ -57,7 +57,7 @@ class TestCaseRequestWithFunctions(HttpRunner):
|
||||
.assert_equal("status_code", 200)
|
||||
.assert_equal(
|
||||
"body.data",
|
||||
"This is expected to be sent back as part of response body: bar12-$expect_foo2-bar21.",
|
||||
"This is expected to be sent back as part of response body: bar12-$expect_foo2-bar32.",
|
||||
)
|
||||
.assert_type_match("body.json", "None")
|
||||
.assert_type_match("body.json", "NoneType")
|
||||
|
||||
@@ -47,7 +47,7 @@ teststeps:
|
||||
data: "This is expected to be sent back as part of response body: $foo1-$foo2-$foo3."
|
||||
validate:
|
||||
- eq: ["status_code", 200]
|
||||
- eq: ["body.data", "This is expected to be sent back as part of response body: bar12-$expect_foo2-bar21."]
|
||||
- eq: ["body.data", "This is expected to be sent back as part of response body: bar12-$expect_foo2-bar32."]
|
||||
- type_match: ["body.json", None]
|
||||
- type_match: ["body.json", NoneType]
|
||||
- type_match: ["body.json", null]
|
||||
|
||||
@@ -57,7 +57,7 @@ class TestCaseRequestWithFunctions(HttpRunner):
|
||||
.assert_equal("status_code", 200)
|
||||
.assert_equal(
|
||||
"body.data",
|
||||
"This is expected to be sent back as part of response body: bar12-$expect_foo2-bar21.",
|
||||
"This is expected to be sent back as part of response body: bar12-$expect_foo2-bar32.",
|
||||
)
|
||||
.assert_type_match("body.json", "None")
|
||||
.assert_type_match("body.json", "NoneType")
|
||||
|
||||
@@ -38,7 +38,7 @@ teststeps:
|
||||
data: "This is expected to be sent back as part of response body: $foo1-$foo2-$foo3."
|
||||
validate:
|
||||
- eq: ["status_code", 200]
|
||||
- eq: ["body.data", "This is expected to be sent back as part of response body: bar12-testcase_config_bar2-bar21."]
|
||||
- eq: ["body.data", "This is expected to be sent back as part of response body: bar12-testcase_config_bar2-bar32."]
|
||||
-
|
||||
name: post form data
|
||||
variables:
|
||||
|
||||
@@ -42,7 +42,7 @@ class TestCaseRequestWithVariables(HttpRunner):
|
||||
.assert_equal("status_code", 200)
|
||||
.assert_equal(
|
||||
"body.data",
|
||||
"This is expected to be sent back as part of response body: bar12-testcase_config_bar2-bar21.",
|
||||
"This is expected to be sent back as part of response body: bar12-testcase_config_bar2-bar32.",
|
||||
)
|
||||
),
|
||||
Step(
|
||||
|
||||
Reference in New Issue
Block a user