Metadata class

Metadata for a test or test suite.

This metadata comes from declarations on the test itself; it doesn't include configuration from the user.

Constructors

Metadata({PlatformSelector testOn, Timeout timeout, bool skip, bool verboseTrace, bool chainStackTraces, int retry, String skipReason, Iterable<String> tags, Map<PlatformSelector, Metadata> onPlatform, Map<BooleanSelector, Metadata> forTag })
Creates new Metadata. [...]
factory
Metadata.deserialize(dynamic serialized)
Deserializes the result of Metadata.serialize into a new Metadata.
Metadata.parse({String testOn, Timeout timeout, dynamic skip, bool verboseTrace, bool chainStackTraces, int retry, Map<String, dynamic> onPlatform, dynamic tags })
Creates a new Metadata, but with fields parsed from caller-friendly values where applicable. [...]

Properties

chainStackTraces bool
Whether to chain stack traces.
read-only
forTag Map<BooleanSelector, Metadata>
Metadata that applies only when specific tags are applied. [...]
final
onPlatform Map<PlatformSelector, Metadata>
Platform-specific metadata. [...]
final
retry int
The number of times to re-run a test before being marked as a failure.
read-only
skip bool
Whether the test or suite should be skipped.
read-only
skipReason String
The reason the test or suite should be skipped, if given.
final
tags Set<String>
The user-defined tags attached to the test or suite.
final
testOn PlatformSelector
The selector indicating which platforms the suite supports.
final
timeout Timeout
The modification to the timeout for the test or suite.
final
verboseTrace bool
Whether to use verbose stack traces.
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

change({PlatformSelector testOn, Timeout timeout, bool skip, bool verboseTrace, bool chainStackTraces, int retry, String skipReason, Map<PlatformSelector, Metadata> onPlatform, Set<String> tags, Map<BooleanSelector, Metadata> forTag }) Metadata
Returns a copy of this with the given fields changed.
forPlatform(SuitePlatform platform) Metadata
Returns a copy of this with all platform-specific metadata from onPlatform resolved.
merge(Metadata other) Metadata
Return a new Metadata that merges this with other. [...]
serialize() → dynamic
Serializes this into a JSON-safe object that can be deserialized using new Metadata.deserialize.
validatePlatformSelectors(Set<String> validVariables) → void
Throws a FormatException if any PlatformSelectors use any variables that don't appear either in validVariables or in the set of variables that are known to be valid for all selectors.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited

Static Properties

empty Metadata
Empty metadata with only default values. [...]
final