Table of Contents

Interface ITestMethodMetadata

Namespace
Xunit.Sdk

Represents metadata about a test method.

public interface ITestMethodMetadata
Extension Methods

Properties

MethodName

Gets the name of the test method that is associated with this message.

string MethodName { get; }

Property Value

string

Traits

Gets the trait values associated with this test method (and the test class, test collection, and 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 method.

string UniqueID { get; }

Property Value

string

Remarks

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