Chapter 5. Validating your OpenStack cloud with the Integration Test Suite (tempest)

You can run Integration Test Suite validations in many ways with the tempest run command. You can also combine multiple options in a single tempest run command.

5.1. Prerequisites

5.2. Listing available tests

Use the --list-tests option to list all available tests.

Procedure

  • Enter the tempest run command with either the --list-tests or -l options to get a list of available tempest tests:

    # tempest run -l

5.3. Running smoke tests

Smoke testing is a type of preliminary testing which covers only the most important functionality. Although these tests are not comprehensive, running smoke tests can save time if they do identify a problem.

Procedure

  • Enter the tempest run command with the --smoke option:

    # tempest run --smoke

5.4. Passing tests by using allowlist files

An allowlist file is a file that contains regular expressions to select tests that you want to include. If you use one or more regular expressions, specify each expression on a separate line.

Procedure

  • Enter the tempest run command with either the --whitelist-file or -w options to use an allowlist file:

    # tempest run -w <whitelist_file>

5.5. Skipping tests by using blocklist files

A blocklist file is a file that contains regular expressions to select tests that you want to exclude. If you use one or more regular expressions, specify each expression on a separate line.

Procedure

  • Enter the tempest run command with either the --blacklist-file or -b options to use a blocklist file:

    # tempest run -b <blacklist_file>

5.6. Running tests in parallel or in series

You can run tests in parallel, or in series. You can also define the number of workers that you want to use when you run parallel tests. By default, the Integration Test Suite uses one worker for each CPU available.

Choose to run the tests serially or in parallel:

  • Run the tests serially:

    # tempest run --serial
  • Run the tests in parallel (default):

    # tempest run --parallel
  • Use the --concurrency or -c option to specify the number of workers to use when you run tests in parallel:

    # tempest run --concurrency <workers>

5.7. Running specific tests

Run specific tests with the --regex option. The regular expression must be Python regular expression:

Procedure

  • Enter the following command:

    # tempest run --regex <regex>
  • For example, use the following example command to run all tests that have names that begin with tempest.scenario:

    # tempest run --regex ^tempest.scenario

5.8. Deleting Integration Test Suite objects

Enter the tempest cleanup command to delete all Integration Test Suite (tempest) resources. This command also deletes projects, but the command does not delete the administrator account:

Procedure

  • Delete the tempest resources:

    # tempest cleanup --delete-tempest-conf-objects