Interface StepReporter
-
- All Known Implementing Classes:
DefaultStepReporter
public interface StepReporterA class for manual nested step reporting.Usage:
StepReporter stepReporter = Launch.currentLaunch().getStepReporter(); stepReporter.sendStep("My step name"); // step actions stepReporter.sendStep(ItemStatus.FAILED, "My failure step name", new File("screenshot/fail.jpg"));
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classStepReporter.StepEntry
-
Field Summary
Fields Modifier and Type Field Description static StepReporterNOOP_STEP_REPORTERA StepReporter which does nothing, specially for disabled RP listeners.
-
Method Summary
All Methods Instance Methods Abstract Methods Default 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()io.reactivex.Maybe<java.lang.String>finishPreviousStep(ItemStatus status)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)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)default 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.
-
-
-
Field Detail
-
NOOP_STEP_REPORTER
static final StepReporter NOOP_STEP_REPORTER
A StepReporter which does nothing, specially for disabled RP listeners.
-
-
Method Detail
-
setParent
void setParent(@Nullable io.reactivex.Maybe<java.lang.String> parentUuid)
-
getParent
@Nullable io.reactivex.Maybe<java.lang.String> getParent()
-
removeParent
void removeParent(@Nullable io.reactivex.Maybe<java.lang.String> parentUuid)
-
isFailed
boolean isFailed(@Nullable io.reactivex.Maybe<java.lang.String> parentId)
-
sendStep
@Nonnull io.reactivex.Maybe<java.lang.String> sendStep(@Nonnull java.lang.String name)
-
sendStep
@Nonnull io.reactivex.Maybe<java.lang.String> sendStep(@Nonnull java.lang.String name, @Nullable java.lang.String... logs)
-
sendStep
@Nonnull io.reactivex.Maybe<java.lang.String> sendStep(@Nonnull ItemStatus status, @Nonnull java.lang.String name)
-
sendStep
@Nonnull io.reactivex.Maybe<java.lang.String> sendStep(@Nonnull ItemStatus status, @Nonnull java.lang.String name, @Nullable java.lang.String... logs)
-
sendStep
@Nonnull io.reactivex.Maybe<java.lang.String> sendStep(@Nonnull ItemStatus status, @Nonnull java.lang.String name, @Nullable java.lang.Throwable throwable)
-
sendStep
@Nonnull io.reactivex.Maybe<java.lang.String> sendStep(@Nonnull java.lang.String name, @Nullable java.io.File... files)
-
sendStep
@Nonnull io.reactivex.Maybe<java.lang.String> sendStep(@Nonnull ItemStatus status, @Nonnull java.lang.String name, @Nullable java.io.File... files)
-
sendStep
@Nonnull io.reactivex.Maybe<java.lang.String> sendStep(@Nonnull ItemStatus status, @Nonnull java.lang.String name, @Nullable java.lang.Throwable throwable, @Nullable java.io.File... files)
-
finishPreviousStep
@Nonnull io.reactivex.Maybe<java.lang.String> finishPreviousStep(@Nullable ItemStatus status)
-
finishPreviousStep
@Nonnull io.reactivex.Maybe<java.lang.String> finishPreviousStep()
-
startNestedStep
@Nonnull io.reactivex.Maybe<java.lang.String> startNestedStep(@Nonnull StartTestItemRQ startStepRequest)
-
finishNestedStep
@Nonnull io.reactivex.Maybe<OperationCompletionRS> finishNestedStep(@Nonnull ItemStatus status)
-
finishNestedStep
@Nonnull io.reactivex.Maybe<OperationCompletionRS> finishNestedStep()
-
finishNestedStep
@Nonnull io.reactivex.Maybe<OperationCompletionRS> finishNestedStep(@Nullable java.lang.Throwable throwable)
-
finishNestedStep
@Nonnull io.reactivex.Maybe<OperationCompletionRS> finishNestedStep(@Nonnull FinishTestItemRQ finishStepRequest)
-
step
@Nonnull io.reactivex.Maybe<java.lang.String> step(@Nonnull java.lang.String name)Report a step with specified name.- Parameters:
name- step name- Returns:
- step ID
-
step
@Nonnull io.reactivex.Maybe<java.lang.String> step(@Nonnull ItemStatus status, @Nonnull java.lang.String name)Report a step with specified status and name.- Parameters:
status- step statusname- step name- Returns:
- step ID
-
step
@Nullable <T> T step(@Nonnull ItemStatus stepSuccessStatus, @Nonnull java.lang.String name, @Nonnull java.util.function.Supplier<T> actions)Wrap passed actions as a separate step and report it.- 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 <T> T step(@Nonnull java.lang.String name, @Nonnull java.util.function.Supplier<T> actions)Wrap passed actions as a separate step and report it.- Type Parameters:
T- return type- Parameters:
name- step nameactions- action function to execute- Returns:
- actions result
-
setStepStatus
default void setStepStatus(@Nonnull ItemStatus status)Set 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.- Parameters:
status- wanted step status
-
-