TestMetadataEvent (Gradle API 9.7.0)
Description: declaration: package: org.gradle.tooling.events.test, interface: TestMetadataEvent

# Interface TestMetadataEvent

All Superinterfaces:
  `ProgressEvent`

All Known Subinterfaces:
  `TestFileAttachmentMetadataEvent, TestKeyValueMetadataEvent`

@Incubating @NullMarked public interface TestMetadataEvent extends ProgressEvent
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
                        }
                    }
                }
            });

Since:
  8.13
See Also:
  - `TestKeyValueMetadataEvent`
  - `TestFileAttachmentMetadataEvent`

- ## Method Summary

  ### Methods inherited from interface ProgressEvent

  `getDescriptor, getDisplayName, getEventTime`