@API(value=Experimental) public final class TestIdentifier extends java.lang.Object implements java.io.Serializable
TestPlan
.TestPlan
,
Serialized FormModifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
static TestIdentifier |
from(TestDescriptor testDescriptor)
Factory for creating a new
TestIdentifier from a TestDescriptor . |
java.lang.String |
getDisplayName()
Get the display name of the represented test or container.
|
java.util.Optional<java.lang.String> |
getParentId()
Get the unique ID of this identifier's parent, if available.
|
java.util.Optional<TestSource> |
getSource()
Get the source of the represented test
or container, if available.
|
java.util.Set<TestTag> |
getTags()
Get the set of tags associated with the represented
test or container.
|
java.lang.String |
getUniqueId()
Get the unique ID of the represented test or container.
|
int |
hashCode() |
boolean |
isContainer()
Determine if this identifier represents a container.
|
boolean |
isTest()
Determine if this identifier represents a test.
|
java.lang.String |
toString() |
@API(value=Internal) public static TestIdentifier from(TestDescriptor testDescriptor)
TestIdentifier
from a TestDescriptor
.public java.lang.String getUniqueId()
Uniqueness must be guaranteed across an entire test plan, regardless of how many engines are used behind the scenes.
null
public java.util.Optional<java.lang.String> getParentId()
An identifier without a parent is called a root.
null
though potentially emptypublic java.lang.String getDisplayName()
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 TestEngines
or potentially by end users as well. Consequently, display
names should never be parsed; rather, they should be used for display
purposes only.
null
or blankgetSource()
,
TestDescriptor.getDisplayName()
public boolean isTest()
public boolean isContainer()
public java.util.Optional<TestSource> getSource()
TestSource
public java.util.Set<TestTag> getTags()
TestTag
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object