|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectnet.thucydides.core.model.TestOutcome
public class TestOutcome
Represents the results of a test (or "scenario") execution. This includes the narrative steps taken during the test, screenshots at each step, the results of each step, and the overall result. A test scenario can be associated with a user story using the UserStory annotation. A TestOutcome is stored as an XML file after a test is executed. When the aggregate reports are generated, the test outcome XML files are loaded into memory and processed.
| Nested Class Summary | |
|---|---|
static class |
TestOutcome.StepCountBuilder
|
| Constructor Summary | |
|---|---|
protected |
TestOutcome(long startTime,
long duration,
String title,
String methodName,
Class<?> testCase,
List<TestStep> testSteps,
Set<String> issues,
Set<String> additionalIssues,
Set<TestTag> tags,
Story userStory,
Throwable testFailureCause,
TestResult annotatedResult,
com.google.common.base.Optional<String> qualifier)
|
|
TestOutcome(String methodName)
The title is immutable once set. |
|
TestOutcome(String methodName,
Class<?> testCase)
|
protected |
TestOutcome(String methodName,
Class<?> testCase,
Story userStory)
A test outcome should relate to a particular test class or user story class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TestOutcome(String methodName)
methodName - The name of the Java method that implements this test.
public TestOutcome(String methodName,
Class<?> testCase)
protected TestOutcome(String methodName,
Class<?> testCase,
Story userStory)
methodName - The name of the Java method implementing this test, if the test is a JUnit or TestNG test (for example)testCase - The test class that contains this test method, if the test is a JUnit or TestNG testuserStory - If the test is not implemented by a Java class (e.g. an easyb story), we may just use the Story class to
represent the story in which the test is implemented.
protected TestOutcome(long startTime,
long duration,
String title,
String methodName,
Class<?> testCase,
List<TestStep> testSteps,
Set<String> issues,
Set<String> additionalIssues,
Set<TestTag> tags,
Story userStory,
Throwable testFailureCause,
TestResult annotatedResult,
com.google.common.base.Optional<String> qualifier)
| Method Detail |
|---|
public TestOutcome usingIssueTracking(IssueTracking issueTracking)
public void setEnvironmentVariables(EnvironmentVariables environmentVariables)
public EnvironmentVariables getEnvironmentVariables()
public static TestOutcome forTest(String methodName,
Class<?> testCase)
methodName - The name of the Java method implementing this test,testCase - The JUnit or TestNG test class that contains this test method
public TestOutcome withQualifier(String qualifier)
public String getMethodName()
public static TestOutcome forTestInStory(String testName,
Story story)
public static TestOutcome forTestInStory(String testName,
Class<?> testCase,
Story story)
public String toString()
toString in class Objectpublic String getTitle()
public String getTitleWithLinks()
public String getStoryTitle()
public String getReportName(ReportType type)
public String getSimpleReportName(ReportType type)
public String getReportName()
public String getScreenshotReportName()
public List<TestStep> getTestSteps()
public List<Screenshot> getScreenshots()
public List<TestStep> getFlattenedTestSteps()
public List<TestStep> getLeafTestSteps()
public TestResult getResult()
public TestOutcome recordStep(TestStep step)
step - a completed step to be added to this test outcome.
public TestOutcome withStep(TestStep step)
public TestOutcome andStep(TestStep step)
public ApplicationFeature getFeature()
public void setTitle(String title)
@Deprecated public void startGroup(String groupName)
public com.google.common.base.Optional<String> getQualifier()
public void startGroup()
public void endGroup()
public TestStep getCurrentStep()
public TestStep getLastStep()
public TestStep getCurrentGroup()
public void setUserStory(Story story)
public void setTestFailureCause(Throwable cause)
public Throwable getTestFailureCause()
public void setAnnotatedResult(TestResult annotatedResult)
public Set<String> getIssues()
public Class<?> getTestCase()
public void addIssues(List<String> issues)
public String getFormattedIssues()
public void isRelatedToIssue(String issue)
public void lastStepFailedWith(StepFailure failure)
public Set<TestTag> getTags()
public void setTags(Set<TestTag> tags)
public List<String> getIssueKeys()
public String getQualifiedMethodName()
public Integer getStepCount()
public Integer getNestedStepCount()
public Integer getSuccessCount()
public Integer getFailureCount()
public Integer getIgnoredCount()
public Integer getSkippedOrIgnoredCount()
public Integer getSkippedCount()
public Integer getPendingCount()
public Boolean isSuccess()
public Boolean isFailure()
public Boolean isPending()
public Boolean isSkipped()
public Story getUserStory()
public void recordDuration()
public void setDuration(long duration)
public Long getDuration()
public double getDurationInSeconds()
public String getVideoLink()
public String getSessionId()
public void setSessionId(String sessionId)
public Integer countTestSteps()
public void setStatistics(TestStatistics statistics)
public TestStatistics getStatistics()
public double getOverallStability()
public double getRecentStability()
public Long getRecentTestRunCount()
public int getRecentPassCount()
public int getRecentFailCount()
public int getRecentPendingCount()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||