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:
Kumar Rishabh 2014-08-29 06:56:10 +00:00 committed by Roman Vasilets
parent 4514b8f0d5
commit 758a6c0c42
6 changed files with 97 additions and 10 deletions

View File

@ -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

View File

@ -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:
-

View 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
}
}
]
}

View 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

View 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
}
}
]
}

View 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