public interface StepReporter
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"));
| Modifier and Type | Interface and Description |
|---|---|
static class |
StepReporter.StepEntry |
| Modifier and Type | Field and Description |
|---|---|
static StepReporter |
NOOP_STEP_REPORTER
A StepReporter which does nothing, specially for disabled RP listeners.
|
| Modifier and Type | Method and Description |
|---|---|
void |
finishNestedStep() |
io.reactivex.Maybe<com.epam.ta.reportportal.ws.model.OperationCompletionRS> |
finishNestedStep(com.epam.ta.reportportal.ws.model.FinishTestItemRQ finishStepRequest) |
io.reactivex.Maybe<com.epam.ta.reportportal.ws.model.OperationCompletionRS> |
finishNestedStep(ItemStatus status) |
void |
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() |
boolean |
isFailed(io.reactivex.Maybe<java.lang.String> parentId) |
void |
removeParent(io.reactivex.Maybe<java.lang.String> parentUuid) |
void |
sendStep(ItemStatus status,
java.lang.String name) |
void |
sendStep(ItemStatus status,
java.lang.String name,
java.io.File... files) |
void |
sendStep(ItemStatus status,
java.lang.String name,
java.lang.String... logs) |
void |
sendStep(ItemStatus status,
java.lang.String name,
java.lang.Throwable throwable) |
void |
sendStep(ItemStatus status,
java.lang.String name,
java.lang.Throwable throwable,
java.io.File... files) |
void |
sendStep(java.lang.String name) |
void |
sendStep(java.lang.String name,
java.io.File... files) |
void |
sendStep(java.lang.String name,
java.lang.String... logs) |
void |
setParent(io.reactivex.Maybe<java.lang.String> parentUuid) |
default void |
setStepStatus(ItemStatus status)
Set execution status for current step.
|
io.reactivex.Maybe<java.lang.String> |
startNestedStep(com.epam.ta.reportportal.ws.model.StartTestItemRQ startStepRequest) |
io.reactivex.Maybe<java.lang.String> |
step(ItemStatus status,
java.lang.String name)
Report a step with specified status and name.
|
<T> T |
step(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> T |
step(java.lang.String name,
java.util.function.Supplier<T> actions)
Wrap passed actions as a separate step and report it.
|
static final StepReporter NOOP_STEP_REPORTER
void setParent(@Nullable
io.reactivex.Maybe<java.lang.String> parentUuid)
@Nullable io.reactivex.Maybe<java.lang.String> getParent()
void removeParent(@Nullable
io.reactivex.Maybe<java.lang.String> parentUuid)
boolean isFailed(@Nullable
io.reactivex.Maybe<java.lang.String> parentId)
void sendStep(@Nonnull
java.lang.String name)
void sendStep(@Nonnull
java.lang.String name,
@Nullable
java.lang.String... logs)
void sendStep(@Nonnull
ItemStatus status,
@Nonnull
java.lang.String name)
void sendStep(@Nonnull
ItemStatus status,
@Nonnull
java.lang.String name,
@Nullable
java.lang.String... logs)
void sendStep(@Nonnull
ItemStatus status,
@Nonnull
java.lang.String name,
@Nullable
java.lang.Throwable throwable)
void sendStep(@Nonnull
java.lang.String name,
@Nullable
java.io.File... files)
void sendStep(@Nonnull
ItemStatus status,
@Nonnull
java.lang.String name,
@Nullable
java.io.File... files)
void sendStep(@Nonnull
ItemStatus status,
@Nonnull
java.lang.String name,
@Nullable
java.lang.Throwable throwable,
@Nullable
java.io.File... files)
@Nonnull
io.reactivex.Maybe<java.lang.String> finishPreviousStep(@Nullable
ItemStatus status)
@Nonnull io.reactivex.Maybe<java.lang.String> finishPreviousStep()
@Nonnull
io.reactivex.Maybe<java.lang.String> startNestedStep(@Nonnull
com.epam.ta.reportportal.ws.model.StartTestItemRQ startStepRequest)
io.reactivex.Maybe<com.epam.ta.reportportal.ws.model.OperationCompletionRS> finishNestedStep(@Nonnull
ItemStatus status)
void finishNestedStep()
void finishNestedStep(@Nullable
java.lang.Throwable throwable)
io.reactivex.Maybe<com.epam.ta.reportportal.ws.model.OperationCompletionRS> finishNestedStep(@Nonnull
com.epam.ta.reportportal.ws.model.FinishTestItemRQ finishStepRequest)
io.reactivex.Maybe<java.lang.String> step(@Nonnull
java.lang.String name)
name - step nameio.reactivex.Maybe<java.lang.String> step(@Nonnull
ItemStatus status,
@Nonnull
java.lang.String name)
status - step statusname - step name@Nullable
<T> T step(@Nonnull
ItemStatus stepSuccessStatus,
@Nonnull
java.lang.String name,
@Nonnull
java.util.function.Supplier<T> actions)
T - return typestepSuccessStatus - step status in case of graceful finishname - step nameactions - action function to execute@Nullable
<T> T step(@Nonnull
java.lang.String name,
@Nonnull
java.util.function.Supplier<T> actions)
T - return typename - step nameactions - action function to executedefault void setStepStatus(@Nonnull
ItemStatus status)
ItemStatus.PASSED with the method and then throw an exception the status
of the step will stay passed.status - wanted step status