# TestMetadataEvent

@Incubating
@NullMarked
interface TestMetadataEvent : ProgressEvent(source)

An event emitted by tests that contain additional data about the test.

To access data from the event:

            TestLauncher launcher = ...;
            launcher.addProgressListener(new ProgressListener() {
                void statusChanged(ProgressEvent event) {
                    if (event instanceof TestMetadataEvent) {
                        if (event instanceof TestFileAttachmentMetadataEvent) {
                            // Do something with file attachment
                        } else if (event instanceof TestKeyValueMetadataEvent) {
                            // Do something with key-values
                        } else {
                            // ignore unrecognized events
                        }
                    }
                }
            });

Content copied to clipboard

#### Since

8.13

#### See also

TestKeyValueMetadataEvent
TestFileAttachmentMetadataEvent

#### Inheritors

TestFileAttachmentMetadataEvent
TestKeyValueMetadataEvent

## Functions

getDescriptor
Link copied to clipboard
abstract fun getDescriptor(): OperationDescriptor
Returns the description of the operation for which progress is reported.
getDisplayName
Link copied to clipboard
abstract fun getDisplayName(): String
Returns a human consumable short description of the event.
getEventTime
Link copied to clipboard
abstract fun getEventTime(): Long
Returns the time this event was triggered.