mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-15 20:38:44 +08:00
refactor: relocate python test files
This commit is contained in:
30
examples/data/a-b.c/1.yml
Normal file
30
examples/data/a-b.c/1.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
config:
|
||||
name: "request methods testcase with functions"
|
||||
variables:
|
||||
foo1: config_bar1
|
||||
foo2: config_bar2
|
||||
base_url: "https://postman-echo.com"
|
||||
verify: False
|
||||
|
||||
teststeps:
|
||||
-
|
||||
name: get with params
|
||||
variables:
|
||||
foo1: bar1
|
||||
sum_v: "${sum_two(1, 2)}"
|
||||
request:
|
||||
method: GET
|
||||
url: /get
|
||||
params:
|
||||
foo1: $foo1
|
||||
foo2: $foo2
|
||||
sum_v: $sum_v
|
||||
headers:
|
||||
User-Agent: HttpRunner/${get_httprunner_version()}
|
||||
extract:
|
||||
session_foo2: "body.args.foo2"
|
||||
validate:
|
||||
- eq: ["status_code", 200]
|
||||
- eq: ["body.args.foo1", "bar1"]
|
||||
- eq: ["body.args.sum_v", "3"]
|
||||
- eq: ["body.args.foo2", "config_bar2"]
|
||||
26
examples/data/a-b.c/2 3.yml
Normal file
26
examples/data/a-b.c/2 3.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
config:
|
||||
name: "reference testcase unittest for abnormal folder path"
|
||||
base_url: "https://postman-echo.com"
|
||||
verify: False
|
||||
|
||||
teststeps:
|
||||
-
|
||||
name: request with functions
|
||||
testcase: a-b.c/1.yml
|
||||
export:
|
||||
- session_foo2
|
||||
-
|
||||
name: post form data
|
||||
variables:
|
||||
foo1: bar12
|
||||
request:
|
||||
method: POST
|
||||
url: /post
|
||||
headers:
|
||||
User-Agent: HttpRunner/${get_httprunner_version()}
|
||||
Content-Type: "application/x-www-form-urlencoded"
|
||||
data: "foo1=$foo1&foo2=$session_foo2"
|
||||
validate:
|
||||
- eq: ["status_code", 200]
|
||||
- eq: ["body.form.foo1", "bar12"]
|
||||
- eq: ["body.form.foo2", "config_bar2"]
|
||||
0
examples/data/a-b.c/中文case.yml
Normal file
0
examples/data/a-b.c/中文case.yml
Normal file
Reference in New Issue
Block a user