Tempest

Tempest - openstack tests

Installation:

setting up the virtual env

virtualenv t
cd t
. bin activate

The tempest versions are defined as (13.0.0, 14.0.0,.... 17.0.0 etc). checkout the required version

installing tempest in virtual env

git clone https://github.com/openstack/tempest
cd tempest
git checkout 13.0.0
pip install .

Now you have get the tempest executable.

Example:

$ tempest --version
tempest 13.0.0

Intialization:

Initizalize the directory with default config files.

tempest init c1

Here: c1 name of the cloud directory. it will initialize with etc folder (for config files) and logs directory.

(t13) cloud@devstack1:~/t13/c1$ ls -lrt
total 12
drwxrwxr-x 2 cloud cloud 4096 Dec 13 05:23 tempest_lock
drwxrwxr-x 2 cloud cloud 4096 Dec 13 05:23 etc
drwxrwxr-x 2 cloud cloud 4096 Dec 13 05:23 logs

List the available tests:

Note: Execute from inside the folder

cd c1
tempest run --list-tests

Configuration file:

We should create/update three configuration files.

  1. tempest.conf
  2. accounts.yaml
  3. whilelist.txt

accounts.yaml consists of the account(openstack creds) details.

Example:

$ cat accounts.yaml 
- username: 'demo'
  user_id: 'f4a3fbe4da734f6dbb90fb43a57ef1e0'
  tenant_id: 'b8f411226c73486abcc80eaa59308623'
  tenant_name: 'demo'
  password: 'openstack123'
  roles:
    - 'Member'

whitelist.txt file - It consists of the tests to be executed. If we dont have all the tests(default - 1000+) will be executed.

Example:

$ cat whitelist.txt 
tempest.api.compute.keypairs.test_keypairs.KeyPairsV2TestJSON.test_keypairs_create_list_delete

Note: The test name can be get from tempest run --list-tests output.

tempest.conf - tempest configuration files, consists of openstack attributes/config to be used, for ex keystone api version(either v2 or V3), public netowrk details, image details etc.

Take a copy from github and modify it.

https://github.com/sureshkvl/tempest-cfg

Test Execution:

tempest run --whitelist-file etc/whitelist.txt

References:

https://www.symantec.com/connect/blogs/how-configure-and-run-tempest-testing-openstack-keystone-identity-v3-api

results matching ""

    No results matching ""