allure_flutter_test library

Allure adapter APIs for Flutter widget and integration tests.

Classes

AllureAttachment
Attachment metadata recorded in an Allure result.
AllureCategory
Allure category definition used by report generation.
AllureExecutable
Shared executable fields for Allure tests, fixtures, and steps.
AllureExecutionContext
Active Allure execution identifiers for zone-based runtime APIs.
AllureExecutorInfo
Executor metadata written to executor.json.
AllureFixtureResult
Allure fixture result used for setup and teardown records.
AllureGlobalAttachment
Attachment recorded outside an individual test result.
AllureGlobalError
Error recorded outside an individual test result.
AllureGlobals
Global Allure data written separately from test results.
AllureLabel
Name/value metadata label attached to an Allure result.
AllureLifecycle
Mutable Allure lifecycle used to build and write result files.
AllureLifecycleListener
Listener hooks for observing Allure lifecycle events.
Link metadata attached to an Allure result.
AllureParameter
Runtime parameter attached to a result, fixture, or step.
AllurePreparedAttachment
Prepared attachment file paths reserved before content is written.
AllureResultsWriter
Writes Allure result files and attachments to a results directory.
AllureRuntimeMessageSink
Consumer of runtime messages emitted by test-facing APIs.
AllureStatusDetails
Additional status details for a result, fixture, step, or global error.
AllureStepContext
Context object passed to an active Allure step body.
AllureStepResult
Allure step result nested under a test, fixture, or another step.
AllureTestResult
Allure test result written as a *-result.json file.
AllureTestResultContainer
Allure container result written as a *-container.json file.
MessageTestRuntime
Runtime transport that forwards messages to an AllureRuntimeMessageSink.
NoopTestRuntime
Runtime transport that intentionally drops all messages.
RuntimeMessage
Message sent from a test runtime API to an Allure lifecycle sink.
TestRuntime
Runtime transport used by top-level Allure APIs.

Enums

AllureParameterMode
Visibility mode for an Allure parameter.
AllureStage
Execution stage values written to Allure result files.
AllureStatus
Status values written to Allure result files.

Constants

allureTestPlanSkipLabel → const String
Label name used to mark tests excluded by an Allure test plan.

Functions

