adapter_support library

Support APIs used by Allure adapters built on top of package:test.

Classes

ExtractedMetadata
Metadata extracted from inline Allure annotations in text.
PackageTestMetadata
Metadata derived from a package:test declaration or runtime test.
PackageTestScopeRegistry
Registry of declared package:test scopes and metadata.
TestPlanEntry
Single entry in an Allure test plan.
TestPlanV1
Parsed Allure test plan version 1.

Functions

addSkipLabel(List<AllureLabel> labels) → void
Adds the Allure test-plan skip marker to labels.
buildPackageTestMetadata({required String rawName, Iterable<String> rawTags = const <String>[], List<String> groupPath = const <String>[], String? packagePath, int retryCount = 1, bool skipped = false, String? testCaseName, String? nativeSelector, Iterable<AllureParameter> additionalParameters = const <AllureParameter>[]}) PackageTestMetadata
Builds Allure metadata from package test declaration details.
buildPackageTestScopeId(String? packagePath, List<String> groupPath) String
Builds the Allure scope id for a package test group path.
extractAllureIdFromTags(Iterable<String>? tags) String?
Extracts an Allure id from tag expressions.
extractMetadataFromString(String text) ExtractedMetadata
Extracts Allure metadata annotations from text.
extractPackageTestGroupPath(dynamic liveTest) List<String>
Extracts the normalized group path from a live package:test object.
extractPackageTestPath(dynamic liveTest, dynamic location) String?
Extracts the package-relative file path from a live test and location.
includedInTestPlan(TestPlanV1 plan, {String? id, String? fullName, String? nativeSelector, Iterable<String>? tags}) bool
Whether a test identified by id, selector, or tags is included in plan.
mergePackageTestMetadata(PackageTestMetadata runtimeMetadata, PackageTestMetadata? declarationMetadata) PackageTestMetadata
Merges runtime metadata with metadata captured at declaration time.
normalizePackageTestTags(Object? tags) List<String>
Normalizes package test tags from a string, iterable, or null value.
packageTestPathFromUri(Uri? uri) String?
Converts a URI to a package-relative test path when possible.
parseTestPlan([Map<String, String>? environment]) TestPlanV1?
Parses an Allure test plan from ALLURE_TESTPLAN_PATH.
resolvePackageTestPathFromDeclaration({Uri? locationUri, StackTrace? stackTrace, List<String> ignoredLibrarySuffixes = const <String>[]}) String?
Resolves a package test path from declaration metadata or a stack trace.