#### The Decision Function Overview

You can group your tests by combining multiple operations into a single test class.

A decision function is the code you write that determines if the code you are testing does what you expect. Using a single ITest object to test several functions allows the test decision functions to share code and functions.

#### The ITestCollection Class

ITestCollection is a subclass of ITest that tests a collection of ITest objects. This allows you to group related ITest subclasses together within a single test. The tests in the collection are run sequentially to determine the success or failure of the entire group. The resulting test passes if all of its subtests pass and fails otherwise. By default, the subtests are always executed in a fixed order (the order in which you add subtests). The subtests can be run in random order if you call the randomlyReorder function after adding subtests. By default, ITestCollection doesn't halt on subtest failure. It runs all the subtests by default. To change this default behavior, you need to call setHaltOnFail(true) in your setupSubtests.

#### The ITestMultiplexer Class

ITestMultiplexer is a subclass of ITest that supports the model of multiple decision functions applied to a single test target. These decision functions are invoked using test keys. You write a group of decision functions, then build a table that maps keys to functions. This helps you avoid the duplication of setup and cleanup code for the functions that share them.

Keys are case-sensitive IString objects that select the decision function to run when the test function is called. They may be used in three ways:

- A single key may be specified via setDecisionKey.
- The key kAllDecisions may be specified via setDecisionKey, with the result that all decision keys are called.
- A certain number of ITest inputs may be interpreted as keys, and those decision functions run. You must call setInputsAsKeys with the number of inputs to be used as keys.

The default behavior is to run all decisions.