mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-19 22:39:31 +08:00
35 lines
711 B
YAML
35 lines
711 B
YAML
- config:
|
|
name: basic test with httpbin
|
|
request:
|
|
base_url: https://httpbin.org/
|
|
|
|
- test:
|
|
name: index
|
|
weight: 5
|
|
request:
|
|
url: /
|
|
method: GET
|
|
validate:
|
|
- eq: ["status_code", 200]
|
|
- contains: [content, "HTTP Request & Response Service"]
|
|
|
|
- test:
|
|
name: headers
|
|
weight: 3
|
|
request:
|
|
url: /headers
|
|
method: GET
|
|
validate:
|
|
- eq: ["status_code", 200]
|
|
- eq: [content.headers.Host, "httpbin.org"]
|
|
|
|
- test:
|
|
name: user-agent
|
|
weight: 2
|
|
request:
|
|
url: /user-agent
|
|
method: GET
|
|
validate:
|
|
- eq: ["status_code", 200]
|
|
- startswith: [content.user-agent, "python-requests"]
|