@Test void shouldHideCheckedExceptions() { final AllureResults results = runWithinTestContext( () -> { step("first", Status.PASSED); step("second", () -> { throw new Exception("something wrong"); }); step("third", Status.FAILED); }, Allure::setLifecycle ); assertThat(results.getTestResults()) .extracting(TestResult::getStatus) .containsExactly(Status.BROKEN); assertThat(results.getTestResults()) .extracting(TestResult::getStatusDetails) .extracting(StatusDetails::getMessage) .containsExactly("something wrong"); assertThat(results.getTestResults()) .flatExtracting(TestResult::getSteps) .extracting(StepResult::getName, StepResult::getStatus) .containsExactly( tuple("first", Status.PASSED), tuple("second", Status.BROKEN) ); assertThat(results.getTestResults()) .flatExtracting(TestResult::getSteps) .filteredOn("name", "second") .extracting(StepResult::getStatusDetails) .extracting(StatusDetails::getMessage) .containsExactly("something wrong"); }
public static void step(final String name) { step(name, Status.PASSED); }
Allure { public static void step(final String name) { step(name, Status.PASSED); } }
Allure { public static void step(final String name) { step(name, Status.PASSED); } private  Allure(); }
Allure { public static void step(final String name) { step(name, Status.PASSED); } private  Allure(); static AllureLifecycle getLifecycle(); static void setLifecycle(final AllureLifecycle lifecycle); static void step(final String name); static void step(final String name, final Status status); static void step(final String name, final ThrowableRunnableVoid runnable); static T step(final String name, final ThrowableRunnable<T> runnable); static void step(final ThrowableContextRunnableVoid<StepContext> runnable); static void step(final String name, final ThrowableContextRunnableVoid<StepContext> runnable); static T step(final String name, final ThrowableContextRunnable<T, StepContext> runnable); static T step(final ThrowableContextRunnable<T, StepContext> runnable); static void epic(final String value); static void feature(final String value); static void story(final String value); static void suite(final String value); static void label(final String name, final String value); static T parameter(final String name, final T value); static void issue(final String name, final String url); static void tms(final String name, final String url); static void link(final String url); static void link(final String name, final String url); static void link(final String name, final String type, final String url); static void description(final String description); static void descriptionHtml(final String descriptionHtml); static void attachment(final String name, final String content); static void attachment(final String name, final InputStream content); @Deprecated static void addLabels(final Label... labels); @Deprecated static void addLinks(final Link... links); @Deprecated static void addDescription(final String description); @Deprecated static void addDescriptionHtml(final String descriptionHtml); static void addAttachment(final String name, final String content); static void addAttachment(final String name, final String type, final String content); @SuppressWarnings("PMD.UseObjectForClearerAPI") static void addAttachment(final String name, final String type,
                                     final String content, final String fileExtension); static void addAttachment(final String name, final InputStream content); @SuppressWarnings("PMD.UseObjectForClearerAPI") static void addAttachment(final String name, final String type,
                                     final InputStream content, final String fileExtension); static CompletableFuture<byte[]> addByteAttachmentAsync(
            final String name, final String type, final Supplier<byte[]> body); static CompletableFuture<byte[]> addByteAttachmentAsync(
            final String name, final String type, final String fileExtension, final Supplier<byte[]> body); static CompletableFuture<InputStream> addStreamAttachmentAsync(
            final String name, final String type, final Supplier<InputStream> body); static CompletableFuture<InputStream> addStreamAttachmentAsync(
            final String name, final String type, final String fileExtension, final Supplier<InputStream> body); }
Allure { public static void step(final String name) { step(name, Status.PASSED); } private  Allure(); static AllureLifecycle getLifecycle(); static void setLifecycle(final AllureLifecycle lifecycle); static void step(final String name); static void step(final String name, final Status status); static void step(final String name, final ThrowableRunnableVoid runnable); static T step(final String name, final ThrowableRunnable<T> runnable); static void step(final ThrowableContextRunnableVoid<StepContext> runnable); static void step(final String name, final ThrowableContextRunnableVoid<StepContext> runnable); static T step(final String name, final ThrowableContextRunnable<T, StepContext> runnable); static T step(final ThrowableContextRunnable<T, StepContext> runnable); static void epic(final String value); static void feature(final String value); static void story(final String value); static void suite(final String value); static void label(final String name, final String value); static T parameter(final String name, final T value); static void issue(final String name, final String url); static void tms(final String name, final String url); static void link(final String url); static void link(final String name, final String url); static void link(final String name, final String type, final String url); static void description(final String description); static void descriptionHtml(final String descriptionHtml); static void attachment(final String name, final String content); static void attachment(final String name, final InputStream content); @Deprecated static void addLabels(final Label... labels); @Deprecated static void addLinks(final Link... links); @Deprecated static void addDescription(final String description); @Deprecated static void addDescriptionHtml(final String descriptionHtml); static void addAttachment(final String name, final String content); static void addAttachment(final String name, final String type, final String content); @SuppressWarnings("PMD.UseObjectForClearerAPI") static void addAttachment(final String name, final String type,
                                     final String content, final String fileExtension); static void addAttachment(final String name, final InputStream content); @SuppressWarnings("PMD.UseObjectForClearerAPI") static void addAttachment(final String name, final String type,
                                     final InputStream content, final String fileExtension); static CompletableFuture<byte[]> addByteAttachmentAsync(
            final String name, final String type, final Supplier<byte[]> body); static CompletableFuture<byte[]> addByteAttachmentAsync(
            final String name, final String type, final String fileExtension, final Supplier<byte[]> body); static CompletableFuture<InputStream> addStreamAttachmentAsync(
            final String name, final String type, final Supplier<InputStream> body); static CompletableFuture<InputStream> addStreamAttachmentAsync(
            final String name, final String type, final String fileExtension, final Supplier<InputStream> body);  }