Ce contenu n'est pas disponible dans la langue sélectionnée.
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 Copier lienLien copié sur presse-papiers!
- 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 Copier lienLien copié sur presse-papiers!
Use the --list-tests option to list all available tests.
Procedure
Enter the
tempest runcommand with either the--list-testsor-loptions to get a list of available tempest tests:# tempest run -l
5.3. Running smoke tests Copier lienLien copié sur presse-papiers!
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 runcommand with the--whitelist-fileoption to use a whitelist file:# tempest run --smoke
5.4. Passing tests by using allowlist files Copier lienLien copié sur presse-papiers!
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 runcommand with either the--whitelist-fileor-woptions to use an allowlist file:# tempest run -w <whitelist_file>
5.5. Skipping tests by using blocklist files Copier lienLien copié sur presse-papiers!
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 runcommand with either the--blacklist-fileor-boptions to use a blocklist file:# tempest run -b <blacklist_file>
5.6. Running tests in parallel or in series Copier lienLien copié sur presse-papiers!
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 --serialRun the tests in parallel (default):
# tempest run --parallelUse the
--concurrencyor-coption to specify the number of workers to use when you run tests in parallel:# tempest run --concurrency <workers>
5.7. Running specific tests Copier lienLien copié sur presse-papiers!
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 Copier lienLien copié sur presse-papiers!
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