From 758a6c0c4266bf6ca0775b4d9f42c221e561c95e Mon Sep 17 00:00:00 2001 From: Kumar Rishabh Date: Fri, 29 Aug 2014 06:56:10 +0000 Subject: [PATCH] Add Http Request Scenario MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * (с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 Co-Authored-By: Roman Vasilets Change-Id: Id70935616c013271392219b1e642b5b87ddb4b9c --- rally-jobs/rally-mos.yaml | 11 ++++--- rally-jobs/rally.yaml | 33 ++++++++++++++++--- .../requests/check-random-request.json | 17 ++++++++++ .../requests/check-random-request.yaml | 17 ++++++++++ .../scenarios/requests/check-request.json | 17 ++++++++++ .../scenarios/requests/check-request.yaml | 12 +++++++ 6 files changed, 97 insertions(+), 10 deletions(-) create mode 100644 samples/tasks/scenarios/requests/check-random-request.json create mode 100644 samples/tasks/scenarios/requests/check-random-request.yaml create mode 100644 samples/tasks/scenarios/requests/check-request.json create mode 100644 samples/tasks/scenarios/requests/check-request.yaml diff --git a/rally-jobs/rally-mos.yaml b/rally-jobs/rally-mos.yaml index 829738cf..a0b40999 100755 --- a/rally-jobs/rally-mos.yaml +++ b/rally-jobs/rally-mos.yaml @@ -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 diff --git a/rally-jobs/rally.yaml b/rally-jobs/rally.yaml index 3a5c1855..090938f6 100755 --- a/rally-jobs/rally.yaml +++ b/rally-jobs/rally.yaml @@ -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: - diff --git a/samples/tasks/scenarios/requests/check-random-request.json b/samples/tasks/scenarios/requests/check-random-request.json new file mode 100644 index 00000000..5dcb7ead --- /dev/null +++ b/samples/tasks/scenarios/requests/check-random-request.json @@ -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 + } + } + ] +} diff --git a/samples/tasks/scenarios/requests/check-random-request.yaml b/samples/tasks/scenarios/requests/check-random-request.yaml new file mode 100644 index 00000000..6ccb826a --- /dev/null +++ b/samples/tasks/scenarios/requests/check-random-request.yaml @@ -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 diff --git a/samples/tasks/scenarios/requests/check-request.json b/samples/tasks/scenarios/requests/check-request.json new file mode 100644 index 00000000..85196c3e --- /dev/null +++ b/samples/tasks/scenarios/requests/check-request.json @@ -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 + } + } + ] +} diff --git a/samples/tasks/scenarios/requests/check-request.yaml b/samples/tasks/scenarios/requests/check-request.yaml new file mode 100644 index 00000000..7ed1c047 --- /dev/null +++ b/samples/tasks/scenarios/requests/check-request.yaml @@ -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