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