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
Marconi System Tests
The System tests treat Marconi as a black box. The API calls are made similar to how an user would make them. Unlike unit tests, the system tests do not use mock endpoints.
Running the System Tests
Setup the Marconi server, to run the tests against. Refer to the Marconi README on how to run Marconi locally. (If you are running the tests against an existing server, skip this step.)
System tests require the requests & robot packages. Run the following to install them :
pip install -r tools/system-test-requires
cd to the marconi/tests/system directory
Copy etc/system-tests.conf-sample to one of the following locations:
~/.marconi/system-tests.conf /etc/marconi/system-tests.conf
Update the config file to point to the Marconi server you want to run the tests against
If keystone auth is enabled, update system-tests.conf with the credentials.
To run tests use the pybot commands,
Run all test suites :
pybot marconi/tests/system/queue/queue_tests.txt marconi/tests/system/messages/messages_tests.txt marconi/tests/system/claim/claim_tests.txt
Run a specific test suite :
pybot marconi/tests/system/queue/queue_tests.txt pybot marconi/tests/system/messages/messages_tests.txt pybot marconi/tests/system/claim/claim_tests.txt
pybot will generate report.html & log.html after the test run is complete.
To Add new tests
Add test case definition to the robot test case file (queue/queue_tests.txt, messages/messages_tests.txt, claim/claim_tests.txt) See here for more details on writing test cases.
Add test data to the test_data.csv in the same directory as the test case file you updated above (eg. queue/test_data.csv)
Add any validation logic you might need, to one of the following:
- corresponing *fnlib.py (eg. queue/queuefnlib.py)
- common/functionlib.py (If the code can be used across multiple test suites)