public class TestStep
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TestStep.TestStepBuilder |
Constructor and Description |
---|
TestStep() |
TestStep(org.joda.time.DateTime startTime,
java.lang.String description) |
TestStep(java.lang.String description) |
Modifier and Type | Method and Description |
---|---|
TestStep |
addChildStep(TestStep step) |
TestStep |
addScreenshot(ScreenshotAndHtmlSource screenshotAndHtmlSource) |
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<TestStep> |
getChildren() |
java.lang.String |
getDescription() |
long |
getDuration() |
double |
getDurationInSeconds() |
java.lang.String |
getErrorMessage() |
FailureCause |
getException() |
ScreenshotAndHtmlSource |
getFirstScreenshot() |
java.util.List<? extends TestStep> |
getFlattenedSteps() |
java.util.Collection<? extends TestStep> |
getLeafTestSteps() |
FailureCause |
getNestedException() |
int |
getNumber() |
RestQuery |
getRestQuery() |
TestResult |
getResult() |
int |
getScreenshotCount() |
java.util.List<ScreenshotAndHtmlSource> |
getScreenshots() |
java.lang.String |
getShortErrorMessage() |
long |
getStartTime() |
boolean |
hasChildren() |
int |
hashCode() |
boolean |
hasRestQuery() |
boolean |
hasScreenshots() |
boolean |
isAGroup() |
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() |
void |
recordRestQuery(RestQuery restQuery) |
void |
removeScreenshot(int index) |
int |
renumberFrom(int count) |
void |
setDescription(java.lang.String description) |
void |
setDuration(long duration) |
void |
setResult(TestResult result)
Each test step has a result, indicating the outcome of this step.
|
TestStep |
startingAt(org.joda.time.DateTime 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() |
public TestStep()
public TestStep(java.lang.String description)
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 java.lang.String toString()
toString
in class java.lang.Object
public TestStep startingAt(org.joda.time.DateTime 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 java.util.List<TestStep> getChildren()
public java.util.List<ScreenshotAndHtmlSource> getScreenshots()
public boolean hasRestQuery()
public RestQuery getRestQuery()
public ScreenshotAndHtmlSource getFirstScreenshot()
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 isIgnored()
public java.lang.Boolean isSkipped()
public java.lang.Boolean isPending()
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 getErrorMessage()
public void testAborted(java.lang.Throwable exception)
public java.lang.String getShortErrorMessage()
public FailureCause getException()
public FailureCause getNestedException()
public java.util.List<? extends TestStep> getFlattenedSteps()
public boolean isAGroup()
public boolean hasChildren()
public java.util.Collection<? extends TestStep> getLeafTestSteps()
public TestStep addScreenshot(ScreenshotAndHtmlSource screenshotAndHtmlSource)
public long getStartTime()
public int getScreenshotCount()
public void removeScreenshot(int index)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object