Table of Contents

Interface ITestMetadata

Namespace
Xunit.Sdk

Represents metadata about a test.

public interface ITestMetadata
Extension Methods

Properties

TestDisplayName

Gets the display name of the test.

string TestDisplayName { get; }

Property Value

string

Traits

Gets the trait values associated with this test case. If there are none, or the framework does not support traits, this should return an empty dictionary (not null).

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

Property Value

IReadOnlyDictionary<string, IReadOnlyCollection<string>>

UniqueID

Gets a unique identifier for the test.

string UniqueID { get; }

Property Value

string

Remarks

The unique identifier for a test should be able to discriminate among test, even those which are varied invocations against the same test method (i.e., theories). This identifier should remain stable until such time as the developer changes some fundamental part of the identity (assembly, class name, test name, or test data). Recompilation of the test assembly is reasonable as a stability changing event.