public class TestOutcome extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TestOutcome.OptionalElements |
static class |
TestOutcome.StepCountBuilder |
class |
TestOutcome.TitleBuilder |
| Modifier | Constructor and Description |
|---|---|
protected |
TestOutcome(org.joda.time.DateTime startTime,
long duration,
String title,
String description,
String methodName,
Class<?> testCase,
List<TestStep> testSteps,
List<String> issues,
List<String> additionalIssues,
Set<TestTag> tags,
Story userStory,
FailureCause testFailureCause,
String testFailureClassname,
String testFailureMessage,
TestResult annotatedResult,
DataTable dataTable,
com.google.common.base.Optional<String> qualifier,
boolean manualTest) |
|
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.
|
public TestOutcome(String methodName)
methodName - The name of the Java method that implements this test.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(org.joda.time.DateTime startTime,
long duration,
String title,
String description,
String methodName,
Class<?> testCase,
List<TestStep> testSteps,
List<String> issues,
List<String> additionalIssues,
Set<TestTag> tags,
Story userStory,
FailureCause testFailureCause,
String testFailureClassname,
String testFailureMessage,
TestResult annotatedResult,
DataTable dataTable,
com.google.common.base.Optional<String> qualifier,
boolean manualTest)
public TestOutcome usingIssueTracking(IssueTracking issueTracking)
public TestOutcome asManualTest()
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 methodpublic TestOutcome withQualifier(String qualifier)
public TestOutcome withIssues(List<String> issues)
public TestOutcome withTags(Set<TestTag> tags)
public TestOutcome withMethodName(String methodName)
public String getMethodName()
public static TestOutcome forTestInStory(String testName, Story story)
public static TestOutcome forTestInStory(String testName, Class<?> testCase, Story story)
public String getTitle()
public String getTitle(boolean qualified)
public TestOutcome.TitleBuilder getUnqualified()
public TestOutcome.TitleBuilder getQualified()
public void setAllStepsTo(TestResult result)
public void setAllStepsTo(List<TestStep> steps, TestResult result)
public void setDescription(String description)
public void setBackgroundDescription(String description)
public String getDescription()
public String getBackgroundDescription()
public com.google.common.base.Optional<String> getDescriptionText()
public String toJson()
public String getTitleWithLinks()
public String getStoryTitle()
public String getPath()
public String getPathId()
public String getReportName(ReportType type)
public String getSimpleReportName(ReportType type)
public String getHtmlReport()
public String getReportName()
public String getScreenshotReportName()
public List<TestStep> getTestSteps()
public boolean hasScreenshots()
public List<ScreenshotAndHtmlSource> getScreenshotAndHtmlSources()
public List<Screenshot> getScreenshots()
public boolean hasNonStepFailure()
public TestResult getResult()
public TestOutcome recordSteps(List<TestStep> steps)
public TestOutcome recordStep(TestStep step)
step - a completed step to be added to this test outcome.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 currentStep()
public TestStep lastStep()
public TestStep currentGroup()
public void setUserStory(Story story)
public void determineTestFailureCause(Throwable cause)
public void setTestFailureCause(FailureCause testFailureCause)
public void setTestFailureClassname(String testFailureClassname)
public FailureCause getTestFailureCause()
public String getErrorMessage()
public void setTestFailureMessage(String testFailureMessage)
public String getTestFailureMessage()
public String getTestFailureClassname()
public void setAnnotatedResult(TestResult annotatedResult)
public TestResult getAnnotatedResult()
public Class<?> getTestCase()
public String getTestCaseName()
public TestOutcome addVersion(String version)
public TestOutcome addVersions(List<String> versions)
public TestOutcome forProject(String project)
public String getProject()
public TestOutcome inTestRunTimestamped(org.joda.time.DateTime testRunTimestamp)
public void setTestRunTimestamp(org.joda.time.DateTime testRunTimestamp)
public String getFormattedIssues()
public void isRelatedToIssue(String issue)
public void addFailingExternalStep(Throwable testFailureCause)
public void addFailingStepAsSibling(List<TestStep> testStepList, Throwable testFailureCause)
public void lastStepFailedWith(StepFailure failure)
public void lastStepFailedWith(Throwable testFailureCause)
public String getQualifiedMethodName()
public String getCompleteName()
public void useExamplesFrom(DataTable table)
public void moveToNextRow()
public void updateCurrentRowResult(TestResult result)
public boolean dataIsPredefined()
public void addRow(DataTableRow dataTableRow)
public int getTestCount()
public int getImplementedTestCount()
public int countResults(TestResult expectedResult)
public int countResults(TestResult expectedResult, TestType expectedType)
public boolean typeCompatibleWith(TestType testType)
public int countNestedStepsWithResult(TestResult expectedResult, TestType testType)
public boolean hasIssue(String issue)
public boolean hasTag(TestTag tag)
public void setStartTime(org.joda.time.DateTime startTime)
public void clearStartTime()
public boolean isManual()
public boolean isStartTimeNotDefined()
public TestOutcome.OptionalElements has()
public Integer getStepCount()
public Integer getNestedStepCount()
public Integer getSuccessCount()
public Integer getFailureCount()
public Integer getErrorCount()
public Integer getIgnoredCount()
public Integer getSkippedOrIgnoredCount()
public Integer getSkippedCount()
public Integer getPendingCount()
public Boolean isSuccess()
public Boolean isFailure()
public Boolean isError()
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()
public org.joda.time.DateTime getStartTime()
public org.joda.time.DateTime getTestRunTimestamp()
public boolean isDataDriven()
public String getDataDrivenSampleScenario()
public DataTable getDataTable()
Copyright © 2011–2014 Wakaleo Consulting. All rights reserved.