Add Http Request Scenario
* (сheck-random-request) Add Multiple Http request scenario which takes as input a list of Requests and compares response of random picked request from the list with the expected Response. * (сheck-request) Improve flexiblity of check-response scenario and rename check-response to check-request. Co-Authored-By: kumar rishabh <shailrishabh@gmail.com> Co-Authored-By: Roman Vasilets <rvasilets@mirantis.com> Change-Id: Id70935616c013271392219b1e642b5b87ddb4b9c
This commit is contained in:
parent
4514b8f0d5
commit
758a6c0c42
@ -468,15 +468,16 @@
|
||||
failure_rate:
|
||||
max: 0
|
||||
|
||||
Requests.check_response:
|
||||
HttpRequests.check_request:
|
||||
-
|
||||
args:
|
||||
url: "http://git.openstack.org/cgit"
|
||||
response: 200
|
||||
url: "http://www.example.com"
|
||||
method: "GET"
|
||||
status_code: 200
|
||||
runner:
|
||||
type: "constant"
|
||||
times: 1
|
||||
concurrency: 1
|
||||
times: 2
|
||||
concurrency: 2
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
|
@ -1406,15 +1406,38 @@
|
||||
failure_rate:
|
||||
max: 0
|
||||
|
||||
Requests.check_response:
|
||||
HttpRequests.check_request:
|
||||
-
|
||||
args:
|
||||
url: "http://www.google.com"
|
||||
response: 200
|
||||
url: "http://www.example.com"
|
||||
method: "GET"
|
||||
status_code: 200
|
||||
runner:
|
||||
type: "constant"
|
||||
times: 5
|
||||
concurrency: 5
|
||||
times: 2
|
||||
concurrency: 2
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
|
||||
HttpRequests.check_random_request:
|
||||
-
|
||||
args:
|
||||
requests:
|
||||
-
|
||||
url: "http://www.example.com"
|
||||
method: "GET"
|
||||
-
|
||||
url: "http://www.openstack.org"
|
||||
method: "GET"
|
||||
status_code: 200
|
||||
runner:
|
||||
type: "constant"
|
||||
times: 2
|
||||
concurrency: 2
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
|
||||
NovaSecGroup.create_and_delete_secgroups:
|
||||
-
|
||||
|
17
samples/tasks/scenarios/requests/check-random-request.json
Normal file
17
samples/tasks/scenarios/requests/check-random-request.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"HttpRequests.check_random_request": [
|
||||
{
|
||||
"args": {
|
||||
"requests": [{"url": "http://www.example.com", "method": "GET",
|
||||
"status_code": 200},
|
||||
{"url": "http://www.openstack.org", "method": "GET"}],
|
||||
"status_code": 200
|
||||
},
|
||||
"runner": {
|
||||
"type": "constant",
|
||||
"times": 20,
|
||||
"concurrency": 5
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
17
samples/tasks/scenarios/requests/check-random-request.yaml
Normal file
17
samples/tasks/scenarios/requests/check-random-request.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
HttpRequests.check_random_request:
|
||||
-
|
||||
args:
|
||||
requests:
|
||||
-
|
||||
url: "http://www.example.com"
|
||||
method: "GET"
|
||||
status_code: 200
|
||||
-
|
||||
url: "http://www.openstack.org"
|
||||
method: "GET"
|
||||
status_code: 200
|
||||
runner:
|
||||
type: "constant"
|
||||
times: 20
|
||||
concurrency: 5
|
17
samples/tasks/scenarios/requests/check-request.json
Normal file
17
samples/tasks/scenarios/requests/check-request.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"HttpRequests.check_request": [
|
||||
{
|
||||
"args": {
|
||||
"url": "http://www.example.com",
|
||||
"method": "GET",
|
||||
"status_code": 200,
|
||||
"allow_redirects": false
|
||||
},
|
||||
"runner": {
|
||||
"type": "constant",
|
||||
"times": 20,
|
||||
"concurrency": 5
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
12
samples/tasks/scenarios/requests/check-request.yaml
Normal file
12
samples/tasks/scenarios/requests/check-request.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
HttpRequests.check_request:
|
||||
-
|
||||
args:
|
||||
url: "http://www.example.com"
|
||||
method: "GET"
|
||||
status_code: 200
|
||||
allow_redirects: False
|
||||
runner:
|
||||
type: "constant"
|
||||
times: 20
|
||||
concurrency: 5
|
Loading…
x
Reference in New Issue
Block a user