이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 5. Using ostestr to Run Tempest


Ostestr is an OpenStack wrapper for the testr test runner.

  1. You can view a list of the available tests:

    $ ostestr -l
    Note

    Before running tests, you can use tempest cleanup --init-saved-state to capture the current state. This will make cleanup easier. For more information see Chapter 6, Cleaning Tempest Resources.

  2. You can run specific tests using ostestr.

    • To run just one test, use:

      ostestr --regex '(test_regex)'
    • To run multiple tests:

      ostestr --regex '(test1|test2|test3)'

5.1. Running Smoke Tests

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

To run the smoke tests:

$ ostestr --regex '(.*smoke)'

5.2. Running Specific Tests Using Whitelist Files

A whitelist file contains specific tests to include.

  1. Create a whitelist.txt file in your tempest workspace:

    $ touch whitelist.txt
  2. Append all the tests you want to run to the whitelist.txt file:

    $ cat whitelist.txt
    keystone_tempest_plugin.*
    networking_bgpvpn_tempest.tests*
  3. Run those tests using ostestr:

    $ ostestr -w <path to whitelist tests file>

5.3. Skipping Tests Using Blacklist Files

A blacklist file contains a list of tests to exclude.

  1. Create a skip_test.txt file in your tempest workspace:

    $ touch skip_test.txt
  2. Append all the tests to skip to the skip_test.txt file.

    $ cat skip_test.txt
    keystone_tempest_plugin.*
    networking_bgpvpn_tempest.tests*
  3. Run tests using ostestr:

    $ ostestr -b <path to skip test file>
  4. You can run specific tests by skipping the listed tests:

    ostestr --regex '(tempest.api.object_storage) -b <path to skip test file>

5.4. Running Tests in Parallel Concurrently, or Serially

  • Run the tests in series:

    $ ostestr --serial
  • Run the tests in parallel (this is the default):

    $ ostestr --parallel

    Specify the number of workers to use when running tests in parallel:

    $ ostestr --concurrency _<workers>_

    Alternatively:

    $ ostestr -c _<workers>_

    By default, this is set to the number of CPUs.

Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2026 Red Hat
맨 위로 이동