Files
zaqar/marconi/tests/system/messages/messages_tests.txt
Malini Kamalambal 0c332a8c88 Add Verification for List Queue
This patch adds more verification for List Queue API call.
It also cleans up some files, to keep the style consistent.

blueprint system-tests

Change-Id: Ieda206a98f22e7642784122b5c7b8fd45f2fd39e
2013-06-12 22:10:59 -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