|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.resultsummary.BuildResultsSummaryForTesting
public class BuildResultsSummaryForTesting
Constructor Summary | |
---|---|
BuildResultsSummaryForTesting()
Simple constructor for BuildResultsSummary |
|
BuildResultsSummaryForTesting(BuildResults buildResults)
Create a summary from an existing build results |
|
BuildResultsSummaryForTesting(BuildState buildState,
int buildNumber,
int failedTestCount,
int successfulTestCount,
java.util.Date buildTimeStamp,
long duration,
ReasonForBuild reasonForBuild)
Initialise the summary with the desired state and build number. |
|
BuildResultsSummaryForTesting(BuildState buildState,
int buildNumber,
int failedTestCount,
int successfulTestCount,
java.util.Date buildTimeStamp,
long duration,
ReasonForBuild reasonForBuild,
java.util.Map<java.lang.String,java.lang.String> metadata)
|
|
BuildResultsSummaryForTesting(java.lang.String planKey,
int buildNumber,
BuildState buildState)
|
Method Summary | |
---|---|
int |
compareTo(ResultsSummary brs)
|
protected java.lang.String |
createChangedByAuthors(java.util.Set updators)
|
boolean |
equals(java.lang.Object object)
|
java.util.Collection<ArtifactLink> |
getArtifactLinks()
Returns all artifacts associated with this build. |
java.util.Collection<ArtifactLink> |
getArtifactLinksThatExist()
Returns only artifacts that exists |
java.lang.Long |
getBuildAgentId()
The agent Id |
java.util.Date |
getBuildCancelledDate()
When the build was cancelled |
java.util.Date |
getBuildCompletedDate()
When the build finished |
java.util.Date |
getBuildDate()
When was the build? |
java.lang.String |
getBuildKey()
Full key of the plan. |
int |
getBuildNumber()
Which build number was this? |
java.lang.String |
getBuildResultKey()
A full build result key e.g. |
BuildState |
getBuildState()
What was the success status of the build? |
java.lang.String |
getBuildTime()
When did the build start? |
ChainResultsSummary |
getChainResultsSummary()
The ChainResultsSummary to which the current BuildResultsSummary is a child of
Typically this is the link between a Chain and Job result
If the value is null it can be assumed that the result is for a Build |
java.lang.String |
getChangedByAuthors()
|
java.lang.String |
getChangesListSummary()
|
java.lang.String |
getChangesListSummaryAsJs()
|
java.util.List<Comment> |
getComments()
Gets the associated user comments for the build |
java.util.Set<Commit> |
getCommits()
Any Commit s related to this BuildResultsSummary
Note that if you fetched this result from Lucene that accessing this property will cause a database hit |
java.util.Map<java.lang.String,java.lang.String> |
getCustomBuildData()
Custom data map to store random metadata about the build |
DeltaState |
getDeltaState()
Gets the DeltaState of the summary. |
long |
getDuration()
Get the duration of the build |
java.lang.String |
getDurationDescription()
Returns the duration in a "pretty" format. |
double |
getDurationInSeconds()
|
ExtraBuildResultsData |
getExtraBuildResultsData()
Allow access to ExtraBuildResultsData |
long |
getFailedTestCount()
How many of the build's tests failed? |
FilteredTestResults |
getFilteredTestResults()
Return a filtered view of all the tests that ran in this build. |
java.util.Set<LinkedJiraIssue> |
getFixingJiraIssues()
Return JIRA issues that this build result summary fixes |
long |
getId()
|
java.util.Set<java.lang.String> |
getJiraIssueKeys()
Returns all the JIRA issue keys linked to this build result |
java.util.Set<LinkedJiraIssue> |
getJiraIssues()
Returns all the JIRA issues linked to this build result |
java.util.List<Labelling> |
getLabellings()
Tags / labels assocaited with the build |
java.util.List<java.lang.String> |
getLabelNames()
A shortcust method to get all of the label names from the labbellings |
LifeCycleState |
getLifeCycleState()
|
Plan |
getPlan()
Gets the Plan that this result belongs directly belongs to |
java.util.Date |
getPlanCompletedDate()
|
PlanResultKey |
getPlanResultKey()
Gets the PlanResultKey for this BuildResultsSummary |
java.util.Collection<ArtifactLink> |
getProducedArtifactLinks()
Returns all artifacts produced by this build. |
long |
getQueueDuration()
How long build was in the queue (in miliseconds) |
java.util.Date |
getQueueTime()
When the build queued |
ReasonForBuild |
getReasonForBuild()
|
java.lang.String |
getReasonSummary()
|
java.util.Set<LinkedJiraIssue> |
getRelatedJiraIssues()
Returns JIRA issues that are related to this build result. |
java.lang.String |
getRelativeBuildDate()
|
java.lang.String |
getRelativeBuildDate(java.util.Date comparedTo)
Provides a relative build date, such as 2 hours ago. |
java.lang.String |
getRelativeQueueDate()
|
java.lang.String |
getRelativeQueueDate(java.util.Date comparedTo)
|
java.lang.String |
getShortReasonSummary()
|
int |
getSkippedCommitsCount()
The number of commits that were included in this summary, but their details were skipped (because there was too many commits to keep them all in this summary) |
java.util.Date |
getStatDate()
When was the build? |
java.util.List<ConsumedSubscription> |
getSubscriptions()
Returns list of consumed artifact dependencies ConsumedSubscription |
long |
getSuccessfulTestCount()
How many of the build's tests passed? |
TestResultsSummary |
getTestResultsSummary()
|
java.lang.String |
getTestSummary()
|
java.lang.Long |
getTimeToFix()
A stored version of how long (milli seconds) it took for this build to fix a failure. |
TriggerReason |
getTriggerReason()
Why the build was was triggered |
protected TriggerReasonManager |
getTriggerReasonManager()
|
java.util.Set<Author> |
getUniqueAuthors()
A shortcut method to get the unique set of authors contributing to this build. |
java.lang.String |
getVcsRevisionKey()
The string representing the revision when the build was run. |
long |
getVcsUpdateDuration()
How long checkout take (in miliseconds) |
java.util.Date |
getVcsUpdateTime()
When the source syncronisation was kicked off |
boolean |
hasChanges()
Whether a build had changes or not |
boolean |
hasComments()
Checks if the result has any user comments for the build |
int |
hashCode()
|
boolean |
isActive()
Shortcut method to see if ResultsSummary.getLifeCycleState() is LifeCycleState.PENDING or LifeCycleState.QUEUED or LifeCycleState.IN_PROGRESS |
boolean |
isBuiltToday()
|
boolean |
isFailed()
Shortcut method to see if ResultStatisticsProvider.getBuildState() is BuildState.FAILED |
boolean |
isFinished()
Shortcut method to see if ResultsSummary.getLifeCycleState() is LifeCycleState.FINISHED |
boolean |
isInProgress()
Shortcut method to see if ResultsSummary.getLifeCycleState() is LifeCycleState.IN_PROGRESS |
boolean |
isMarkedForDeletion()
|
boolean |
isNotBuilt()
Shortcut method to see if ResultsSummary.getLifeCycleState() is LifeCycleState.NOT_BUILT |
boolean |
isPending()
Shortcut method to see if ResultsSummary.getLifeCycleState() is LifeCycleState.PENDING |
boolean |
isQueued()
Shortcut method to see if ResultsSummary.getLifeCycleState() is LifeCycleState.QUEUED |
boolean |
isSuccessful()
Shortcut method to see if ResultStatisticsProvider.getBuildState() is BuildState.SUCCESS |
boolean |
isWaiting()
Shortcut method to see if ResultsSummary.getLifeCycleState() is LifeCycleState.PENDING or LifeCycleState.QUEUED |
void |
resetTestClassResults(java.util.List<TestClassResult> testClassResults)
Overrides all current testClassResults with the new ones |
void |
setArtifactLinks(java.util.Collection<ArtifactLink> artifactLinks)
|
void |
setBuildCancelledDate(java.util.Date buildCancelledDate)
|
void |
setBuildDate(java.util.Date buildDate)
|
void |
setBuildState(BuildState buildState)
|
void |
setChainResultsSummary(ChainResultsSummary chainResultSummary)
|
void |
setCommits(java.util.Set<Commit> commits)
|
void |
setDeltaState(DeltaState deltaState)
Sets the DeltaState for the summary. |
void |
setDuration(long duration)
|
void |
setId(long id)
|
void |
setLifeCycleState(LifeCycleState lifeCycleState)
|
void |
setMarkedForDeletion(boolean markedForDeletion)
|
void |
setPlanCompletedDate(java.util.Date completionDate)
Sets the time when build finished. |
void |
setQueueTime(java.util.Date queueTime)
|
void |
setReasonForBuild(ReasonForBuild reasonForBuild)
|
void |
setTestResultsSummary(TestResultsSummary testResultsSummary)
Set the test summary information from this build |
void |
setTimeToFix(java.lang.Long timeToFix)
A stored version of how long (milli seconds) it took for this build to fix a failure. |
void |
setTriggerReason(TriggerReason triggerReason)
|
void |
setTriggerReasonManager(TriggerReasonManager triggerReasonManager)
|
void |
setVcsRevisionKey(java.lang.String vcsRevisionKey)
|
void |
setVcsUpdateTime(java.util.Date vcsUpdateTime)
|
void |
updateLifeCycleState(LifeCycleState lifeCycleState,
BuildState buildState)
Update lifeCycleState and buildState in one go. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BuildResultsSummaryForTesting()
public BuildResultsSummaryForTesting(BuildResults buildResults)
buildResults
- public BuildResultsSummaryForTesting(BuildState buildState, int buildNumber, int failedTestCount, int successfulTestCount, java.util.Date buildTimeStamp, long duration, ReasonForBuild reasonForBuild)
buildState
- The state of the buildbuildNumber
- The number of the buildfailedTestCount
- The number of failed tests in this buildsuccessfulTestCount
- The number of successful tests in this buildbuildTimeStamp
- The time of the buildduration
- How long the build tookreasonForBuild
- The reason for the buildpublic BuildResultsSummaryForTesting(BuildState buildState, int buildNumber, int failedTestCount, int successfulTestCount, java.util.Date buildTimeStamp, long duration, ReasonForBuild reasonForBuild, java.util.Map<java.lang.String,java.lang.String> metadata)
public BuildResultsSummaryForTesting(java.lang.String planKey, int buildNumber, BuildState buildState)
Method Detail |
---|
public boolean hasComments()
ResultsSummary
hasComments
in interface ResultsSummary
public boolean hasChanges()
ResultsSummary
hasChanges
in interface ResultsSummary
public ChainResultsSummary getChainResultsSummary()
BuildResultsSummary
ChainResultsSummary
to which the current BuildResultsSummary
is a child of
Typically this is the link between a Chain
and Job
result
If the value is null it can be assumed that the result is for a Build
getChainResultsSummary
in interface BuildResultsSummary
public void setChainResultsSummary(@NotNull ChainResultsSummary chainResultSummary)
setChainResultsSummary
in interface BuildResultsSummary
@NotNull public PlanResultKey getPlanResultKey()
ResultsSummary
PlanResultKey
for this BuildResultsSummary
getPlanResultKey
in interface ResultsSummary
@NotNull public java.lang.String getBuildKey()
ResultsSummary
getBuildKey
in interface ResultsSummary
@NotNull public Plan getPlan()
ResultsSummary
Plan
that this result belongs directly belongs to
getPlan
in interface ResultsSummary
@NotNull public java.util.Set<Commit> getCommits()
ResultsSummary
Commit
s related to this BuildResultsSummary
Note that if you fetched this result from Lucene that accessing this property will cause a database hit
getCommits
in interface ResultsSummary
public void setCommits(java.util.Set<Commit> commits)
public int getSkippedCommitsCount()
ResultsSummary
getSkippedCommitsCount
in interface ResultsSummary
public BuildState getBuildState()
getBuildState
in interface ResultStatisticsProvider
public int getBuildNumber()
getBuildNumber
in interface ResultStatisticsProvider
public long getFailedTestCount()
getFailedTestCount
in interface ResultsSummary
public long getSuccessfulTestCount()
getSuccessfulTestCount
in interface ResultsSummary
public void setDuration(long duration)
setDuration
in interface ResultsSummary
duration
- duration of the build in millisecondspublic void setBuildState(BuildState buildState)
@Nullable public java.util.Date getBuildDate()
getBuildDate
in interface ResultStatisticsProvider
@NotNull public java.util.Date getStatDate()
getStatDate
in interface ResultStatisticsProvider
@NotNull public java.util.Map<java.lang.String,java.lang.String> getCustomBuildData()
ResultsSummary
getCustomBuildData
in interface ResultsSummary
public java.util.List<Labelling> getLabellings()
ResultsSummary
getLabellings
in interface ResultsSummary
@NotNull public java.util.List<java.lang.String> getLabelNames()
ResultsSummary
getLabelNames
in interface ResultsSummary
@NotNull public java.util.Set<LinkedJiraIssue> getJiraIssues()
ResultsSummary
getJiraIssues
in interface ResultsSummary
public java.util.Set<java.lang.String> getJiraIssueKeys()
ResultsSummary
getJiraIssueKeys
in interface ResultsSummary
public java.lang.Long getTimeToFix()
ResultsSummary
getTimeToFix
in interface ResultsSummary
@NotNull public java.util.List<Comment> getComments()
ResultsSummary
getComments
in interface ResultsSummary
public java.util.Set<Author> getUniqueAuthors()
ResultsSummary
getUniqueAuthors
in interface ResultsSummary
Set
of Author
spublic java.util.Date getBuildCompletedDate()
ResultsSummary
getBuildCompletedDate
in interface ResultsSummary
public java.util.Date getBuildCancelledDate()
ResultsSummary
getBuildCancelledDate
in interface ResultsSummary
public long getDuration()
getDuration
in interface ResultsSummary
public double getDurationInSeconds()
getDurationInSeconds
in interface ResultStatisticsProvider
public ReasonForBuild getReasonForBuild()
@NotNull public TriggerReason getTriggerReason()
ResultsSummary
getTriggerReason
in interface ResultsSummary
public java.lang.Long getBuildAgentId()
BuildResultsSummary
getBuildAgentId
in interface BuildResultsSummary
getBuildAgentId
in interface ExtendedBuildResultsSummary
public void setReasonForBuild(ReasonForBuild reasonForBuild)
public java.lang.String getChangedByAuthors()
@NotNull public java.lang.String getChangesListSummary()
getChangesListSummary
in interface ResultsSummary
public java.util.List<ConsumedSubscription> getSubscriptions()
ResultsSummary
ConsumedSubscription
getSubscriptions
in interface ResultsSummary
public java.lang.String getChangesListSummaryAsJs()
public DeltaState getDeltaState()
ResultsSummary
DeltaState
of the summary. It can be a build that fixes, breaks, failing, successfull. Provides a status
relative to the previous summary.
getDeltaState
in interface ResultsSummary
@NotNull public java.lang.String getBuildResultKey()
ResultsSummary
getBuildResultKey
in interface ResultsSummary
@Nullable public java.lang.String getVcsRevisionKey()
ResultsSummary
Repository
specific, so may not correspond
and thus be parseable by the current repository configuration. May return null since this data is not always available
getVcsRevisionKey
in interface ResultsSummary
public void setVcsRevisionKey(java.lang.String vcsRevisionKey)
setVcsRevisionKey
in interface ResultsSummary
@NotNull public java.lang.String getDurationDescription()
ResultsSummary
getDurationDescription
in interface ResultsSummary
public java.lang.String getShortReasonSummary()
getShortReasonSummary
in interface ResultsSummary
public java.lang.String getRelativeBuildDate()
getRelativeBuildDate
in interface ResultsSummary
public java.lang.String getRelativeQueueDate()
getRelativeQueueDate
in interface ResultsSummary
public boolean isBuiltToday()
public java.lang.String getRelativeBuildDate(java.util.Date comparedTo)
getRelativeBuildDate
in interface ResultsSummary
public java.lang.String getRelativeQueueDate(java.util.Date comparedTo)
getRelativeQueueDate
in interface ResultsSummary
protected java.lang.String createChangedByAuthors(java.util.Set updators)
public java.lang.String getReasonSummary()
getReasonSummary
in interface ResultsSummary
@NotNull public java.lang.String getTestSummary()
getTestSummary
in interface ResultsSummary
public boolean isFailed()
ResultsSummary
ResultStatisticsProvider.getBuildState()
is BuildState.FAILED
isFailed
in interface ResultsSummary
public boolean isSuccessful()
ResultsSummary
ResultStatisticsProvider.getBuildState()
is BuildState.SUCCESS
isSuccessful
in interface ResultsSummary
public boolean isPending()
ResultsSummary
ResultsSummary.getLifeCycleState()
is LifeCycleState.PENDING
isPending
in interface ResultsSummary
public boolean isQueued()
ResultsSummary
ResultsSummary.getLifeCycleState()
is LifeCycleState.QUEUED
isQueued
in interface ResultsSummary
public boolean isInProgress()
ResultsSummary
ResultsSummary.getLifeCycleState()
is LifeCycleState.IN_PROGRESS
isInProgress
in interface ResultsSummary
public boolean isNotBuilt()
ResultsSummary
ResultsSummary.getLifeCycleState()
is LifeCycleState.NOT_BUILT
isNotBuilt
in interface ResultsSummary
public boolean isFinished()
ResultsSummary
ResultsSummary.getLifeCycleState()
is LifeCycleState.FINISHED
isFinished
in interface ResultsSummary
public boolean isWaiting()
ResultsSummary
ResultsSummary.getLifeCycleState()
is LifeCycleState.PENDING
or LifeCycleState.QUEUED
isWaiting
in interface ResultsSummary
public boolean isActive()
ResultsSummary
ResultsSummary.getLifeCycleState()
is LifeCycleState.PENDING
or LifeCycleState.QUEUED
or LifeCycleState.IN_PROGRESS
isActive
in interface ResultsSummary
@NotNull public java.util.Set<LinkedJiraIssue> getFixingJiraIssues()
ResultsSummary
getFixingJiraIssues
in interface ResultsSummary
@NotNull public java.util.Set<LinkedJiraIssue> getRelatedJiraIssues()
ResultsSummary
getRelatedJiraIssues
in interface ResultsSummary
@NotNull public java.util.Collection<ArtifactLink> getArtifactLinks()
ResultsSummary
getArtifactLinks
in interface ResultsSummary
@NotNull public java.util.Collection<ArtifactLink> getProducedArtifactLinks()
BuildResultsSummary
getProducedArtifactLinks
in interface BuildResultsSummary
public void setArtifactLinks(java.util.Collection<ArtifactLink> artifactLinks)
public java.util.Collection<ArtifactLink> getArtifactLinksThatExist()
ResultsSummary
getArtifactLinksThatExist
in interface ResultsSummary
public java.lang.String getBuildTime()
getBuildTime
in interface ResultsSummary
public void setBuildDate(java.util.Date buildDate)
setBuildDate
in interface ResultsSummary
public long getId()
getId
in interface BambooObject
public void setId(long id)
setId
in interface BambooObject
protected TriggerReasonManager getTriggerReasonManager()
public void setTriggerReasonManager(TriggerReasonManager triggerReasonManager)
public java.util.Date getQueueTime()
ResultsSummary
getQueueTime
in interface ResultsSummary
public long getQueueDuration()
BuildResultsSummary
getQueueDuration
in interface BuildResultsSummary
public void setQueueTime(java.util.Date queueTime)
setQueueTime
in interface ResultsSummary
public java.util.Date getVcsUpdateTime()
BuildResultsSummary
getVcsUpdateTime
in interface BuildResultsSummary
public long getVcsUpdateDuration()
BuildResultsSummary
getVcsUpdateDuration
in interface BuildResultsSummary
public LifeCycleState getLifeCycleState()
getLifeCycleState
in interface ResultsSummary
public void setLifeCycleState(LifeCycleState lifeCycleState)
public void updateLifeCycleState(@NotNull LifeCycleState lifeCycleState, @NotNull BuildState buildState)
ResultsSummary
updateLifeCycleState
in interface ResultsSummary
lifeCycleState
- lifeCycleState to be setbuildState
- buildState to be setpublic void setVcsUpdateTime(java.util.Date vcsUpdateTime)
public void resetTestClassResults(@NotNull java.util.List<TestClassResult> testClassResults)
ResultsSummary
resetTestClassResults
in interface ResultsSummary
testClassResults
- to setpublic void setPlanCompletedDate(@NotNull java.util.Date completionDate)
ResultsSummary
setPlanCompletedDate
in interface ResultsSummary
@NotNull public java.util.Date getPlanCompletedDate()
getPlanCompletedDate
in interface ResultsSummary
@NotNull public TestResultsSummary getTestResultsSummary()
getTestResultsSummary
in interface ResultsSummary
public void setTestResultsSummary(@NotNull TestResultsSummary testResultsSummary)
ResultsSummary
setTestResultsSummary
in interface ResultsSummary
testResultsSummary
- the test summary informationpublic boolean isMarkedForDeletion()
public void setMarkedForDeletion(boolean markedForDeletion)
public void setBuildCancelledDate(java.util.Date buildCancelledDate)
setBuildCancelledDate
in interface ResultsSummary
public void setTriggerReason(TriggerReason triggerReason)
setTriggerReason
in interface ResultsSummary
public void setDeltaState(DeltaState deltaState)
DeltaState
for the summary. Provides a status relative to the previous summary.
setDeltaState
in interface ResultsSummary
deltaState
- - the relative status for this summarypublic void setTimeToFix(java.lang.Long timeToFix)
setTimeToFix
in interface ResultsSummary
timeToFix
- how long (milli seconds) it took for this build to fix a failure.@Nullable public ExtraBuildResultsData getExtraBuildResultsData()
BuildResultsSummary
ExtraBuildResultsData
getExtraBuildResultsData
in interface BuildResultsSummary
@NotNull public FilteredTestResults getFilteredTestResults()
BuildResultsSummary
getFilteredTestResults
in interface BuildResultsSummary
public int compareTo(ResultsSummary brs)
compareTo
in interface java.lang.Comparable<ResultsSummary>
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |