public class TestStep
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
TestStep.TestStepBuilder |
Modifier and Type | Field and Description |
---|---|
static java.util.function.Predicate<TestStep> |
COMPROMISED_TESTSTEPS |
static java.util.function.Predicate<TestStep> |
ERROR_TESTSTEPS |
static java.util.function.Predicate<TestStep> |
FAILING_TESTSTEPS |
static java.util.function.Predicate<TestStep> |
IGNORED_TESTSTEPS |
static TestStep |
NO_STEP |
static java.util.function.Predicate<TestStep> |
SKIPPED_TESTSTEPS |
static java.util.function.Predicate<TestStep> |
SUCCESSFUL_TESTSTEPS |
Constructor and Description |
---|
TestStep() |
TestStep(org.joda.time.DateTime startTime,
java.lang.String description)
Deprecated.
|
TestStep(java.lang.String description) |
TestStep(java.time.ZonedDateTime startTime,
java.lang.String description) |
Modifier and Type | Method and Description |
---|---|
TestStep |
addChildStep(TestStep step) |
TestStep |
addScreenshot(ScreenshotAndHtmlSource screenshotAndHtmlSource) |
void |
clearException() |
TestStep |
clone() |
boolean |
equals(java.lang.Object o) |
void |
failedWith(java.lang.Throwable cause)
Indicate that this step failed with a given error.
|
static TestStep.TestStepBuilder |
forStepCalled(java.lang.String description) |
java.util.List<ScreenshotAndHtmlSource> |
getAllScreenshots() |
java.util.List<TestStep> |
getChildren() |
java.lang.String |
getConciseErrorMessage() |
java.lang.String |
getDescription() |
long |
getDuration() |
double |
getDurationInSeconds() |
Screenshot |
getEarliestScreenshot() |
java.lang.String |
getError() |
java.lang.String |
getErrorMessage() |
FailureCause |
getException() |
ScreenshotAndHtmlSource |
getFirstScreenshot() |
java.util.List<? extends TestStep> |
getFlattenedSteps() |
ScreenshotAndHtmlSource |
getLastScreenshot() |
Screenshot |
getLatestScreenshot() |
java.util.Collection<? extends TestStep> |
getLeafTestSteps() |
int |
getLevel() |
FailureCause |
getNestedException() |
int |
getNumber() |
java.util.List<Screenshot> |
getRenderedScreenshots()
Returns rendered screenshots of this step and of child steps, in order of appearance,
and starting with the earliet screenshot overall with the name of this step.
|
java.util.List<ReportData> |
getReportData() |
java.util.List<ReportData> |
getReportEvidence() |
RestQuery |
getRestQuery() |
TestResult |
getResult() |
int |
getScreenshotCount() |
java.util.List<ScreenshotAndHtmlSource> |
getScreenshots() |
java.lang.String |
getShortErrorMessage() |
java.time.ZonedDateTime |
getStartTime() |
java.util.List<Screenshot> |
getTopLevelScreenshots() |
boolean |
hasChildren() |
boolean |
hasData() |
int |
hashCode() |
boolean |
hasMultipleScreenshots() |
boolean |
hasNestedErrors() |
boolean |
hasRestQuery() |
boolean |
hasScreenshots() |
boolean |
isAGroup() |
boolean |
isAPrecondition() |
java.lang.Boolean |
isCompromised() |
java.lang.Boolean |
isError() |
java.lang.Boolean |
isFailure() |
java.lang.Boolean |
isIgnored() |
java.lang.Boolean |
isPending() |
java.lang.Boolean |
isSkipped() |
java.lang.Boolean |
isSuccessful() |
boolean |
needsScreenshots() |
void |
recordDuration() |
TestStep |
recordReportData(ReportData reportData) |
void |
recordRestQuery(RestQuery restQuery) |
void |
removeScreenshot(int index) |
Screenshot |
renderedScreenshotOf(ScreenshotAndHtmlSource from,
int level) |
int |
renumberFrom(int count) |
void |
setDescription(java.lang.String description) |
void |
setDuration(long duration) |
void |
setPrecondition(boolean precondition) |
void |
setResult(TestResult result)
Each test step has a result, indicating the outcome of this step.
|
TestStep |
startingAt(java.time.ZonedDateTime time) |
void |
testAborted(java.lang.Throwable exception)
The test has been aborted (marked as pending or ignored) for a reason described in the exception.
|
java.lang.String |
toString() |
TestStep |
unrendered() |
void |
updateOverallResult() |
TestStep |
withReportData(ReportData reportData) |
public static final TestStep NO_STEP
public static final java.util.function.Predicate<TestStep> IGNORED_TESTSTEPS
public static final java.util.function.Predicate<TestStep> COMPROMISED_TESTSTEPS
public static final java.util.function.Predicate<TestStep> SUCCESSFUL_TESTSTEPS
public static final java.util.function.Predicate<TestStep> FAILING_TESTSTEPS
public static final java.util.function.Predicate<TestStep> ERROR_TESTSTEPS
public static final java.util.function.Predicate<TestStep> SKIPPED_TESTSTEPS
public TestStep()
public TestStep(java.lang.String description)
public TestStep(java.time.ZonedDateTime startTime, java.lang.String description)
@Deprecated public TestStep(org.joda.time.DateTime startTime, java.lang.String description)
public static TestStep.TestStepBuilder forStepCalled(java.lang.String description)
public boolean hasScreenshots()
public int renumberFrom(int count)
public void recordRestQuery(RestQuery restQuery)
public void updateOverallResult()
public void setPrecondition(boolean precondition)
public java.lang.String toString()
toString
in class java.lang.Object
public TestStep startingAt(java.time.ZonedDateTime time)
public TestStep clone()
clone
in class java.lang.Object
public void recordDuration()
public int getNumber()
public void setDescription(java.lang.String description)
public java.lang.String getDescription()
public TestStep unrendered()
public java.util.List<TestStep> getChildren()
public java.util.List<ScreenshotAndHtmlSource> getScreenshots()
public java.util.List<ScreenshotAndHtmlSource> getAllScreenshots()
public java.util.List<Screenshot> getRenderedScreenshots()
public java.util.List<Screenshot> getTopLevelScreenshots()
public Screenshot renderedScreenshotOf(ScreenshotAndHtmlSource from, int level)
public boolean hasRestQuery()
public boolean hasData()
public RestQuery getRestQuery()
public int getLevel()
public java.util.List<ReportData> getReportEvidence()
public java.util.List<ReportData> getReportData()
public ScreenshotAndHtmlSource getFirstScreenshot()
public Screenshot getEarliestScreenshot()
public Screenshot getLatestScreenshot()
public ScreenshotAndHtmlSource getLastScreenshot()
public boolean needsScreenshots()
public void setResult(TestResult result)
result
- The test outcome associated with this step.public TestResult getResult()
public java.lang.Boolean isSuccessful()
public java.lang.Boolean isFailure()
public java.lang.Boolean isError()
public java.lang.Boolean isCompromised()
public java.lang.Boolean isIgnored()
public java.lang.Boolean isSkipped()
public java.lang.Boolean isPending()
public boolean isAPrecondition()
public void setDuration(long duration)
public long getDuration()
public double getDurationInSeconds()
public void failedWith(java.lang.Throwable cause)
cause
- why the test failed.public java.lang.String getError()
public java.lang.String getErrorMessage()
public java.lang.String getConciseErrorMessage()
public void testAborted(java.lang.Throwable exception)
public java.lang.String getShortErrorMessage()
public FailureCause getException()
public void clearException()
public FailureCause getNestedException()
public java.util.List<? extends TestStep> getFlattenedSteps()
public boolean isAGroup()
public boolean hasNestedErrors()
public boolean hasChildren()
public boolean hasMultipleScreenshots()
public java.util.Collection<? extends TestStep> getLeafTestSteps()
public TestStep addScreenshot(ScreenshotAndHtmlSource screenshotAndHtmlSource)
public java.time.ZonedDateTime getStartTime()
public int getScreenshotCount()
public void removeScreenshot(int index)
public TestStep withReportData(ReportData reportData)
public TestStep recordReportData(ReportData reportData)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object