allureId(String value) Future<void>
Adds an Allure id label to the current test.
applyLinkTemplate(String template, String value) String
Applies a link template to value.
attachment(String name, Object content, {required String contentType, String? fileExtension, bool wrapInStep = true, int? timestamp}) Future<void>
Adds an attachment from in-memory content to the current test.
attachmentPath(String name, String path, {required String contentType, String? fileExtension, bool wrapInStep = true, int? timestamp}) Future<void>
Adds an attachment from a filesystem path to the current test.
attachTrace(String name, String path) Future<void>
Adds a Playwright trace attachment from path to the current test.
currentTimestamp() int
Returns the current timestamp in milliseconds since epoch.
deriveAttachmentExtension({String? fileExtension, String? originalPath, String? contentType}) String?
Derives an attachment file extension from explicit or inferred metadata.
description(String markdown) Future<void>
Sets the Markdown description for the current test.
descriptionHtml(String html) Future<void>
Sets the HTML description for the current test.
displayName(String name) Future<void>
Overrides the display name of the current test.
ensureSuiteLabels(AllureTestResult test, List<String> defaultSuites) → void
Adds default suite labels to test when none are already present.
epic(String value) Future<void>
Adds an epic label to the current test.
feature(String value) Future<void>
Adds a feature label to the current test.
Formats an Allure link with URL and name templates.
Formats a collection of Allure links with URL and name templates.
getEnvironmentLabels([Map<String, String>? environment]) List<AllureLabel>
Converts ALLURE_LABEL_* environment variables to Allure labels.
getFrameworkLabel(String framework) AllureLabel
Returns a framework label for framework.
getGlobalTestRuntime() TestRuntime
Returns the process-wide Allure runtime used by top-level APIs.
getGlobalTestRuntimeWithAutoconfig() TestRuntime
Returns the process-wide Allure runtime, preserving compatibility.
getHostLabel() AllureLabel
Returns the host label for the current machine.
getLanguageLabel() AllureLabel
Returns the Dart language label.
getMessageAndTraceFromError(Object error, [StackTrace? stackTrace]) AllureStatusDetails
Extracts an Allure status message, trace, actual, and expected values.
getPackageLabel(String filepath) AllureLabel
Returns a package label with filepath relative to the current directory.
getPosixPath(String filepath) String
Converts platform path separators in filepath to POSIX separators.
getRelativePath(String filepath) String
Returns filepath relative to the current directory using POSIX separators.
getStatusFromError(Object error, [StackTrace? stackTrace]) AllureStatus
Maps an error object to the closest Allure status.
getSuiteLabels(List<String> suites) List<AllureLabel>
Builds suite labels from a hierarchy of suite names.
getThreadLabel([String? threadId]) AllureLabel
Returns a thread label using threadId or the current process id.
getZoneExecutionContext() AllureExecutionContext?
Returns the Allure execution context stored in the current Zone.
globalAttachment(String name, Object content, {required String contentType, String? fileExtension}) Future<void>
Writes a run-level attachment from in-memory content.
globalAttachmentPath(String name, String path, {required String contentType, String? fileExtension}) Future<void>
Writes a run-level attachment from a filesystem path.
globalError({String? message, String? trace, bool? known, bool? muted, bool? flaky, String? actual, String? expected}) Future<void>
Writes a run-level error entry.
hasSkipLabel(Iterable<AllureLabel> labels) bool
Whether labels contain the Allure test-plan skip marker.
historyId(String value) Future<void>
Sets the history id of the current test.
installAllure({AllureLifecycle? lifecycle}) → void
Installs the Allure runtime plugin for Flutter tests.
issue(String value, {String? name}) Future<void>
Adds an issue link to the current test.
label(String name, String value) Future<void>
Adds a single Allure label to the current test.
labels(Iterable<AllureLabel> values) Future<void>
Adds multiple Allure labels to the current test.
layer(String value) Future<void>
Adds a layer label to the current test.
Adds an Allure link to the current test.
Adds multiple Allure links to the current test.
logStep(String name, {AllureStatus status = AllureStatus.passed, Object? error}) Future<void>
Records an already-completed step with status.
markFlaky({bool value = true}) Future<void>
Marks the current test status details as flaky.
markKnown({bool value = true}) Future<void>
Marks the current test status details as known.
markMuted({bool value = true}) Future<void>
Marks the current test status details as muted.
md5Hash(String value) String
Returns the MD5 hash of value as a lowercase hexadecimal string.
normalizeTiming({int? start, int? stop, int? duration, int now()?}) → ({int start, int stop})
Resolves start and stop timestamps from optional timing values.
owner(String value) Future<void>
Adds an owner label to the current test.
parameter(String name, Object? value, {bool? excluded, AllureParameterMode? mode}) Future<void>
Adds an Allure parameter to the current test.
parentSuite(String value) Future<void>
Adds a parent suite label to the current test.
runWithAllureContext<T>({required String rootUuid, required String testUuid, required T body()}) → T
Runs body in a zone that carries the current Allure execution ids.
serializeValue(Object? value) String
Serializes value for use in Allure parameters and details.
setGlobalTestRuntime(TestRuntime runtime) → void
Replaces the process-wide Allure runtime used by top-level APIs.
severity(String value) Future<void>
Adds a severity label to the current test.
statusDetails({String? message, String? trace, bool? known, bool? muted, bool? flaky, String? actual, String? expected}) Future<void>
Adds status details to the current test.
step<T>(String name, FutureOr<T> body(AllureStepContext step)) Future<T>
Runs body inside an Allure step and records its outcome.
story(String value) Future<void>
Adds a story label to the current test.
stringifyEnvironmentInfo(AllureEnvironmentInfo info) String
Serializes environment properties in .properties file format.
subSuite(String value) Future<void>
Adds a sub-suite label to the current test.
suite(String value) Future<void>
Adds a suite label to the current test.
tag(String value) Future<void>
Adds a tag label to the current test.
tags(Iterable<String> values) Future<void>
Adds tag labels to the current test.
testCaseId(String value) Future<void>
Sets the test case id of the current test.
testCaseName(String value) Future<void>
Sets the test case name of the current test.
tms(String value, {String? name}) Future<void>
Adds a test management system link to the current test.

Typedefs

AllureEnvironmentInfo = Map<String, String?>
Environment properties written to environment.properties.
AllureExecutionContextResolver = AllureExecutionContext? Function()
Resolves the current Allure execution context.