]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/test/doc/test_organization/logical_grouping.qbk
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / test / doc / test_organization / logical_grouping.qbk
1 [/
2 / Copyright (c) 2003 Boost.Test contributors
3 /
4 / Distributed under the Boost Software License, Version 1.0. (See accompanying
5 / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 /]
7
8 [section:tests_grouping Grouping tests into logical units by labels]
9
10 Test-suites and test cases define a hierarchy called the /test tree/, which is useful for organizing tests. These
11 organization defines an implicit grouping of test unit following the /subtrees/ extracted from the test tree, by just
12 designing a node on the test tree. Being able to design a group of tests enable, for instance, to execute this group of
13 test only (covered in [link boost_test.runtime_config.test_unit_filtering this section]).
14
15 However, the subtrees might not reflect all the possible grouping of test units the usage of the test module would
16 require [footnote For instance, selecting two siblings without the parent node].
17
18 The __UTF__ provides a flexible way of grouping test units by the use of /labels/, using the decorator
19 __decorator_label__. It is possible to associate more than one label with a test unit.
20
21 Labels can be associated to test cases and test suites. For the latter, the label is inherited by all the nodes in the
22 subtree defined by the labelled test suite: decorating a test suite with label `L` is equivalent to decorating every test
23 unit inside with `L`.
24
25 [tip it is possible to list all labels of a test module from the CLI by using the
26 [link boost_test.utf_reference.rt_param_reference.list_labels `--list_labels`] switch
27 ]
28
29 [bt_example decorator_04..decorator label..run-fail]
30
31
32 [endsect]