Chapter 5. Validating your OpenStack cloud with the Integration Test Suite (tempest)
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 An OpenStack environment that contains the Integration Test Suite packages. For more information, see Installing the Integration Test Suite with director . An Integration Test Suite configuration that corresponds to your OpenStack environment. For more information, see Creating a workspace . 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: 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: 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: 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: 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: Run the tests in parallel (default): Use the --concurrency or -c option to specify the number of workers to use when you run tests in parallel: 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: For example, use the following example command to run all tests that have names that begin with 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 run -l tempest run --smoke tempest run -w <whitelist_file> tempest run -b <blacklist_file> tempest run --serial tempest run --parallel tempest run --concurrency <workers> tempest run --regex <regex> tempest run --regex ^tempest.scenario tempest cleanup --delete-tempest-conf-objects