Class DefaultStepReporter
- java.lang.Object
-
- com.epam.reportportal.service.step.DefaultStepReporter
-
- All Implemented Interfaces:
StepReporter
public class DefaultStepReporter extends java.lang.Object implements StepReporter
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.epam.reportportal.service.step.StepReporter
StepReporter.StepEntry
-
-
Field Summary
-
Fields inherited from interface com.epam.reportportal.service.step.StepReporter
NOOP_STEP_REPORTER
-
-
Constructor Summary
Constructors Constructor Description DefaultStepReporter(Launch currentLaunch)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.reactivex.Maybe<OperationCompletionRS>finishNestedStep()io.reactivex.Maybe<OperationCompletionRS>finishNestedStep(ItemStatus status)io.reactivex.Maybe<OperationCompletionRS>finishNestedStep(FinishTestItemRQ finishStepRequest)io.reactivex.Maybe<OperationCompletionRS>finishNestedStep(java.lang.Throwable throwable)io.reactivex.Maybe<java.lang.String>finishPreviousStep()Finish current step started by any of#sendStepmethods.io.reactivex.Maybe<java.lang.String>finishPreviousStep(ItemStatus status)Finish current step started by any of#sendStepmethods.io.reactivex.Maybe<java.lang.String>getParent()booleanisFailed(io.reactivex.Maybe<java.lang.String> parentId)voidremoveParent(io.reactivex.Maybe<java.lang.String> parentUuid)io.reactivex.Maybe<java.lang.String>sendStep(ItemStatus status, java.lang.String name)io.reactivex.Maybe<java.lang.String>sendStep(ItemStatus status, java.lang.String name, java.io.File... files)protected io.reactivex.Maybe<java.lang.String>sendStep(ItemStatus status, java.lang.String name, java.lang.Runnable actions)io.reactivex.Maybe<java.lang.String>sendStep(ItemStatus status, java.lang.String name, java.lang.String... logs)io.reactivex.Maybe<java.lang.String>sendStep(ItemStatus status, java.lang.String name, java.lang.Throwable throwable)io.reactivex.Maybe<java.lang.String>sendStep(ItemStatus status, java.lang.String name, java.lang.Throwable throwable, java.io.File... files)io.reactivex.Maybe<java.lang.String>sendStep(java.lang.String name)io.reactivex.Maybe<java.lang.String>sendStep(java.lang.String name, java.io.File... files)io.reactivex.Maybe<java.lang.String>sendStep(java.lang.String name, java.lang.String... logs)voidsetParent(io.reactivex.Maybe<java.lang.String> parentUuid)voidsetStepStatus(ItemStatus status)Set execution status for current step.io.reactivex.Maybe<java.lang.String>startNestedStep(StartTestItemRQ startStepRequest)io.reactivex.Maybe<java.lang.String>step(ItemStatus status, java.lang.String name)Report a step with specified status and name.<T> Tstep(ItemStatus stepSuccessStatus, java.lang.String name, java.util.function.Supplier<T> actions)Wrap passed actions as a separate step and report it.io.reactivex.Maybe<java.lang.String>step(java.lang.String name)Report a step with specified name.<T> Tstep(java.lang.String name, java.util.function.Supplier<T> actions)Wrap passed actions as a separate step and report it.
-
-
-
Constructor Detail
-
DefaultStepReporter
public DefaultStepReporter(Launch currentLaunch)
-
-
Method Detail
-
getParent
@Nullable public io.reactivex.Maybe<java.lang.String> getParent()
- Specified by:
getParentin interfaceStepReporter
-
setStepStatus
public void setStepStatus(@Nonnull ItemStatus status)Description copied from interface:StepReporterSet execution status for current step. This status will be applied to the step no matter what will happen with the step next. E.G. if you setItemStatus.PASSEDwith the method and then throw an exception the status of the step will stay passed.- Specified by:
setStepStatusin interfaceStepReporter- Parameters:
status- wanted step status
-
setParent
public void setParent(@Nullable io.reactivex.Maybe<java.lang.String> parentUuid)- Specified by:
setParentin interfaceStepReporter
-
removeParent
public void removeParent(@Nullable io.reactivex.Maybe<java.lang.String> parentUuid)- Specified by:
removeParentin interfaceStepReporter
-
isFailed
public boolean isFailed(@Nullable io.reactivex.Maybe<java.lang.String> parentId)- Specified by:
isFailedin interfaceStepReporter
-
sendStep
@Nonnull protected io.reactivex.Maybe<java.lang.String> sendStep(@Nonnull ItemStatus status, @Nonnull java.lang.String name, @Nullable java.lang.Runnable actions)
-
sendStep
@Nonnull public io.reactivex.Maybe<java.lang.String> sendStep(@Nonnull ItemStatus status, @Nonnull java.lang.String name)- Specified by:
sendStepin interfaceStepReporter
-
sendStep
@Nonnull public io.reactivex.Maybe<java.lang.String> sendStep(@Nonnull java.lang.String name)- Specified by:
sendStepin interfaceStepReporter
-
sendStep
@Nonnull public io.reactivex.Maybe<java.lang.String> sendStep(@Nonnull ItemStatus status, @Nonnull java.lang.String name, java.lang.String... logs)- Specified by:
sendStepin interfaceStepReporter
-
sendStep
@Nonnull public io.reactivex.Maybe<java.lang.String> sendStep(@Nonnull java.lang.String name, java.lang.String... logs)- Specified by:
sendStepin interfaceStepReporter
-
sendStep
@Nonnull public io.reactivex.Maybe<java.lang.String> sendStep(@Nonnull ItemStatus status, @Nonnull java.lang.String name, java.lang.Throwable throwable)- Specified by:
sendStepin interfaceStepReporter
-
sendStep
@Nonnull public io.reactivex.Maybe<java.lang.String> sendStep(@Nonnull ItemStatus status, @Nonnull java.lang.String name, java.io.File... files)- Specified by:
sendStepin interfaceStepReporter
-
sendStep
@Nonnull public io.reactivex.Maybe<java.lang.String> sendStep(@Nonnull java.lang.String name, java.io.File... files)- Specified by:
sendStepin interfaceStepReporter
-
sendStep
@Nonnull public io.reactivex.Maybe<java.lang.String> sendStep(@Nonnull ItemStatus status, @Nonnull java.lang.String name, java.lang.Throwable throwable, java.io.File... files)- Specified by:
sendStepin interfaceStepReporter
-
finishPreviousStep
@Nonnull public io.reactivex.Maybe<java.lang.String> finishPreviousStep(@Nullable ItemStatus status)Finish current step started by any of#sendStepmethods. Overrides original status if provided.- Specified by:
finishPreviousStepin interfaceStepReporter- Parameters:
status- finish status
-
finishPreviousStep
@Nonnull public io.reactivex.Maybe<java.lang.String> finishPreviousStep()
Finish current step started by any of#sendStepmethods.- Specified by:
finishPreviousStepin interfaceStepReporter
-
startNestedStep
@Nonnull public io.reactivex.Maybe<java.lang.String> startNestedStep(@Nonnull StartTestItemRQ startStepRequest)- Specified by:
startNestedStepin interfaceStepReporter
-
finishNestedStep
@Nonnull public io.reactivex.Maybe<OperationCompletionRS> finishNestedStep(@Nonnull FinishTestItemRQ finishStepRequest)
- Specified by:
finishNestedStepin interfaceStepReporter
-
finishNestedStep
@Nonnull public io.reactivex.Maybe<OperationCompletionRS> finishNestedStep(@Nonnull ItemStatus status)
- Specified by:
finishNestedStepin interfaceStepReporter
-
finishNestedStep
@Nonnull public io.reactivex.Maybe<OperationCompletionRS> finishNestedStep()
- Specified by:
finishNestedStepin interfaceStepReporter
-
finishNestedStep
@Nonnull public io.reactivex.Maybe<OperationCompletionRS> finishNestedStep(@Nullable java.lang.Throwable throwable)
- Specified by:
finishNestedStepin interfaceStepReporter
-
step
@Nonnull public io.reactivex.Maybe<java.lang.String> step(@Nonnull ItemStatus status, @Nonnull java.lang.String name)Description copied from interface:StepReporterReport a step with specified status and name.- Specified by:
stepin interfaceStepReporter- Parameters:
status- step statusname- step name- Returns:
- step ID
-
step
@Nonnull public io.reactivex.Maybe<java.lang.String> step(@Nonnull java.lang.String name)Description copied from interface:StepReporterReport a step with specified name.- Specified by:
stepin interfaceStepReporter- Parameters:
name- step name- Returns:
- step ID
-
step
@Nullable public <T> T step(@Nonnull ItemStatus stepSuccessStatus, @Nonnull java.lang.String name, @Nonnull java.util.function.Supplier<T> actions)Description copied from interface:StepReporterWrap passed actions as a separate step and report it.- Specified by:
stepin interfaceStepReporter- Type Parameters:
T- return type- Parameters:
stepSuccessStatus- step status in case of graceful finishname- step nameactions- action function to execute- Returns:
- actions result
-
step
@Nullable public <T> T step(@Nonnull java.lang.String name, @Nonnull java.util.function.Supplier<T> actions)Description copied from interface:StepReporterWrap passed actions as a separate step and report it.- Specified by:
stepin interfaceStepReporter- Type Parameters:
T- return type- Parameters:
name- step nameactions- action function to execute- Returns:
- actions result
-
-