zaqar/marconi/tests/system/messages/messages_tests.txt
Malini Kamalambal 5477b646cc Add System Tests
This patch adds the System level testing framework &
the initial set of tests for Marconi.This will allow
developers to run the system tests (regression suite for
Marconi system level tests), against local Marconi server.

Refer tests/system/README.rst file for details on
how to add new tests and run the existing tests.

Change-Id: I2f47e03091acc260293b19edad69ff5c83888ec3
Implements: blueprint system-tests
2013-06-03 12:39:22 -04:00

54 lines
6.1 KiB
Plaintext
Executable File

| *Setting* | *Value* |
| Documentation | Marconi - Message Test Suite |
| Library | ../common/http.py |
| Library | ../common/functionlib.py |
| Library | msgfnlib.py |
| Library | Collections |
| Variables | getdata.py |
| Force Tags | MESSAGES |
| Suite Setup | executetests | ${API_TEST_DATA[0]} | # Test Suite Setup - Creates a Queue
| Suite Teardown | executetests | ${API_TEST_DATA[7]} | # Test Suite Teardown - Deletes the queue created by setup
| *Test Case* | *Action* | *Argument* | *Argument* | *Argument* | # Comment
| 1:POST SINGLE MESSAGE | [DOCUMENTATION] | | Post single message | | #TEST CASE 1 - POST SINGLE MESSAGE
| | [Tags] | INSERT_MESSAGE | | |
| | ${reqparam}= | Create Dictionary | messagecount | ${1} | # test Setup- Specify count of messages to be posted
| | ${msgbody}= | dummygetmessagebody | ${reqparam} | | # test Setup- Get the message body to post
| | Set To Dictionary | ${API_TEST_DATA[1]} | body | ${msgbody} | # test Setup -Set the POST body
| | @{postresponse}= | executetests | ${API_TEST_DATA[1]} | | # postresponse = [httpheaders, httpresponsebody] |
| | verifypostmsg | ${postresponse[0]} | ${API_TEST_DATA[1]["body"]} | | # GET the posted message & verify metadata
| |
| 2:POST MULTIPLE MESSAGES | [DOCUMENTATION] | | Post 50 messages | | #TEST CASE 2 - POST MULTIPLE MESSAGES
| | [Tags] | INSERT_MESSAGE | | |
| | ${reqparam}= | Create Dictionary | messagecount | ${50} | # Specify count of messages to be posted
| | ${msgbody}= | dummygetmessagebody | ${reqparam} | | # Gets the message body to post
| | Set To Dictionary | ${API_TEST_DATA[2]} | body | ${msgbody} | # Set the POST body
| | @{postresponse}= | executetests | ${API_TEST_DATA[2]} | | # postresponse = [httpheaders, httpresponsebody]
#| | verifypostmsg | ${postresponse[0]} | ${API_TEST_DATA[2]["body"]} | | # GET the posted messages & verify metadata
| |
| 3:GET MESSAGES-no params | [DOCUMENTATION] | Get message with no params | | # TEST CASE 3 - GET MESSAGE WITH NO PARAMS
| | @{getresponse}= | executetests | ${API_TEST_DATA[3]} |
| | verifygetmsgs | ${10} | @{getresponse} | # Verifies that number of messages returned is <= 10
| |
| 4:GET MESSAGES-limit=5 | [DOCUMENTATION] | Get message with limit = 5 | | # TEST CASE 4 - GET MESSAGE WITH limit = 5
| | @{getresponse}= | executetests | ${API_TEST_DATA[4]} |
| | verifygetmsgs | ${5} | @{getresponse} | # Verifies that number of messages returned is <= 5
| 5:GET MESSAGES-echo=False | [DOCUMENTATION] | Get message with echo=False | | # TEST CASE 5 - GET MESSAGE WITH echo = False
| | @{getresponse}= | executetests | ${API_TEST_DATA[5]} |
| | verifygetmsgs | ${10} | @{getresponse} | # Verifies that number of messages returned is <= 10
| 6:DELETE MESSAGE | [DOCUMENTATION] | | Delete message | | #TEST CASE 6 - DELETE MESSAGE
| | [Tags] | INSERT_MESSAGE | | |
| | ${reqparam}= | Create Dictionary | messagecount | ${1} | # test Setup- Specify count of messages to be posted
| | ${msgbody}= | dummygetmessagebody | ${reqparam} | | # test Setup- Get the message body to post
| | Set To Dictionary | ${API_TEST_DATA[1]} | body | ${msgbody} | # test Setup -Set the POST body
| | @{postresponse}= | executetests | ${API_TEST_DATA[1]} | | # postresponse = [httpheaders, httpresponsebody] |
| | deletemsg | ${postresponse[0]} | | | # GET the posted message & verify metadata
| 7:POST 60 MESSAGES | [DOCUMENTATION] | POST > MAX NUMBER OF MESSAGES | | | #TEST CASE 7 - POST > 50 MESSAGES
| | ... | ALLOWED PER POST (currently 50) | | |
| | [Tags] | INSERT_MESSAGE | | |
| | ${reqparam}= | Create Dictionary | messagecount | ${60} | # test Setup- Specify count of messages to be posted
| | ${msgbody}= | dummygetmessagebody | ${reqparam} | | # test Setup- Get the message body to post
| | Set To Dictionary | ${API_TEST_DATA[6]} | body | ${msgbody} | # test Setup -Set the POST body
| | @{postresponse}= | executetests | ${API_TEST_DATA[6]} | | # postresponse = [httpheaders, httpresponsebody] |
| | verifypostmsg | ${postresponse[0]} | ${API_TEST_DATA[6]["body"]} | | # GET the posted message & verify metadata