logical_grouping.qbk 1.6 KB

1234567891011121314151617181920212223242526272829303132
  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. [section:tests_grouping Grouping tests into logical units by labels]
  8. Test-suites and test cases define a hierarchy called the /test tree/, which is useful for organizing tests. These
  9. organization defines an implicit grouping of test unit following the /subtrees/ extracted from the test tree, by just
  10. designing a node on the test tree. Being able to design a group of tests enable, for instance, to execute this group of
  11. test only (covered in [link boost_test.runtime_config.test_unit_filtering this section]).
  12. However, the subtrees might not reflect all the possible grouping of test units the usage of the test module would
  13. require [footnote For instance, selecting two siblings without the parent node].
  14. The __UTF__ provides a flexible way of grouping test units by the use of /labels/, using the decorator
  15. __decorator_label__. It is possible to associate more than one label with a test unit.
  16. Labels can be associated to test cases and test suites. For the latter, the label is inherited by all the nodes in the
  17. subtree defined by the labelled test suite: decorating a test suite with label `L` is equivalent to decorating every test
  18. unit inside with `L`.
  19. [tip it is possible to list all labels of a test module from the CLI by using the
  20. [link boost_test.utf_reference.rt_param_reference.list_labels `--list_labels`] switch
  21. ]
  22. [bt_example decorator_04..decorator label..run-fail]
  23. [endsect]