# metadata

abstract fun metadata(logTime: Instant, key: String, value: Any)(source)

Emit an event containing metadata about the test or test group currently being run.

Producers can supply the same value as the test start time to indicate that the metadata is "timeless", such as environment information that isn't tied to a specific point during test execution. Otherwise, the time should be between the start and end times of the test (inclusive), but this is not enforced.

Keys should usually be unique within the scope of a single test, but this is not enforced.

#### Since

8.13

#### Parameters

logTime

the time the metadata was logged, should be between the start and end times of the test (inclusive)

key

a key to identify the metadata

value

the metadata value, which must be serializable by the Tooling API

abstract fun metadata(logTime: Instant, values: Map<String, Any>)(source)

Emit an event containing metadata about the test or test group currently being run. The metadata is a map containing potentially multiple key-value pairs to be reported to any consumer as a single event.

Producers can supply the same value as the test start time to indicate that the metadata is "timeless", such as environment information that isn't tied to a specific point during test execution. Otherwise, the time should be between the start and end times of the test (inclusive), but this is not enforced.

Keys should usually be unique within the scope of a single test, but this is not enforced.

#### Since

8.13

#### Parameters

logTime

the time the metadata was logged, should be between the start and end times of the test (inclusive)

values

the metadata values, containing in a map which must be serializable by the Tooling API