A
Description
describes a test which is to be run or has been run.
Descriptions
can be atomic (a single test) or compound (containing children tests).
Descriptions
are used to provide feedback about the tests that are about to run (for example, the tree view visible in many IDEs) or tests that have been run (for example, the failures view).
Descriptions
are implemented as a single class rather than a Composite because they are entirely informational. They contain no logic aside from counting their tests.
In the past, we used the raw {@link junit.framework.TestCase}s and {@link junit.framework.TestSuite}s to display the tree of tests. This was no longer viable in JUnit 4 because atomic tests no longer have a superclass below {@link Object}. We needed a way to pass a class and name together. Description emerged from this.
@see org.junit.runner.Request
@see org.junit.runner.Runner
@since 4.0