Class DummyTestRunImpl
- java.lang.Object
-
- jetbrains.buildServer.serverSide.BaseTestRun
-
- jetbrains.buildServer.controllers.investigate.DummyTestRunImpl
-
public class DummyTestRunImpl extends BaseTestRun
Dummy test run, used when we have to show a test in a tree of tests, but it has no real associated build.- Author:
- kir
-
-
Field Summary
-
Fields inherited from interface jetbrains.buildServer.serverSide.STestRun
NEW_FIRST_NAME_COMPARATOR
-
-
Constructor Summary
Constructors Constructor Description DummyTestRunImpl(STest test)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SBuildgetBuild()Returns corresponding build instance.longgetBuildId()SBuildgetBuildOrNull()Returns the build and does not throw an exception if it is null.intgetDuration()Returns test duration.SBuildgetFirstFailed()Returns the first build in a failing sequence containing this test runSBuildgetFixedIn()Returns the first build in which test is fixed after a failing sequence containing this test runStringgetFullText()Returns complete test output, including stdout, stderr and exceptionsStringgetIgnoreComment()Returns ignore comment, if availableMuteInfogetMuteInfo()Returns the brief mute information for this test run.intgetOrderId()Returns ordinal number of this test in the build statistics collection.StatusgetStatus()Returns test status.STestgetTest()Returns corresponding test instance.intgetTestRunId()Returns the unique test run id within the buildbooleanisFixed()Returns true if this test was fixed after this failure.booleanisNewFailure()Returns whether this test is failed and it was not failed in previous buildsbooleanisNewFailureComputed()voidsetBuild(SBuild build)Sets the associated with this test run buildvoidsetFirstFailedIn(SBuild firstFailedIn)Sets the build where this TestRun is considered first failed invoidsetFixedIn(SBuild fixedIn)Sets the build where this test is considered to be fixedvoidsetFixedInId(long fixedInId)voidsetMuteInfo(MuteInfo muteInfo)Sets the mute information for this test run.voidsetNewFailure(Boolean newFailure)-
Methods inherited from class jetbrains.buildServer.serverSide.BaseTestRun
getFailedInvocationCount, getFirstFailedTestRunId, getInvocationCount, getMetadata, getStatusText, isIgnored, isMuted
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.serverSide.STestRun
getFailureInfo
-
-
-
-
Constructor Detail
-
DummyTestRunImpl
public DummyTestRunImpl(STest test)
-
-
Method Detail
-
getTest
@NotNull public STest getTest()
Description copied from interface:STestRunReturns corresponding test instance.Note: the instance might or might not be shared between different test runs of one test.
- Returns:
- corresponding test instance
-
getBuild
@NotNull public SBuild getBuild()
Description copied from interface:STestRunReturns 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
UnsupportedOperationExceptionis 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:STestRunReturns 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:STestRunReturns the unique test run id within the build- Returns:
- test run id
-
getDuration
public int getDuration()
Description copied from interface:STestRunReturns test duration.- Returns:
- test duration in milliseconds
-
getStatus
@NotNull public Status getStatus()
Description copied from interface:STestRunReturns test status. Currently the test status could be one of: Status.NORMAL Status.FAILURE (better check isFailed() on status object) Status.UNKNOWN - for ignored tests- Returns:
- test status
-
getFirstFailed
public SBuild getFirstFailed()
Description copied from interface:STestRunReturns the first build in a failing sequence containing this test run- Returns:
- first failed in build
-
getFixedIn
public SBuild getFixedIn()
Description copied from interface:STestRunReturns the first build in which test is fixed after a failing sequence containing this test run- Returns:
- fixed in build
-
getMuteInfo
public MuteInfo getMuteInfo()
Description copied from interface:STestRunReturns the brief mute information for this test run.- Returns:
- mute information if exists.
- See Also:
STestRun.isMuted()
-
getFullText
public String getFullText()
Description copied from interface:STestRunReturns complete test output, including stdout, stderr and exceptions- Returns:
- complete test output, including stdout, stderr and exceptions
-
getIgnoreComment
public String getIgnoreComment()
Description copied from interface:STestRunReturns ignore comment, if available- Returns:
- ignore comment, if available
-
getBuildOrNull
public SBuild getBuildOrNull()
Description copied from interface:TestRunExReturns 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:TestRunExSets the associated with this test run build- Parameters:
build- associated build
-
setMuteInfo
public void setMuteInfo(@Nullable MuteInfo muteInfo)Description copied from interface:TestRunExSets the mute information for this test run.- Parameters:
muteInfo- the mute info
-
setFirstFailedIn
public void setFirstFailedIn(@Nullable SBuild firstFailedIn)Description copied from interface:STestRunSets 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:STestRunSets 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:
setFixedInIdin classBaseTestRun
-
isFixed
public boolean isFixed()
Description copied from interface:STestRunReturns true if this test was fixed after this failure. Returns false for a successful test.- Returns:
- true if this test was fixed
-
isNewFailure
public boolean isNewFailure()
Description copied from interface:STestRunReturns 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()
-
-