What Are Test Tags?
Functional tests use Avocado, which uses tags to label tests. A test can have many tags, and a tag can belong to many tests. These tags are specified in a docstring comment for each test function. For example:
def test_sample_two(self): """Another sample test. :avocado: tags=all,full_regression :avocado: tags=hw,large :avocado: tags=feature1,feature2 :avocado: tags=sample,sample_one """
How Do I use Test Tags in a PR?
The /wiki/spaces/CI/pages/1389759093 are used to specify which tests are ran for a PR. By default, all tests tagged with pr
are ran. I.e. Test-tag: pr
. To run specific tests, you should first identify which tags you need. See Feature Tags for a list of common tags. To run a specific test case, you will need to find it’s tag in the test file. There are two pragmas to specify which tags to run:
Test-tag
- Runs only the tags specified.Test-tag: pr checksum
- Runspr
tests andchecksum
tests.Test-tag: checksum
- Runs onlychecksum
tests.
Features
- Runs the default set of tags (pr
), plus the tags specified minusfull_regression
.Features: checksum
- Equivalent toTest-tag: pr checksum,-full_regression
Whether to use Test-tag
or Features
mostly depends on whether you want to include the full_regression
tests for the specified feature tag. In the future, full_regression
tests will not be excluded. Regardless, pr
tests are almost always required to be successfully ran for a PR to be merged.
List of Frequency Tags
These tags determine when a test runs. Some tests might be ran at multiple frequencies.
Avocado Tag | Description |
---|---|
| Ran for every PR. These are generally small core tests. |
| Ran once daily. These are generally less critical than |
| Ran weekly. These are generally less critical than |
| Manual tests for special purposes. These tests might: not run in CI, require special configuration, be for specific environments. |
| SOAK tests are ran manually at specified intervals. |
| Ran when deploying a new DAOS installation. |
List of Stage/Environment Tags
These tags determine where a test runs. Each test should only have one set of these tags.
Avocado Tag | Description |
---|---|
| Tests that are ran on the Small Hardware Functional Test stage |
| Tests that are ran on the Medium Hardware Functional Test stage. |
| Tests that are ran on the Large Hardware Functional Test stage. |
| Tests that are ran on the VM Functional Test stages. This tag is usually not specified explicitly. Instead, the lack of a |
List of Feature Tags
These tags group tests by common Features. This list is currently incomplete.
Avocado Tag | Description |
---|---|
| Verifies |
| Verifies |
| Verifies |
| Verifies Data Mover utilities. Additional sub-tags:
|
| Verifies |
| Verifies DAOS on a newly deployed system. |
| Verifies |
| Verifies |
| Verifies |
| Verifies |
| Verifies online and offline |
| Verifies |
| Verifies |
| Verifies |
| Verifies |