Package jetbrains.buildServer.serverSide
Interface STestRun
-
- All Known Subinterfaces:
TestRunEx
- All Known Implementing Classes:
BaseTestRun,DummyTestRunImpl,LightweightTestRunImpl,MultiTestRun,TestRunImpl,TestRunWithContext
public interface STestRunRepresents a single test run (execution) in a particular build.- Since:
- 6.5
- Author:
- Sergey Anchipolevsky, Maxim Podkolzine (maxim.podkolzine@jetbrains.com)
-
-
Field Summary
Fields Modifier and Type Field Description static Comparator<STestRun>NEW_FIRST_NAME_COMPARATOR
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description SBuildgetBuild()Returns corresponding build instance.longgetBuildId()intgetDuration()Returns test duration.intgetFailedInvocationCount()Return number of times test with this name was failed within the build (<=getInvocationCount()For STestRuns obtained from ShortStatistics, returns the same value asgetInvocationCount()default TestFailureInfogetFailureInfo()Deprecated.in 9.0, usegetFullText()insteadSBuildgetFirstFailed()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 availableintgetInvocationCount()Return number of times test with this name was run within the build.MuteInfogetMuteInfo()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.StringgetStatusText()Return human-readable test status, not an objectSTestgetTest()Returns corresponding test instance.intgetTestRunId()Returns the unique test run id within the buildbooleanisFixed()Returns true if this test was fixed after this failure.booleanisIgnored()Checks whether the test was ignored during the build runbooleanisMuted()Returns whether this test run is marked as muted (this is applicable for failed tests only).booleanisNewFailure()Returns whether this test is failed and it was not failed in previous buildsvoidsetFirstFailedIn(SBuild firstFailedIn)Sets the build where this TestRun is considered first failed invoidsetFixedIn(SBuild fixedIn)Deprecated.since 2019.2, should not be used by the client code
-
-
-
Field Detail
-
NEW_FIRST_NAME_COMPARATOR
static final Comparator<STestRun> NEW_FIRST_NAME_COMPARATOR
-
-
Method Detail
-
getTest
@NotNull STest getTest()
Returns 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 SBuild getBuild()
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
UnsupportedOperationExceptionis thrown.- Returns:
- corresponding build instance
-
getBuildId
long getBuildId()
- Returns:
- id of the build where this test run has occurred
- Since:
- 9.1
-
getOrderId
int getOrderId()
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
int getTestRunId()
Returns the unique test run id within the build- Returns:
- test run id
-
getInvocationCount
int getInvocationCount()
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.- Returns:
- see above
- Since:
- 9.0
-
getFailedInvocationCount
int getFailedInvocationCount()
Return number of times test with this name was failed within the build (<=getInvocationCount()For STestRuns obtained from ShortStatistics, returns the same value asgetInvocationCount()- Returns:
- see above
- Since:
- 9.0
- See Also:
getInvocationCount()
-
getDuration
int getDuration()
Returns test duration.- Returns:
- test duration in milliseconds
-
getStatus
@NotNull Status getStatus()
Returns 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
-
getStatusText
@NotNull String getStatusText()
Return human-readable test status, not an object- Returns:
- human-readable test status
- Since:
- 8.0
-
getFailureInfo
@Deprecated @Nullable default TestFailureInfo getFailureInfo()
Deprecated.in 9.0, usegetFullText()instead- Returns:
- as of 9.0, always returns null
-
getFirstFailed
@Nullable SBuild getFirstFailed()
Returns the first build in a failing sequence containing this test run- Returns:
- first failed in build
-
setFirstFailedIn
void setFirstFailedIn(@Nullable SBuild firstFailedIn)Sets the build where this TestRun is considered first failed in- Parameters:
firstFailedIn- the first failed in build- Since:
- 9.0
- See Also:
getFirstFailed()
-
getFixedIn
@Nullable SBuild getFixedIn()
Returns the first build in which test is fixed after a failing sequence containing this test run- Returns:
- fixed in build
-
setFixedIn
@Deprecated void setFixedIn(@Nullable SBuild fixedIn)
Deprecated.since 2019.2, should not be used by the client codeSets the build where this test is considered to be fixed- Parameters:
fixedIn- the fixed in build- Since:
- 9.0
- See Also:
getFixedIn()
-
isFixed
boolean isFixed()
Returns true if this test was fixed after this failure. Returns false for a successful test.- Returns:
- true if this test was fixed
- Throws:
UnsupportedOperationException- if the statistics object was created without optionBuildStatisticsOptions.FIXED_IN_BUILD
-
isNewFailure
boolean isNewFailure()
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
-
isMuted
boolean isMuted()
Returns whether this test run is marked as muted (this is applicable for failed tests only).- Returns:
- whether this test run is marked as muted.
- See Also:
getMuteInfo()
-
isIgnored
boolean isIgnored()
Checks whether the test was ignored during the build run- Returns:
- true if the test was ignored during the build run
- Since:
- 8.0
-
getMuteInfo
@Nullable MuteInfo getMuteInfo()
Returns the brief mute information for this test run.- Returns:
- mute information if exists.
- See Also:
isMuted()
-
getFullText
@Nullable String getFullText()
Returns complete test output, including stdout, stderr and exceptions- Returns:
- complete test output, including stdout, stderr and exceptions
-
getIgnoreComment
@Nullable String getIgnoreComment()
Returns ignore comment, if available- Returns:
- ignore comment, if available
-
-