Difference between revisions of "Solum/Testing"
Adrian Otto (talk | contribs) (Created page with "= Solum Testing = Currently Solum depends on OpenStack Keystone, Nova, Heat, Glance, and Swift. Additional dependencies may be added in the future. We recommend using Devstac...") |
Adrian Otto (talk | contribs) (→Running Functional Tests) |
||
Line 38: | Line 38: | ||
export TEMPEST_DIR=${DEVSTACK_DIR}/tempest | export TEMPEST_DIR=${DEVSTACK_DIR}/tempest | ||
./run_tests.sh | ./run_tests.sh | ||
+ | |||
+ | == Running Unit Tests == | ||
+ | Unit tests are automatically run for Solum through our Stackforge gate jobs when new code is submitted for review in the [https://github.com/stackforge/solum git repository], and are automatically tested again prior to merge. To run tests locally in your development environment, you can use <code>tox</code> with your local version of python (example is for Python 2.6): | ||
+ | |||
+ | tox -e py26 | ||
+ | |||
+ | On CentOS 6.5, the following additional packages may be needed: | ||
+ | yum -y install openssl-devel python-devel libffi-devel python-lxml libxml2-devel libxslt-devel |
Revision as of 19:09, 25 April 2014
Contents
Solum Testing
Currently Solum depends on OpenStack Keystone, Nova, Heat, Glance, and Swift. Additional dependencies may be added in the future. We recommend using Devstack to set up Solum with its various low level services. See the Getting Started Guide for information about how to set up your Devstack environment. You can use the provided Vagrant setup, or you can configure Devstack on your own.
Tempest Setup
Solum uses the tempest functional testing framework. To manually set up tempest:
Checkout tempest code
cd ${DEVSTACK_DIR} git clone https://github.com/openstack/tempest.git
Create tempest configuration file
cd ${DEVSTACK_DIR}/tempest/etc cp tempest.conf.sample tempest.conf
Configure Tempest
Add the following text to etc/tempest.conf
[DEFAULT] debug=True use_stderr=False log_file=tempest.log [identity] tenant_name = service password = your_openstack_password username = solum uri_v3 = http://127.0.0.1:5000/v3/ uri = http://127.0.0.1:5000/v2.0/
NOTE: The uri_v3 and uri setting should correspond to where you are running your Keystone instance.
Running Functional Tests
Once you have Tempest set up, you may execute your functional tests:
cd ${DEVSTACK_DIR}/solum/functionaltests export TEMPEST_DIR=${DEVSTACK_DIR}/tempest ./run_tests.sh
Running Unit Tests
Unit tests are automatically run for Solum through our Stackforge gate jobs when new code is submitted for review in the git repository, and are automatically tested again prior to merge. To run tests locally in your development environment, you can use tox
with your local version of python (example is for Python 2.6):
tox -e py26
On CentOS 6.5, the following additional packages may be needed:
yum -y install openssl-devel python-devel libffi-devel python-lxml libxml2-devel libxslt-devel