public final class Allure
extends java.lang.Object
AllureLifecycle
.Modifier and Type | Class and Description |
---|---|
static interface |
Allure.StepContext
Step context.
|
static interface |
Allure.ThrowableContextRunnable<T,U>
Runnable that allows to throw an exception and return any type.
|
static interface |
Allure.ThrowableContextRunnableVoid<T>
Callable that allows to throw an exception and return void.
|
static interface |
Allure.ThrowableRunnable<T>
Runnable that allows to throw an exception and return any type.
|
static interface |
Allure.ThrowableRunnableVoid
Runnable that allows to throw an exception and return void.
|
Modifier and Type | Method and Description |
---|---|
static void |
addAttachment(java.lang.String name,
java.io.InputStream content) |
static void |
addAttachment(java.lang.String name,
java.lang.String content) |
static void |
addAttachment(java.lang.String name,
java.lang.String type,
java.io.InputStream content,
java.lang.String fileExtension) |
static void |
addAttachment(java.lang.String name,
java.lang.String type,
java.lang.String content) |
static void |
addAttachment(java.lang.String name,
java.lang.String type,
java.lang.String content,
java.lang.String fileExtension) |
static java.util.concurrent.CompletableFuture<byte[]> |
addByteAttachmentAsync(java.lang.String name,
java.lang.String type,
java.lang.String fileExtension,
java.util.function.Supplier<byte[]> body) |
static java.util.concurrent.CompletableFuture<byte[]> |
addByteAttachmentAsync(java.lang.String name,
java.lang.String type,
java.util.function.Supplier<byte[]> body) |
static void |
addDescription(java.lang.String description)
Deprecated.
use
description(String) instead. |
static void |
addDescriptionHtml(java.lang.String descriptionHtml)
Deprecated.
use
descriptionHtml(String) instead. |
static void |
addLabels(io.qameta.allure.model.Label... labels)
Deprecated.
use
label(String, String) instead. |
static void |
addLinks(io.qameta.allure.model.Link... links)
Deprecated.
use
link(String, String, String) instead. |
static java.util.concurrent.CompletableFuture<java.io.InputStream> |
addStreamAttachmentAsync(java.lang.String name,
java.lang.String type,
java.lang.String fileExtension,
java.util.function.Supplier<java.io.InputStream> body) |
static java.util.concurrent.CompletableFuture<java.io.InputStream> |
addStreamAttachmentAsync(java.lang.String name,
java.lang.String type,
java.util.function.Supplier<java.io.InputStream> body) |
static void |
attachment(java.lang.String name,
java.io.InputStream content)
Adds attachment.
|
static void |
attachment(java.lang.String name,
java.lang.String content)
Adds attachment.
|
static void |
description(java.lang.String description)
Adds description to current test or step (or fixture) if any.
|
static void |
descriptionHtml(java.lang.String descriptionHtml)
Adds descriptionHtml to current test or step (or fixture) if any.
|
static void |
epic(java.lang.String value)
Adds epic label to current test or step (or fixture) if any.
|
static void |
feature(java.lang.String value)
Adds feature label to current test or step (or fixture) if any.
|
static AllureLifecycle |
getLifecycle()
Returns
AllureLifecycle for low level operations with results. |
static void |
issue(java.lang.String name,
java.lang.String url)
Adds issue link to current test or step (or fixture) if any.
|
static void |
label(java.lang.String name,
java.lang.String value)
Adds label to current test or step (or fixture) if any.
|
static void |
link(java.lang.String url)
Adds link to current test or step (or fixture) if any.
|
static void |
link(java.lang.String name,
java.lang.String url)
Adds link to current test or step (or fixture) if any.
|
static void |
link(java.lang.String name,
java.lang.String type,
java.lang.String url)
Adds link to current test or step (or fixture) if any.
|
static <T> T |
parameter(java.lang.String name,
T value)
Adds parameter to current test or step (or fixture) if any.
|
static void |
setLifecycle(AllureLifecycle lifecycle)
Sets
AllureLifecycle . |
static <T> T |
step(Allure.ThrowableContextRunnable<T,Allure.StepContext> runnable)
Run provided
Allure.ThrowableRunnable as step with given name. |
static void |
step(Allure.ThrowableContextRunnableVoid<Allure.StepContext> runnable)
Syntax sugar for
step(ThrowableContextRunnable) . |
static void |
step(java.lang.String name)
Adds passed step with provided name in current test or step (or test fixture).
|
static <T> T |
step(java.lang.String name,
Allure.ThrowableContextRunnable<T,Allure.StepContext> runnable)
Syntax sugar for
step(ThrowableContextRunnable) . |
static void |
step(java.lang.String name,
Allure.ThrowableContextRunnableVoid<Allure.StepContext> runnable)
Syntax sugar for
step(ThrowableContextRunnable) . |
static <T> T |
step(java.lang.String name,
Allure.ThrowableRunnable<T> runnable)
Syntax sugar for
step(ThrowableContextRunnable) . |
static void |
step(java.lang.String name,
Allure.ThrowableRunnableVoid runnable)
Syntax sugar for
step(String, ThrowableRunnable) . |
static void |
step(java.lang.String name,
io.qameta.allure.model.Status status)
Adds step with provided name and status in current test or step (or test fixture).
|
static void |
story(java.lang.String value)
Adds story label to current test or step (or fixture) if any.
|
static void |
suite(java.lang.String value)
Adds suite label to current test or step (or fixture) if any.
|
static void |
tms(java.lang.String name,
java.lang.String url)
Adds tms link to current test or step (or fixture) if any.
|
public static AllureLifecycle getLifecycle()
AllureLifecycle
for low level operations with results.public static void setLifecycle(AllureLifecycle lifecycle)
AllureLifecycle
.public static void step(java.lang.String name)
step(String, Status)
.name
- the name of step.public static void step(java.lang.String name, io.qameta.allure.model.Status status)
name
- the name of step.status
- the step status.public static void step(java.lang.String name, Allure.ThrowableRunnableVoid runnable)
step(String, ThrowableRunnable)
.name
- the name of step.runnable
- the step's body.public static <T> T step(java.lang.String name, Allure.ThrowableRunnable<T> runnable)
step(ThrowableContextRunnable)
.name
- the name of step.runnable
- the step's body.public static void step(Allure.ThrowableContextRunnableVoid<Allure.StepContext> runnable)
step(ThrowableContextRunnable)
.runnable
- the step's body.public static void step(java.lang.String name, Allure.ThrowableContextRunnableVoid<Allure.StepContext> runnable)
step(ThrowableContextRunnable)
.name
- the name of step.runnable
- the step's body.public static <T> T step(java.lang.String name, Allure.ThrowableContextRunnable<T,Allure.StepContext> runnable)
step(ThrowableContextRunnable)
.name
- the name of step.runnable
- the step's body.public static <T> T step(Allure.ThrowableContextRunnable<T,Allure.StepContext> runnable)
Allure.ThrowableRunnable
as step with given name. Takes no effect
if no test run at the moment.runnable
- the step's body.public static void epic(java.lang.String value)
label(String, String)
.value
- the value of label.public static void feature(java.lang.String value)
label(String, String)
.value
- the value of label.public static void story(java.lang.String value)
label(String, String)
.value
- the value of label.public static void suite(java.lang.String value)
label(String, String)
.value
- the value of label.public static void label(java.lang.String name, java.lang.String value)
name
- the name of label.value
- the value of label.public static <T> T parameter(java.lang.String name, T value)
name
- the name of parameter.value
- the value of parameter.public static void issue(java.lang.String name, java.lang.String url)
link(String, String, String)
.name
- the name of link.url
- the link's url.public static void tms(java.lang.String name, java.lang.String url)
link(String, String, String)
.name
- the name of link.url
- the link's url.public static void link(java.lang.String url)
link(String, String)
url
- the link's url.public static void link(java.lang.String name, java.lang.String url)
link(String, String, String)
name
- the name of link.url
- the link's url.public static void link(java.lang.String name, java.lang.String type, java.lang.String url)
name
- the name of link.type
- the type of link, used to display link icon in the report.url
- the link's url.public static void description(java.lang.String description)
description
- the description in markdown format.descriptionHtml(String)
public static void descriptionHtml(java.lang.String descriptionHtml)
descriptionHtml
- the description in html format.description(String)
public static void attachment(java.lang.String name, java.lang.String content)
name
- the name of attachment.content
- the attachment content.public static void attachment(java.lang.String name, java.io.InputStream content)
name
- the name of attachment.content
- the stream that contains attachment content.@Deprecated public static void addLabels(io.qameta.allure.model.Label... labels)
label(String, String)
instead.@Deprecated public static void addLinks(io.qameta.allure.model.Link... links)
link(String, String, String)
instead.@Deprecated public static void addDescription(java.lang.String description)
description(String)
instead.@Deprecated public static void addDescriptionHtml(java.lang.String descriptionHtml)
descriptionHtml(String)
instead.public static void addAttachment(java.lang.String name, java.lang.String content)
public static void addAttachment(java.lang.String name, java.lang.String type, java.lang.String content)
public static void addAttachment(java.lang.String name, java.lang.String type, java.lang.String content, java.lang.String fileExtension)
public static void addAttachment(java.lang.String name, java.io.InputStream content)
public static void addAttachment(java.lang.String name, java.lang.String type, java.io.InputStream content, java.lang.String fileExtension)
public static java.util.concurrent.CompletableFuture<byte[]> addByteAttachmentAsync(java.lang.String name, java.lang.String type, java.util.function.Supplier<byte[]> body)
public static java.util.concurrent.CompletableFuture<byte[]> addByteAttachmentAsync(java.lang.String name, java.lang.String type, java.lang.String fileExtension, java.util.function.Supplier<byte[]> body)
public static java.util.concurrent.CompletableFuture<java.io.InputStream> addStreamAttachmentAsync(java.lang.String name, java.lang.String type, java.util.function.Supplier<java.io.InputStream> body)
public static java.util.concurrent.CompletableFuture<java.io.InputStream> addStreamAttachmentAsync(java.lang.String name, java.lang.String type, java.lang.String fileExtension, java.util.function.Supplier<java.io.InputStream> body)