Table of Contents

Interface ITestCollectionMetadata

Namespace
Xunit.Sdk

Represents metadata about a test collection.

public interface ITestCollectionMetadata
Extension Methods

Properties

TestCollectionClassName

Gets the type that the test collection was defined with, if available; may be null if the test collection didn't have a definition type.

string? TestCollectionClassName { get; }

Property Value

string

TestCollectionDisplayName

Gets the display name of the test collection.

string TestCollectionDisplayName { get; }

Property Value

string

Traits

Gets the trait values associated with this test collection (and the test assembly). If there are none, or the framework does not support traits, this returns an empty dictionary (not null).

IReadOnlyDictionary<string, IReadOnlyCollection<string>> Traits { get; }

Property Value

IReadOnlyDictionary<string, IReadOnlyCollection<string>>

UniqueID

Gets the unique ID for this test collection.

string UniqueID { get; }

Property Value

string

Remarks

The unique identifier for a test collection should be able to discriminate among test collections in the same test assembly. This identifier should remain stable until such time as the developer changes some fundamental part of the identity (the test assembly, the collection definition class, or the collection name). Recompilation of the test assembly is reasonable as a stability changing event.