TestEngine
.
TestEngine
Modifier and Type | Class and Description |
---|---|
public static enum | TestDescriptor.
Supported types for |
public static interface | TestDescriptor.
Visitor for the tree-like |
Modifier and Type | Method and Description |
---|---|
public default void | accept(TestDescriptor.
the visitorVisitor to accept; never null Accept a |
public void | addChild(TestDescriptor
the child to add to this descriptor; never descriptor)null Add a child to this descriptor. |
public static boolean | Returns: true if the descriptor is a test, contains tests, or may
later register tests dynamicallythe testDescriptor)TestDescriptor to check for tests; never
null Determine if the supplied descriptor (or any of its descendants) is a test or may potentially register tests dynamically. |
public Optional | findByUniqueId(UniqueId
the uniqueId)UniqueId to search for; never null Find the descriptor with the supplied unique ID. The search algorithm begins with this descriptor and then searches through its descendants. |
public default Set | |
public Set | Returns: the set of children of this descriptor; neithernull
nor mutable, but potentially emptyGet the immutable set of children of this descriptor. |
public default Set | |
public String | Returns: the display name for this descriptor; nevernull or blankGet the display name for this descriptor. |
public default String | Returns: the legacy reporting name; nevernull or blankGet the name of this descriptor in a format that is suitable for legacy reporting infrastructure — for example, for reporting systems built on the Ant-based XML reporting format for JUnit 4. |
public Optional | |
public Optional | |
public Set | |
public TestDescriptor. | |
public UniqueId | Returns: theUniqueId for this descriptor; never null Get the unique identifier (UID) for this descriptor. |
public default boolean | |
public default boolean | |
public default boolean | |
public default boolean | |
public default void | |
public void | removeChild(TestDescriptor
the child to remove from this descriptor; never
descriptor)null Remove a child from this descriptor. |
public void | removeFromHierarchy()
Remove this non-root descriptor from its parent and remove all the children from this descriptor. |
public void | setParent(TestDescriptor
the new parent of this descriptor; may be parent)null .Set the parent of this descriptor. |
accept | back to summary |
---|---|
public default void accept(TestDescriptor. Accept a
|
addChild | back to summary |
---|---|
public void addChild(TestDescriptor descriptor) Add a child to this descriptor.
|
containsTests | back to summary |
---|---|
public static boolean containsTests(TestDescriptor testDescriptor) Determine if the supplied descriptor (or any of its descendants) is a test or may potentially register tests dynamically.
|
findByUniqueId | back to summary |
---|---|
public Optional Find the descriptor with the supplied unique ID. The search algorithm begins with this descriptor and then searches through its descendants.
|
getAncestors | back to summary |
---|---|
public default Set Get the immutable set of all ancestors of this descriptor. An ancestor is the parent of this descriptor or the parent of one of its parents, recursively.
|
getChildren | back to summary |
---|---|
public Set Get the immutable set of children of this descriptor.
|
getDescendants | back to summary |
---|---|
public default Set Get the immutable set of all descendants of this descriptor. A descendant is a child of this descriptor or a child of one of its children, recursively.
|
getDisplayName | back to summary |
---|---|
public String getDisplayName() Get the display name for this descriptor. A display name is a human-readable name for a test or
container that is typically used for test reporting in IDEs and build
tools. Display names may contain spaces, special characters, and emoji,
and the format may be customized by
|
getLegacyReportingName | back to summary |
---|---|
public default String getLegacyReportingName() Get the name of this descriptor in a format that is suitable for legacy reporting infrastructure — for example, for reporting systems built on the Ant-based XML reporting format for JUnit 4. The default implementation delegates to
|
getParent | back to summary |
---|---|
public Optional Get the parent of this descriptor, if available. |
getSource | back to summary |
---|---|
public Optional Get the source of the test or container described by this descriptor, if available.
|
getTags | back to summary |
---|---|
public Set Get the set of tags associated with this descriptor. |
getType | back to summary |
---|---|
public TestDescriptor. Determine the
|
getUniqueId | back to summary |
---|---|
public UniqueId getUniqueId() Get the unique identifier (UID) for this descriptor. Uniqueness must be guaranteed across an entire test plan, regardless of how many engines are used behind the scenes.
|
isContainer | back to summary |
---|---|
public default boolean isContainer() Determine if this descriptor describes a container. The default implementation delegates to |
isRoot | back to summary |
---|---|
public default boolean isRoot() Determine if this descriptor is a root descriptor. A root descriptor is a descriptor without a parent. |
isTest | back to summary |
---|---|
public default boolean isTest() Determine if this descriptor describes a test. The default implementation delegates to |
mayRegisterTests | back to summary |
---|---|
public default boolean mayRegisterTests() Determine if this descriptor may register dynamic tests during execution. The default implementation assumes tests are usually known during
discovery and thus returns |
prune | back to summary |
---|---|
public default void prune() Remove this descriptor from the hierarchy unless it is a root or contains tests. A concrete |
removeChild | back to summary |
---|---|
public void removeChild(TestDescriptor descriptor) Remove a child from this descriptor.
|
removeFromHierarchy | back to summary |
---|---|
public void removeFromHierarchy() Remove this non-root descriptor from its parent and remove all the children from this descriptor. If this method is invoked on a root descriptor,
this method must throw a |
setParent | back to summary |
---|---|
public void setParent(TestDescriptor parent) Set the parent of this descriptor.
|
TestDescriptors
.
Modifier and Type | Field and Description |
---|---|
public static final TestDescriptor. | CONTAINER
Denotes that the |
public static final TestDescriptor. | CONTAINER_AND_TEST
Denotes that the |
public static final TestDescriptor. | TEST
Denotes that the |
Access | Constructor and Description |
---|---|
private |
Modifier and Type | Method and Description |
---|---|
public boolean | |
public boolean | |
public static TestDescriptor. | |
public static TestDescriptor. |
CONTAINER | back to summary |
---|---|
public static final TestDescriptor. Denotes that the |
CONTAINER_AND_TEST | back to summary |
---|---|
public static final TestDescriptor. Denotes that the |
TEST | back to summary |
---|---|
public static final TestDescriptor. Denotes that the |
Type | back to summary |
---|---|
private Type() |
isContainer | back to summary |
---|---|
public boolean isContainer()
|
isTest | back to summary |
---|---|
public boolean isTest()
|
valueOf | back to summary |
---|---|
public static TestDescriptor. |
values | back to summary |
---|---|
public static TestDescriptor. |
TestDescriptor
structure.
TestDescriptor#accept(Visitor)
Modifier and Type | Method and Description |
---|---|
public void |
visit | back to summary |
---|---|
public void visit(TestDescriptor descriptor) Visit a
|