locusts support weight feature

This commit is contained in:
debugtalk
2018-10-29 20:49:24 +08:00
parent aed7013b1d
commit 2d5ff04b46
10 changed files with 133 additions and 50 deletions

View File

@@ -0,0 +1,34 @@
- 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"]