Package jetbrains.buildServer.serverSide
Class MultiTestRun
- java.lang.Object
-
- jetbrains.buildServer.serverSide.BaseTestRun
-
- jetbrains.buildServer.serverSide.MultiTestRun
-
public class MultiTestRun extends BaseTestRun
${DESCR}- Author:
- kir
-
-
Field Summary
-
Fields inherited from interface jetbrains.buildServer.serverSide.STestRun
NEW_FIRST_NAME_COMPARATOR
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SBuild
getBuild()
Returns corresponding build instance.long
getBuildId()
SBuild
getBuildOrNull()
Returns the build and does not throw an exception if it is null.Collection<SBuildType>
getBuildTypes()
Long
getCompositeBuildId()
int
getDuration()
Returns test duration.int
getFailedInvocationCount()
Return number of times test with this name was failed within the build (<=STestRun.getInvocationCount()
For STestRuns obtained from ShortStatistics, returns the same value asSTestRun.getInvocationCount()
SBuild
getFirstFailed()
Returns the first build in a failing sequence containing this test runint
getFirstFailedTestRunId()
SBuild
getFixedIn()
Returns the first build in which test is fixed after a failing sequence containing this test runString
getFullText()
Returns complete test output, including stdout, stderr and exceptionsString
getIgnoreComment()
Returns ignore comment, if availableint
getInvocationCount()
Return number of times test with this name was run within the build.TestRunMetadata
getMetadata()
MuteInfo
getMuteInfo()
Returns the brief mute information for this test run.int
getOrderId()
Returns ordinal number of this test in the build statistics collection.Status
getStatus()
For composite test runs, following rules apply:STest
getTest()
Returns corresponding test instance.int
getTestRunId()
Returns the unique test run id within the buildCollection<STestRun>
getTestRuns()
boolean
isFixed()
Returns true if this test was fixed after this failure.boolean
isMuted()
Composite test if muted only if all its failures are mutedboolean
isNewFailure()
Returns whether this test is failed and it was not failed in previous buildsboolean
isNewFailureComputed()
static List<STestRun>
mergeByTestName(List<STestRun> original)
Groups tests by build and test namestatic List<STestRun>
mergeByTestName(List<STestRun> original, boolean splitByBuilds)
void
setBuild(SBuild build)
Sets the associated with this test run buildvoid
setCompositeBuildId(Long compositeBuildId)
void
setFirstFailedIn(SBuild firstFailedIn)
Sets the build where this TestRun is considered first failed invoid
setFixedIn(SBuild fixedIn)
Sets the build where this test is considered to be fixedvoid
setFixedInId(long fixedInId)
void
setMuteInfo(MuteInfo muteInfo)
Sets the mute information for this test run.void
setNewFailure(Boolean newFailure)
String
toString()
Only for debug-
Methods inherited from class jetbrains.buildServer.serverSide.BaseTestRun
getStatusText, isIgnored
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.serverSide.STestRun
getFailureInfo
-
-
-
-
Method Detail
-
mergeByTestName
@NotNull public static List<STestRun> mergeByTestName(@NotNull List<STestRun> original)
Groups tests by build and test name- Parameters:
original
- original collections of tests- Returns:
- collection of tests, merged by build and test name
-
mergeByTestName
@NotNull public static List<STestRun> mergeByTestName(@NotNull List<STestRun> original, boolean splitByBuilds)
-
getTest
@NotNull public STest getTest()
Description copied from interface:STestRun
Returns corresponding test instance.Note: the instance might or might not be shared between different test runs of one test.
- Returns:
- corresponding test instance
-
setFirstFailedIn
public void setFirstFailedIn(@Nullable SBuild firstFailedIn)
Description copied from interface:STestRun
Sets the build where this TestRun is considered first failed in- Parameters:
firstFailedIn
- the first failed in build- See Also:
STestRun.getFirstFailed()
-
setFixedIn
public void setFixedIn(@Nullable SBuild fixedIn)
Description copied from interface:STestRun
Sets the build where this test is considered to be fixed- Parameters:
fixedIn
- the fixed in build- See Also:
STestRun.getFixedIn()
-
setFixedInId
public void setFixedInId(long fixedInId)
- Specified by:
setFixedInId
in classBaseTestRun
-
isNewFailure
public boolean isNewFailure()
Description copied from interface:STestRun
Returns whether this test is failed and it was not failed in previous builds- Returns:
- true if this test is failed and it was not failed in previous builds
-
setNewFailure
public void setNewFailure(@NotNull Boolean newFailure)
-
isNewFailureComputed
public boolean isNewFailureComputed()
-
getBuild
@NotNull public SBuild getBuild()
Description copied from interface:STestRun
Returns corresponding build instance.Note: each test run has an associated build, but depending on how this test run instance was created build might not be populated. In this case a
UnsupportedOperationException
is thrown.- Returns:
- corresponding build instance
-
getBuildId
public long getBuildId()
- Returns:
- id of the build where this test run has occurred
-
getOrderId
public int getOrderId()
Description copied from interface:STestRun
Returns ordinal number of this test in the build statistics collection. This number can be different depending on what tests were loaded into the build statistics instance.- Returns:
- ordinal number of this test in the build statistics collection
-
getTestRunId
public int getTestRunId()
Description copied from interface:STestRun
Returns the unique test run id within the build- Returns:
- test run id
-
getFirstFailedTestRunId
public int getFirstFailedTestRunId()
- Overrides:
getFirstFailedTestRunId
in classBaseTestRun
- Returns:
- testRunId of the first failed test run or -1 if test is not failed
-
getInvocationCount
public int getInvocationCount()
Description copied from interface:STestRun
Return number of times test with this name was run within the build. If this STestRun was obtained as a part of ShortStatistics, only failed test runs are included.- Specified by:
getInvocationCount
in interfaceSTestRun
- Overrides:
getInvocationCount
in classBaseTestRun
- Returns:
- see above
-
getFailedInvocationCount
public int getFailedInvocationCount()
Description copied from interface:STestRun
Return number of times test with this name was failed within the build (<=STestRun.getInvocationCount()
For STestRuns obtained from ShortStatistics, returns the same value asSTestRun.getInvocationCount()
- Specified by:
getFailedInvocationCount
in interfaceSTestRun
- Overrides:
getFailedInvocationCount
in classBaseTestRun
- Returns:
- see above
- See Also:
STestRun.getInvocationCount()
-
getDuration
public int getDuration()
Description copied from interface:STestRun
Returns test duration.- Returns:
- test duration in milliseconds
-
getStatus
@NotNull public Status getStatus()
For composite test runs, following rules apply:If any test run is "failure", than composite result is "failure" Else if any test run is successful, composite result is "success" Else composite result is "ignored"
- Returns:
- composite test status, see above
-
getFirstFailed
@Nullable public SBuild getFirstFailed()
Description copied from interface:STestRun
Returns the first build in a failing sequence containing this test run- Returns:
- first failed in build
-
getFixedIn
@Nullable public SBuild getFixedIn()
Description copied from interface:STestRun
Returns the first build in which test is fixed after a failing sequence containing this test run- Returns:
- fixed in build
-
isFixed
public boolean isFixed()
Description copied from interface:STestRun
Returns true if this test was fixed after this failure. Returns false for a successful test.- Returns:
- true if this test was fixed
-
getMuteInfo
@Nullable public MuteInfo getMuteInfo()
Description copied from interface:STestRun
Returns the brief mute information for this test run.- Returns:
- mute information if exists.
- See Also:
STestRun.isMuted()
-
getFullText
@Nullable public String getFullText()
Description copied from interface:STestRun
Returns complete test output, including stdout, stderr and exceptions- Returns:
- complete test output, including stdout, stderr and exceptions
-
isMuted
public boolean isMuted()
Composite test if muted only if all its failures are muted- Specified by:
isMuted
in interfaceSTestRun
- Overrides:
isMuted
in classBaseTestRun
- Returns:
- if all composite test run failures are muted
- See Also:
STestRun.getMuteInfo()
-
getIgnoreComment
@Nullable public String getIgnoreComment()
Description copied from interface:STestRun
Returns ignore comment, if available- Returns:
- ignore comment, if available
-
getBuildOrNull
@Nullable public SBuild getBuildOrNull()
Description copied from interface:TestRunEx
Returns the build and does not throw an exception if it is null.- Returns:
- the build
-
setBuild
public void setBuild(@Nullable SBuild build)
Description copied from interface:TestRunEx
Sets the associated with this test run build- Parameters:
build
- associated build
-
setMuteInfo
public void setMuteInfo(@Nullable MuteInfo muteInfo)
Description copied from interface:TestRunEx
Sets the mute information for this test run.- Parameters:
muteInfo
- the mute info
-
getMetadata
@NotNull public TestRunMetadata getMetadata()
- Specified by:
getMetadata
in interfaceTestRunEx
- Overrides:
getMetadata
in classBaseTestRun
-
getTestRuns
public Collection<STestRun> getTestRuns()
-
getBuildTypes
public Collection<SBuildType> getBuildTypes()
-
getCompositeBuildId
@Nullable public Long getCompositeBuildId()
-
setCompositeBuildId
public void setCompositeBuildId(@NotNull Long compositeBuildId)
-
-