diff --git a/README.rst b/README.rst index b16761478..7d3b5cc54 100644 --- a/README.rst +++ b/README.rst @@ -1,33 +1,36 @@ -**Marconi - Queue and Notification service for OpenStack** +Marconi +======= -*Steps to run Marconi server locally with MongoDB* +Message queuing service for OpenStack -1. `Install mongodb`_ locally -2. Start your local MongoDB instance:: +Running a local Marconi server with MongoDB +------------------------------------------- - mongod +1. `Install MongoDB`_ +2. Start a MongoDB instance:: + + mongod 3. Clone the Marconi repo:: - git clone https://github.com/stackforge/marconi.git + git clone https://github.com/stackforge/marconi.git 4. cd to your local copy of the repo -5. Copy the Marconi config files to the directory ~/.marconi:: +5. Copy the Marconi config files to the directory **~/.marconi**:: - cp -r marconi/etc/*.conf-sample ~/.marconi -6. Update the [drivers:storage:mongodb] section in ~/.marconi/marconi.conf + cp -r marconi/etc/*.conf-sample ~/.marconi - 6a. Comment out the uri pointing to replicaset:: +6. Find the ``[drivers:storage:mongodb]`` section in **~/.marconi/marconi.conf** and modify the URI to point to your local mongod instance:: - ;uri = mongodb://db1.example.net,db2.example.net:2500/?replicaSet=test&ssl=true&w=majority - 6b. Add a new line with uri pointing to the local mongoDB instance:: + uri = mongodb://localhost - uri = mongodb://localhost -7. Run the following command:: +7. Run the following so you can see the results of any changes you make to the code, without having to reinstall the package each time:: + + python setup.py develop - python setup.py develop 8. Start the marconi server:: - marconi-server + marconi-server + .. _`Install mongodb` : http://docs.mongodb.org/manual/installation/ \ No newline at end of file diff --git a/marconi/tests/system/README.rst b/marconi/tests/system/README.rst index 2c19ebed2..1bde6cc0e 100644 --- a/marconi/tests/system/README.rst +++ b/marconi/tests/system/README.rst @@ -1,63 +1,77 @@ -**Marconi System Tests** +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. +Marconi's system tests treat Marconi as a black box. In other +words, the API calls attempt to simulate an actual user. For +example, unlike unit tests, the system tests do not use mock +endpoints. -**Running the System Tests** -1. 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.) +Running the System Tests +------------------------ -2. System tests require the `requests`_ & `robot`_ packages. Run the following to install them :: +#. Setup a Marconi server. Refer to the Marconi `README`_ on + how to run Marconi locally, or simply use an existing server. + +#. System tests require the `requests`_ & `robot`_ packages. Run + the following to install them: :: pip install -r tools/system-test-requires -3. cd to the marconi/tests/system directory +#. cd to the marconi/tests/system directory -4. Copy etc/system-tests.conf-sample to one of the following locations:: +#. Copy etc/system-tests.conf-sample to one of the following locations:: ~/.marconi/system-tests.conf /etc/marconi/system-tests.conf -5. Update the config file to point to the Marconi server you want to run the tests against +#. Update the config file to point to the Marconi server you want to run + the tests against -6. If keystone auth is enabled, update system-tests.conf with the credentials. +#. If leaving keystone auth enabled, update system-tests.conf with a + valid set of credentials. -7. To run tests use the pybot commands, +#. Now, to run the sytem tests, simply use the pybot commands, e.g.: - Run all test suites :: + 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 + pybot queue/queue_tests.txt messages/messages_tests.txt claim/claim_tests.txt - Run a specific test suite :: + Run test suites individually: :: - pybot marconi/tests/system/queue/queue_tests.txt + pybot queue/queue_tests.txt + pybot messages/messages_tests.txt + pybot claim/claim_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. + Note: pybot will generate ``report.html`` & ``log.html`` after the + test run is complete. -**To Add new tests** +Adding New Tests +---------------- + +*See also the Robot* `user guide`_ *for more details on writing test cases.* + +#. Add a test case definition to an appropriate robot test case file: :: + + queue/queue_tests.txt + messages/messages_tests.txt + claim/claim_tests.txt). + +#. 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 the following utility modules: + + * corresponing \*fnlib.py (e.g. queue/queuefnlib.py) + * common/functionlib.py (i.e., if the code can be used + across multiple test suites) -1. 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. - -2. 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) - -3. 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) .. _README : https://github.com/stackforge/marconi/blob/master/README.rst .. _requests : https://pypi.python.org/pypi/requests .. _robot : https://pypi.python.org/pypi/robotframework -.. _here : http://robotframework.googlecode.com/hg/doc/userguide/RobotFrameworkUserGuide.html?r=2.7.7#creating-test-cases +.. _user guide : http://robotframework.googlecode.com/hg/doc/userguide/RobotFrameworkUserGuide.html?r=#.7.7#creating-test-cases